Installing and configuring Rundeck on CentOS 7

Posted: February 6, 2018 in Linux, RunDeck

Rundeck is open source software that helps  automate routine operational procedures in data center or cloud environments


Rundeck can be configured to use RDB instead of default file-based data storage. RDB is recommended in large environment.In this post we’ll use file-based storage.

Rundeck requires java

# yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel -y

Create file in /etc/profile/d and and content below:





export CLASSPATH=.

Then make file executable

chmod +x /etc/profile.d/
source /etc/profile.d/

Rundeck is available on port 4440-that port needs to be open:

Add below line into file: /etc/sysconfig/iptables

-A INPUT -p tcp -m state --state NEW -m tcp --dport 4440 -j ACCEPT
/etc/init.d/iptables restart

Installing Rundeck:

rpm -Uvh 
yum install rundeck
/etc/init.d/rundeckd start

To make sure the service is running:

/etc/init.d/rundeckd status
netstat -anp | grep '4440\|4443'

The default username and password is admin:admin, if password change for admin is required then edit the file: /etc/rundeck/

Comment out the following line in file: /etc/rundeck/

# Comment this out from:

# To:
grails.serverURL=http://ip address:4440

Modify the below lines in file: /etc/rundeck/ = localhost
framework.server.hostname = localhost
framework.server.port = 4440
framework.server.url = http://localhost:4440

to = ip address
framework.server.hostname = ip address
framework.server.port = 4440
framework.server.url = http://ip address:4440

Now, restart the service and try to login: http://ipaddress:4440

Adding nodes

At this moment, there is no feature which would allow adding nodes using GUI

Create New project


Clear SSH key path


And click Create


Go to /var/rundeck/projects//etc
Edit resources.xml file

Add following line for every new node (server which needs to be managed)



New node appears in Web interface


To add another node just copy node line and change name and node IP address


<?xml version=”1.0″ encoding=”UTF-8″?>


<node name=”″ description=”Rundeck server node” tags=”” hostname=”″ osArch=”amd64″ osFamily=”unix” osName=”Linux” osVersion=”3.10.0-693.11.6.el7.x86_64″ username=”rundeck”/>

<node name=”node1″ description=”My First Node” tags=”node1″ hostname=”″ osArch=”amd64″ osFamily=”unix” osName=”Linux” username=”root” ssh-key-storage-path=”keys/Linuxtopic/server.1key”/>

<node name=”node2″ description=”My Second Node” tags=”node2″ hostname=”″ osArch=”amd64″ osFamily=”unix” osName=”Linux” username=”root” ssh-key-storage-path=”keys/Linuxtopic/server.1key”/>



Creating keypair on Rundeck server


Copy private key to clipboard:

cat /root/.ssh/id_rsa

copy content to clipboard

Now, on Rundeck interface click settings (cog icon)-Key Storage



Click Add or Upload a Key




Make sure Private Key is selected from drop-down list, paste content of ~/.ssh/id_rsa
And give key a name. Note:storage path and key name must reflect names in /var/rundeck/projects//etc resources.xml file

Instead of Private/Public keys, password can be used as authentication method




On client (node) create authorized_keys file (under /root/.ssh)
Copy content of file (public key) from Rundeck server to authorized_keys file on node machine
Repeat same step for every new node (copy public key from Rundeck server to /root/.ssh/authorized_keys file on every node

Running command

Now when we added node, we can run command on it, from Rundeck server go to commands-type command
From nodes, type node name-Click Run on node




Key storage

Private key uploaded to Rundeck server in previous steps are located locally on Rundeck server

/var/lib/rundeck/var/storage/content/keys// folder




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s