Skip to main content
This guide covers installing Ralph on Ubuntu using the official Debian packages. This is the recommended method for production deployments.

Overview

The Ubuntu package installation provides:
  • Python 3.10+ runtime environment
  • Settings located in /etc/ralph
  • Database configuration via debconf prompts
  • ralphctl command for Ralph management
  • Systemd service for automatic startup and management

Prerequisites

  • Clean Ubuntu 18.04 Bionic or newer installation
  • Root or sudo access
  • Internet connection for package downloads

Installation Steps

1

Add Ralph Repository

Add the official Ralph package repository and GPG key:
2

Install Required Packages

Install Ralph along with MySQL and nginx:
During installation, you’ll be prompted for database settings via debconf. For testing, the default settings are fine. You can review them later in /etc/ralph/conf.d/database.conf.
3

Configure Nginx

Edit the nginx configuration file:
Replace the contents with:
Restart nginx to apply changes:
4

Configure Database

Create the Ralph database and user:
In the MySQL prompt:
For production, use a strong password instead of ‘ralph_ng’ and consider placing the database on a separate host.
5

Initialize Database

Run database migrations to create the schema:
Create your admin superuser:
Optionally, load demo data for testing:
6

Start Ralph Service

Finalize the setup and start Ralph:
Ralph should now be running at http://localhost

Configuration Files

Ralph configuration is managed through environment variables stored in configuration files:
  • Main config: /etc/ralph/ralph.conf
  • Database: /etc/ralph/conf.d/database.conf
  • Redis: /etc/ralph/conf.d/redis.conf
  • Gunicorn: /etc/ralph/conf.d/gunicorn.conf
  • Cache: /etc/ralph/conf.d/cache.conf

Service Management

Ralph runs as a systemd service. Common management commands:

Troubleshooting

If something goes wrong, check these log files:

Common Issues

Check the logs for errors:
Common causes:
  • Database connection issues
  • Missing migrations
  • Port 8000 already in use
Verify database credentials in /etc/ralph/conf.d/database.conf and ensure:
  • MySQL service is running: sudo systemctl status mysql
  • Database user has proper permissions
  • Database exists: mysql -u ralph_ng -p -e "SHOW DATABASES;"
Ensure static files are collected and nginx can access them:

Next Steps

Once Ralph is installed:
  1. Configure Ralph for your environment - see Configuration Guide
  2. Set up SSL/TLS for production use
  3. Configure backups for your database
  4. Review security settings and change default passwords
  5. Explore the quick start guide to begin using Ralph

Configuration Guide

Learn how to configure LDAP, OpenStack sync, and other advanced features