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
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.Configure Nginx
Edit the nginx configuration file:Replace the contents with:Restart nginx to apply changes:
Initialize Database
Run database migrations to create the schema:Create your admin superuser:Optionally, load demo data for testing:
Start Ralph Service
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
Ralph service won't start
Ralph service won't start
Check the logs for errors:Common causes:
- Database connection issues
- Missing migrations
- Port 8000 already in use
Cannot connect to database
Cannot connect to database
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;"
Static files not loading
Static files not loading
Ensure static files are collected and nginx can access them:
Next Steps
Once Ralph is installed:- Configure Ralph for your environment - see Configuration Guide
- Set up SSL/TLS for production use
- Configure backups for your database
- Review security settings and change default passwords
- Explore the quick start guide to begin using Ralph
Configuration Guide
Learn how to configure LDAP, OpenStack sync, and other advanced features