How to install and configure Rudder on Ubuntu/Debian

Rudder is a web-based, open-source IT infrastructure configuration and automation platform that helps configure and manage systems in any organization. It allows you to automate complex configurations and control your IT infrastructure while respecting security guidelines.


Rudder has two main components: the root server and the node. The Root Server defines the configurations of the managed nodes, while the nodes are the systems managed by the Root Server.

Here is how to install and configure Rudder root server and nodes on Debian/Ubuntu.


Installing Rudder Root Server on Debian/Ubuntu

To install Rudder root server on Debian/Ubuntu, you can use the official repository. The Rudder Root Server requires Java RE as a prerequisite. To install Java on Debian/Ubuntu, use the following command:

sudo apt install default-jre

Then add the Rudder repository key using the following command:

sudo wget --quiet -O /etc/apt/trusted.gpg.d/rudder_apt_key.gpg https:

Next, add the Rudder repository to your system:

echo "deb http:

Update the repository index with:

sudo apt update

You can now install the Rudder root server using the following command:

sudo apt install rudder-server

Configuring the Rudder Root Server

Once the Rudder Root Server is installed, you need to configure it. Create a user account that you will use to log in to the Rudder Web UI. Open the terminal and run the following command to create the user account:

sudo rudder server create-user -u 

Then set the password for this user account.

For smooth operation, you will need to open TCP ports 5309 and 443 on your server’s firewall. Use the following commands to do this:

sudo ufw allow 443/tcp
sudo ufw allow 5309/tcp

Access the Rudder web interface by navigating to the Rudder root server IP address or hostname using a web browser:

https://<ipaddress>/rudder

Log in to the web interface using the username and password you created above. Next, in the left sidebar of the Rudder web interface, navigate to Admin > Settings.

Below General settingsgo to Authorized networks. Here, configure the networks from which you want to allow nodes to connect to the Rudder server. Add the networks in the Network ID/Mask format.

For example, to allow the node with an IP address of 192.168.42.137/24 to connect to the Rudder server, you would add it as 192.168.42.0/24.

If you need to restart the root server, use the following command:

sudo systemctl restart rudder-server

Installing Rudder Agent on Debian/Ubuntu

To manage a node or host on Rudder, you need to install an agent. You can use the official repository to install Rudder agent on nodes. Start by adding the Rudder repository GPG key to your system using the following command:

sudo wget --quiet -O /etc/apt/trusted.gpg.d/rudder_apt_key.gpg "https://repository.rudder.io/apt/rudder_apt_key.gpg"

Then add the Rudder repository to your system using the following command:

echo "deb http:

Update the repository index by typing:

sudo apt update

You can now install the Rudder agent using the following command:

sudo apt install rudder-agent

Rudder Agent Configuration

After installing the Rudder agent, you will need to enable its contact with the Rudder root server. You can achieve this in two ways: either by adding the IP address or host name of the Rudder root server in the /var/rudder/cfengine-community/policy_server.dat case:

echo sudo tee /var/rudder/cfengine-community/policy_server.dat

Or, by running the following command, replacing with the IP address or host name of the Rudder root server:

sudo rudder agent policy-server <ip-or-hostname>

If you need to restart the Rudder agent, use the following command:

sudo rudder agent restart

Adding a node to the Rudder server

After installing and configuring the Rudder agent on the node, an inventory (containing hardware and software information) will be sent to the root server to register the node.

On the left sidebar of the Rudder web interface, navigate to Node management > Pending nodes. You will see your new node listed in the pending nodes window. Select the node by checking the box next to it and click Accept.

Then click Accept in the next window to confirm it. Now your node will be added to the Rudder server.

To view all managed nodes on the Rudder server, navigate to Node management > Nodes.

Click on a node to display all the information associated with it. If you don’t see the node listed under Pending nodesyou can manually run the agent and trigger an inventory using one of the following commands:

sudo rudder agent inventory

Or

sudo rudder agent run

Uninstalling the Rudder Agent from a Node

To uninstall the Rudder agent on the node, use the following command:

sudo apt remove rudder-agent

After uninstalling the Rudder agent, run the following command to verify that none of the Rudder services are running:

ps aux | grep rudder

Also delete the Rudder directories:

sudo rm -rf /opt/rudder
sudo rm -rf /var/rudder

After completely removing the Rudder Agent from the node, you will also need to remove the node from the Rudder Root Server. Go to Node management > Nodes. From there, select the node you want to delete.

Under the Summary page, click the Wipe off to remove this node from the root server. Now the Rudder root server will no longer manage the node.

Uninstalling Rudder Root Server on Ubuntu/Debian

To uninstall the Rudder root server from Ubuntu, run the following command:

sudo apt remove rudder-server

To verify that none of the Rudder services are running, run the following command:

ps aux | grep rudder

Also remove the Rudder related directories from the root server:

sudo rm -rf /opt/rudder
sudo rm -rf /var/rudder

Automate and manage your infrastructure from a central server

Rudder helps you save time and increase efficiency by automating and managing your IT infrastructure. You should now be able to install and configure the Rudder infrastructure management platform on Ubuntu and Debian.

As an alternative to Rudder, you can use the free and open-source automation platform Ansible. It is available for multiple platforms including Linux, Windows, and Mac.

Comments are closed.