Why Rundeck?
Rundeck is a powerful open-source runbook automation platform that enables you to define, build, deploy, and manage automation across your infrastructure.
Prerequisites
Requirements
- • Ubuntu 24.04 LTS installed
- • Minimum 2GB RAM (4GB recommended)
- • Root or sudo access
- • Domain name (optional, for SSL)
Features
- • Cron-style job scheduling
- • SSH-based remote execution
- • ACL policy-based security
- • LDAP/AD integration
Initial Server Setup
Update the system and install essential utilities:
sudo apt update && sudo apt upgrade -ysudo apt install -y curl wget gnupg2 software-properties-common apt-transport-https ca-certificatesConfigure Firewall
Allow SSH and Rundeck web interface:
sudo ufw allow OpenSSH
sudo ufw allow 4440/tcp
sudo ufw enable
sudo ufw statusPort 4440 is the default Rundeck web interface port. If using Nginx reverse proxy with SSL, also open ports 80 and 443.
Method 1: Traditional Installation
Install Java
Rundeck requires Java 11 or later:
sudo apt install -y openjdk-17-jdkjava -versionecho 'export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64' | sudo tee -a /etc/environment
source /etc/environmentAdd Rundeck Repository
Import the GPG key and add the repository:
curl -fsSL https://packages.rundeck.com/pagerduty/rundeck/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/rundeck-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/rundeck-archive-keyring.gpg] https://packages.rundeck.com/pagerduty/rundeck/any/ any main" | sudo tee /etc/apt/sources.list.d/rundeck.list
sudo apt updateInstall Rundeck
Install the Rundeck package:
sudo apt install -y rundeckConfigure Rundeck
Edit the main configuration file:
sudo nano /etc/rundeck/rundeck-config.propertiesgrails.serverURL=http://YOUR_SERVER_IP:4440Also update the framework configuration:
sudo nano /etc/rundeck/framework.propertiesframework.server.name = YOUR_SERVER_IP
framework.server.hostname = YOUR_SERVER_IP
framework.server.port = 4440
framework.server.url = http://YOUR_SERVER_IP:4440Start Rundeck
Enable and start the service:
sudo systemctl enable rundeckd
sudo systemctl start rundeckdsudo tail -f /var/log/rundeck/service.logInitial startup may take a few minutes. Wait until you see a message indicating the server is ready.
sudo systemctl status rundeckdMethod 2: Docker Deployment
Install Docker
Install Docker using the official script:
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
newgrp dockerCreate Docker Compose Configuration
Create a directory and configuration file:
mkdir -p ~/rundeck && cd ~/rundeck
nano docker-compose.ymlversion: '3.8'
services:
rundeck:
image: rundeck/rundeck:5.9.0
container_name: rundeck
restart: unless-stopped
ports:
- "4440:4440"
environment:
- RUNDECK_GRAILS_URL=http://YOUR_SERVER_IP:4440
- RUNDECK_SERVER_FORWARDED=true
- RUNDECK_DATABASE_DRIVER=org.mariadb.jdbc.Driver
- RUNDECK_DATABASE_URL=jdbc:mariadb://mariadb:3306/rundeck?autoReconnect=true&useSSL=false
- RUNDECK_DATABASE_USERNAME=rundeck
- RUNDECK_DATABASE_PASSWORD=rundeck_secure_password
volumes:
- rundeck-data:/home/rundeck/server/data
- rundeck-logs:/home/rundeck/var/logs
- rundeck-plugins:/home/rundeck/libext
- rundeck-config:/home/rundeck/server/config
depends_on:
- mariadb
networks:
- rundeck-network
mariadb:
image: mariadb:10.11
container_name: rundeck-db
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=root_secure_password
- MYSQL_DATABASE=rundeck
- MYSQL_USER=rundeck
- MYSQL_PASSWORD=rundeck_secure_password
volumes:
- mariadb-data:/var/lib/mysql
networks:
- rundeck-network
volumes:
rundeck-data:
rundeck-logs:
rundeck-plugins:
rundeck-config:
mariadb-data:
networks:
rundeck-network:
driver: bridgeImportant: Replace YOUR_SERVER_IP with your actual server IP or domain, and change the database passwords to secure values.
Deploy with Docker Compose
Start the containers:
docker compose up -ddocker compose logs -f rundeckAccessing the Web Interface
Login to Rundeck
Open your browser and navigate to:
http://YOUR_SERVER_IP:4440Default login credentials:
- Username: admin
- Password: admin
Important: Change the default password immediately after your first login by clicking on the user icon → Profile.
SSL with Nginx Reverse Proxy
Install Nginx and Certbot
Install the required packages:
sudo apt install -y nginx certbot python3-certbot-nginxCreate Nginx Configuration
Create the Nginx site configuration:
sudo nano /etc/nginx/sites-available/rundeckupstream rundeck {
server 127.0.0.1:4440;
}
server {
listen 80;
server_name rundeck.yourdomain.com;
location / {
return 301 https://$server_name$request_uri;
}
}
server {
listen 443 ssl http2;
server_name rundeck.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/rundeck.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/rundeck.yourdomain.com/privkey.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
add_header Strict-Transport-Security "max-age=63072000" always;
location / {
proxy_pass http://rundeck;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_buffering off;
}
}Obtain SSL Certificate
Enable site and obtain certificate:
sudo ln -s /etc/nginx/sites-available/rundeck /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginxsudo certbot --nginx -d rundeck.yourdomain.comUpdate Rundeck for SSL
Update Rundeck configuration for HTTPS:
# /etc/rundeck/rundeck-config.properties
grails.serverURL=https://rundeck.yourdomain.com
# /etc/rundeck/framework.properties
framework.server.url = https://rundeck.yourdomain.comsudo systemctl restart rundeckdFor Docker, update the environment variable:
- RUNDECK_GRAILS_URL=https://rundeck.yourdomain.comdocker compose up -dCreating Your First Project
Create a Project
After logging in, create a project to organize jobs and nodes:
- Click New Project
- Enter a Project Name (e.g., "production-servers")
- Add a Label (human-readable name)
- Add a Description of the project's purpose
- Configure the default node source
Remote Node Access
Set Up SSH Keys
Generate SSH keys for the Rundeck service account:
sudo -u rundeck ssh-keygen -t ed25519 -f /var/lib/rundeck/.ssh/id_ed25519 -N ""sudo cat /var/lib/rundeck/.ssh/id_ed25519.pubAdd this public key to ~/.ssh/authorized_keys on each remote server you want to manage.
Add Nodes to Project
Create a resources file for your nodes:
sudo nano /var/lib/rundeck/projects/your-project/etc/resources.yamlweb-server-1:
hostname: 192.168.1.10
username: deploy
tags: web,production
osFamily: unix
osName: Ubuntu
description: Production Web Server 1
db-server-1:
hostname: 192.168.1.20
username: deploy
tags: database,production
osFamily: unix
osName: Ubuntu
description: Production Database ServerNavigate to Project Settings → Edit Nodes → Sources to add the file as a node source.
Creating and Running Jobs
Create a Job
Jobs are the core of Rundeck's automation:
- Navigate to your project and click Jobs → Create a New Job
- Enter a Job Name (e.g., "Check Disk Space")
- Optionally add a Group to organize jobs
- Add a Description
- Click Add a Step
- Select Command for shell commands
- Enter your command:
df -h - Select which nodes to run on
- Save the job
Job Scheduling
Configure Schedules
Rundeck supports cron-style scheduling:
- When editing a job, expand the Schedule section
- Enable Schedule this Job
- Choose simple scheduling or cron expression
Example cron schedules:
Every hour: 0 * * * *
Daily at 2 AM: 0 2 * * *
Every Monday 9 AM: 0 9 * * 1
First of month: 0 0 1 * *Security Hardening
Change Default Credentials
For traditional installation, update realm.properties:
sudo nano /etc/rundeck/realm.propertiesjava -cp /var/lib/rundeck/bootstrap/jetty-util-*.jar org.eclipse.jetty.util.security.Password admin newpasswordConfigure Access Control
Create custom ACL policies:
sudo nano /etc/rundeck/custom.aclpolicydescription: Limited access for operators
context:
project: 'production-.*'
for:
resource:
- allow: [read]
adhoc:
- deny: '*'
job:
- allow: [read, run]
match:
group: 'maintenance/.*'
node:
- allow: [read, run]
by:
group: operatorsLDAP/Active Directory
For enterprise environments, configure LDAP authentication:
sudo nano /etc/rundeck/jaas-loginmodule.confRDpropertyfilelogin {
com.dtolabs.rundeck.jetty.jaas.JettyCachingLdapLoginModule required
debug="true"
contextFactory="com.sun.jndi.ldap.LdapCtxFactory"
providerUrl="ldap://ldap.yourdomain.com:389"
bindDn="cn=rundeck,ou=services,dc=yourdomain,dc=com"
bindPassword="ldap_bind_password"
authenticationMethod="simple"
forceBindingLogin="true"
userBaseDn="ou=users,dc=yourdomain,dc=com"
userRdnAttribute="uid"
userIdAttribute="uid"
userObjectClass="inetOrgPerson"
roleBaseDn="ou=groups,dc=yourdomain,dc=com"
roleNameAttribute="cn"
roleMemberAttribute="member"
roleObjectClass="groupOfNames"
cacheDurationMillis="300000";
};Backup & Recovery
Traditional Installation Backup
Create an automated backup script:
#!/bin/bash
BACKUP_DIR="/backup/rundeck"
DATE=$(date +%Y%m%d_%H%M%S)
mkdir -p $BACKUP_DIR
# Stop Rundeck for consistent backup
sudo systemctl stop rundeckd
# Backup configuration
sudo tar -czf $BACKUP_DIR/rundeck-config-$DATE.tar.gz /etc/rundeck/
# Backup data directory
sudo tar -czf $BACKUP_DIR/rundeck-data-$DATE.tar.gz /var/lib/rundeck/
# Backup logs (optional)
sudo tar -czf $BACKUP_DIR/rundeck-logs-$DATE.tar.gz /var/log/rundeck/
# Start Rundeck
sudo systemctl start rundeckd
# Remove backups older than 30 days
find $BACKUP_DIR -name "*.tar.gz" -mtime +30 -delete
echo "Backup completed: $DATE"chmod +x /usr/local/bin/backup-rundeck.sh
echo "0 2 * * * root /usr/local/bin/backup-rundeck.sh" | sudo tee /etc/cron.d/rundeck-backupDocker Backup
Backup Docker volumes:
#!/bin/bash
BACKUP_DIR="/backup/rundeck"
DATE=$(date +%Y%m%d_%H%M%S)
mkdir -p $BACKUP_DIR
cd ~/rundeck
docker compose stop
# Backup all volumes
for volume in rundeck-data rundeck-logs rundeck-plugins rundeck-config mariadb-data; do
docker run --rm -v rundeck_${volume}:/source -v $BACKUP_DIR:/backup alpine tar -czf /backup/${volume}-$DATE.tar.gz -C /source .
done
docker compose start
echo "Docker backup completed: $DATE"Monitoring & Logging
Log Locations
For traditional installation:
- Service log:
/var/log/rundeck/service.log - Rundeck log:
/var/log/rundeck/rundeck.log - Execution logs:
/var/lib/rundeck/logs/
For Docker:
docker compose logs -f rundeckLog Rotation
Configure logrotate:
sudo nano /etc/logrotate.d/rundeck/var/log/rundeck/*.log {
daily
missingok
rotate 14
compress
delaycompress
notifempty
create 0640 rundeck rundeck
sharedscripts
postrotate
systemctl reload rundeckd > /dev/null 2>&1 || true
endscript
}Health Check
Create a health monitoring script:
#!/bin/bash
RUNDECK_URL="http://localhost:4440"
if curl -s -o /dev/null -w "%{http_code}" $RUNDECK_URL/api/14/system/info | grep -q "200"; then
echo "Rundeck is healthy"
exit 0
else
echo "Rundeck is not responding"
exit 1
fiIntegrate with your monitoring system (Prometheus, Nagios, etc.) for alerting.
Troubleshooting
Rundeck Won't Start
Check the service log for errors:
sudo tail -100 /var/log/rundeck/service.logCommon issues:
- Port in use: Check if another service is using port 4440
- Java memory: Increase heap size in
/etc/rundeck/profile - Database errors: Verify database credentials and connectivity
Job Execution Failures
Check execution logs:
ls -la /var/lib/rundeck/logs/Common issues:
- SSH key not accepted: Verify key permissions (600) and authorized_keys on remote hosts
- Command not found: Ensure command exists on target node and is in PATH
- Permission denied: Check user account has necessary privileges
Performance Tuning
Adjust JVM settings for better performance:
sudo nano /etc/rundeck/profileRDECK_JVM_SETTINGS="-Xms1024m -Xmx2048m -XX:MaxMetaspaceSize=512m"sudo systemctl restart rundeckdSetup Complete!
You now have a fully functional Rundeck deployment on your RamNode VPS. From simple scheduled tasks to complex multi-node orchestration workflows, Rundeck provides a solid foundation for infrastructure automation.
For advanced configurations, explore Rundeck's plugin ecosystem, webhook integrations, and API capabilities. Visit the official Rundeck documentation for more.
