How To Install Rundeck on Ubuntu 20.04 LTS

Install Rundeck on Ubuntu 20.04

In this tutorial, we will show you how to install Rundeck on Ubuntu 20.04 LTS. For those of you who didn’t know, Rundeck is a free open-source software for automation services. With Rundeck, you can create simple to complex tasks on either the local machine or on a remote server. In other words, set Rundeck up on one machine and control all your data center Linux servers from a single point of entry. Rundeck is available in Enterprise (Commercial) and Community (Free) editions. Rundeck Enterprise offers more features than the Rundeck Community edition but with the license cost.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you through the step-by-step installation of the Rundeck on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.

Install Rundeck on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Installing Java.

Rundeck is written in the Java programming language. Now we install Java to your Ubuntu system using the following command below:

sudo apt install openjdk-11-jre-headless

Verify Java installation:

java -version

Step 3. Installing MariaDB.

Use the following commands to install MariaDB on Ubuntu 20.04 (Focal Fossa):

sudo apt install software-properties-common mariadb-server mariadb-client

After the server is installed, the commands below can be used to stop, start and restart the database services:

sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl restart mariadb.service

Next, create the Rundeck database and user:

MariaDB [(none)]> CREATE DATABASE rundeckdb;
MariaDB [(none)]> CREATE USER 'rundeck_user'@'localhost' IDENTIFIED BY 'your-strong-passwd';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'rundeck_user'@'localhost' WITH GRANT OPTION;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit

Step 4. Installing Rundeck on Ubuntu 20.04.

By default, Rundeck is not available on Ubuntu 20.04 base repository. Now we add the Rundeck repository to your Ubuntu system:

sudo nano /etc/apt/sources.list.d/rundeck.list

Add the following file:

deb https://packages.rundeck.com/pagerduty/rundeck/any/ any main
deb-src https://packages.rundeck.com/pagerduty/rundeck/any/ any main

Next, import the repo signing key:

curl -L https://packages.rundeck.com/pagerduty/rundeck/gpgkey | sudo apt-key add -

After the repository has been added, Now install Rundeck using apt command, type:

sudo apt update
sudo apt install rundeck

Step 5. Configure Rundeck.

The main configuration file is /etc/rundeck/framework.properties. Edit the file to customize Rundeck:

sudo nano /etc/rundeck/rundeck-config.properties

Add the following configuration:

grails.serverURL=http://your-server-ip-address:4440
dataSource.driverClassName = org.mariadb.jdbc.Driver
dataSource.url = jdbc:mysql://localhost/rundeckdb?autoReconnect=true&useSSL=false
dataSource.username = rundeck_user
dataSource.password = PASSWORD

Also, set the correct hostname on /etc/rundeck/rundeck-config.properties:

sudo nano /etc/rundeck/rundeck-config.properties

Add the following line:

grails.serverURL=http://192.168.17.50:4440

Save and close the file, then restart the Rundeck service to apply changes:

sudo systemctl start rundeckd
sudo systemctl enable rundeckd

Step 6. Configure Firewall.

If you have an active UFW firewall, allow port 4440:

sudo ufw allow 4440/tcp

Step 7. Accessing Rundeck Web Interface.

Once successfully installed, open your web browser and access the Rundeck using the URL http://your-server-ip-address. You will be redirected to the Rundeck login page:

Install Rundeck on Ubuntu 20.04 LTS Focal Fossa

For Rundeck web interface access, Login to Rundeck web interface by using default username: admin and password: admin.

Congratulations! You have successfully installed Rundeck. Thanks for using this tutorial for installing the Rundeck on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official Rundeck website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!