Ralph DCIM
Overview
Ralph is an open-source DCIM (data center infrastructure management) and asset management system. It models the physical estate the way an operations team thinks about it: data centers contain server rooms, server rooms contain racks, and racks contain hardware at specific U positions.
It also tracks back-office equipment through its whole lifecycle, plus licenses, supports, domains and networks, and exposes all of it through a REST API.
Ralph is built and released by Allegro, Poland's largest e-commerce platform, which uses it to run its own data center estate. Releases follow a dated cadence, and this image ships the 20260902.1 release.
The SecureAnyCloud image delivers Ralph on Ubuntu 24.04, served over HTTPS, with an empty database and every secret generated on the first boot of your VM.
What you get:
- Ralph 20260902.1, run from the official upstream container image pinned by immutable digest, with gunicorn bound to
127.0.0.1:8000only - nginx serving the web interface over HTTPS on port 443 with a certificate generated for your VM. Port 80 only redirects to HTTPS, plus a plain
/healthzendpoint for load balancer probes. - MySQL 8.0 and Redis 7, both from the Ubuntu archive and both on the loopback address only
- A background worker (
ralph-rqworker) for Ralph's asynchronous jobs - Ralph's full schema already migrated, with no data and no accounts, so your estate starts empty
- No default login. Ralph's upstream packaging seeds a well-known
ralph/ralphadministrator, and this image never creates it. Your VM generates its own administrator password, database passwords and Django secret key on first boot and writes them to a root-only file mysql,redis-server,docker,ralph,ralph-rqworkerandnginxas enabled and active systemd services- 24/7 SecureAnyCloud support
Ralph is developed by Allegro and distributed under the Apache License 2.0. Ralph and Allegro are trademarks of their respective owners. SecureAnyCloud is not affiliated with or endorsed by Allegro. This image packages the unmodified open-source software.
Prerequisites
You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.
Standard_B2s (2 vCPU, 4 GiB RAM) runs Ralph comfortably for a small estate. Choose a larger size for tens of thousands of assets or many concurrent users.
Network security group inbound rules: 22/tcp from your management network and 443/tcp for the web interface. Optionally allow 80/tcp, which only redirects to HTTPS.
Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Ralph DCIM by SecureAnyCloud and select Create.
On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTPS (443).
Then select Review + create, and Create.
Deploy from the Azure CLI
Replace the example values with your own resource group, VM name and region.
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:ralph-ubuntu-24-04:default:latest
az vm create \
--resource-group my-resource-group \
--name ralph-01 \
--image sac1647283583153:ralph-ubuntu-24-04:default:latest \
--size Standard_B2s \
--admin-username azureuser \
--generate-ssh-keys \
--public-ip-sku Standard
az vm open-port --resource-group my-resource-group --name ralph-01 --port 443 --priority 1001Wait for first boot to finish
The first boot generates this VM's secrets, applies the database schema and creates your administrator account before the web interface is allowed to serve anything. It normally takes under a minute. Confirm that it has finished:
sudo systemctl is-active ralph-firstboot.service
sudo test -f /var/lib/sac/data/ralph-firstboot.done && echo "first boot complete"Then confirm the whole stack is running. ralph is the application container, ralph-rqworker its background worker:
sudo systemctl is-active mysql redis-server docker ralph ralph-rqworker nginxThe image is pinned to an exact upstream digest rather than a floating tag, so every VM from this image runs byte-identical application code:
cat /etc/ralph/image-digestRetrieve your administrator password
Every VM generates its own credentials on first boot. They are written to /root/ralph-credentials.txt, readable only by root:
sudo stat -c '%a %U:%G %n' /root/ralph-credentials.txt
sudo cat /root/ralph-credentials.txtThe file contains your web address, the administrator username and password, the Ralph database credentials and the MySQL root password.
To read just the administrator login:
sudo grep -E '^RALPH_(URL|ADMIN_USER)=' /root/ralph-credentials.txtStore the password in your own secret manager. Then sign in at https://<vm-public-ip>/. The browser warns about the self-signed certificate until you add your own in Step 9.
Confirm the network surface
Only SSH and the two web ports are reachable from outside the VM. MySQL (3306), Redis (6379) and gunicorn (8000) are bound to the loopback address and cannot be reached from the network:
sudo ss -H -lnt | awk '{print $4}' | sort -u curl -s -o /dev/null -w '%{http_code} -> %{redirect_url}\n' http://127.0.0.1/Every address in that list other than 0.0.0.0:22, 0.0.0.0:80 and 0.0.0.0:443 is a loopback address.
Alongside the three application services, you also see 127.0.0.53 and 127.0.0.54 on port 53, which are the system resolver. You also see one high-numbered 127.0.0.1 port that belongs to containerd and changes on every boot. None of them is reachable from outside the VM.
Port 80 answers only with a redirect to HTTPS, plus an unauthenticated /healthz endpoint for load balancer probes:
curl -s http://127.0.0.1/healthzVerify the deployment
The image ships a self-test that signs in through nginx with your VM's own administrator password, exactly as a browser does, and then proves that a wrong password and an anonymous request are both refused:
sudo /usr/local/sbin/ralph-selftest.shYou can also check that Ralph's own published default account does not exist on your VM. It never does, because this image creates only your per-VM administrator:
sudo /usr/local/sbin/ralph-mysql -N -B -e \
"SELECT COUNT(*) AS default_account_count FROM ralph_ng.accounts_ralphuser WHERE username='ralph'"Model your estate
Sign in at https://<vm-public-ip>/ with the username and password from Step 4. Ralph opens on a dashboard that summarizes your estate. It is empty on a new VM and fills in as you add hardware.
Build the physical hierarchy from the top down, using the Data Center menu:
- Data Center: create one entry per site.
- Server Room: create the rooms inside each data center.
- Rack: create racks inside each server room, setting the rack's height in U.
- Data Center Asset: add hardware, choosing its model, status, service environment, rack and U position.
Assets are listed with their full physical path, so you can always see which data center, server room, rack and U position a machine occupies:
Filtering the asset list by rack gives you that rack's contents, which is the inventory view an engineer needs before visiting the floor:
The Back Office menu tracks non-rack equipment (laptops, phones, monitors) through the same lifecycle. Licenses, Supports and Domains attach contracts and entitlements to the assets they cover.
Use the REST API
Ralph exposes its whole data model over a REST API, which is how most teams load an existing estate in bulk and keep it in sync. Authenticate with an API token. Create it in the web interface under your username, then My API token.
The API root lists every available endpoint:
curl -s -k https://127.0.0.1/api/ -H 'Accept: application/json' | head -c 400With a token, list your data center assets. Replace <your-api-token> with the token you generated:
curl -s -k https://127.0.0.1/api/data-center-assets/ \
-H 'Authorization: Token <your-api-token>' \
-H 'Accept: application/json' | head -c 400The same API accepts POST to create assets and PATCH to update them, so you can load an existing CMDB export with a short script.
Add your own DNS name and certificate
The image generates a self-signed certificate for your VM's addresses. For production, point a DNS name at the VM and install a real certificate.
Ralph validates the Host header of every request, so first add your DNS name to the allowed hosts and trusted origins.
Edit /etc/ralph/conf.d/sac.conf and append your name to both RALPH_ALLOWED_HOSTS and RALPH_CSRF_TRUSTED_ORIGINS. The latter needs the https:// scheme. Then restart:
sudo sed -i 's#^RALPH_ALLOWED_HOSTS="\(.*\)"#RALPH_ALLOWED_HOSTS="\1,ralph.example.com"#' /etc/ralph/conf.d/sac.conf
sudo sed -i 's#^RALPH_CSRF_TRUSTED_ORIGINS="\(.*\)"#RALPH_CSRF_TRUSTED_ORIGINS="\1,https://ralph.example.com"#' /etc/ralph/conf.d/sac.conf
sudo systemctl restart ralph.serviceThen obtain a certificate. With the DNS name resolving to the VM and port 80 reachable:
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d ralph.example.comCertbot updates the nginx server block and installs a renewal timer.
Back up and restore
Everything you enter lives in the MySQL database, plus any uploaded files under /var/lib/ralph/media. Back up both.
sudo mysqldump --defaults-file=/etc/mysql/debian.cnf --single-transaction ralph_ng \
| sudo tee /var/backups/ralph-$(date +%F).sql > /dev/null
sudo tar czf /var/backups/ralph-media-$(date +%F).tar.gz -C /var/lib/ralph media
sudo ls -la /var/backups//etc/mysql/debian.cnf holds this VM's own maintenance credential, so a scheduled dump needs no password in the crontab.
Restore by loading the dump back into an empty database and restarting the application:
sudo /usr/local/sbin/ralph-mysql -e "DROP DATABASE ralph_ng; CREATE DATABASE ralph_ng CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
sudo /usr/local/sbin/ralph-mysql ralph_ng < <backup-dir>/ralph-2026-09-20.sql
sudo systemctl restart ralph.service ralph-rqworker.service </dev/nullThis replaces the whole database, so run it only against a VM you intend to overwrite.
Keep the VM patched
Ubuntu security updates are applied automatically by unattended-upgrades. Check for pending updates at any time:
sudo apt-get update && apt-get -s dist-upgrade | grep -c '^Inst ' || trueTo move to a newer Ralph release, pull the new upstream image, repin the digest, apply any new migrations and restart. Replace the tag with the release you want:
sudo docker pull allegro/ralph:<version>
sudo docker image inspect allegro/ralph:<version> --format '{{index .RepoDigests 0}}' | sudo tee /etc/ralph/image-digest
sudo /usr/local/sbin/ralph-manage migrate --noinput sudo systemctl restart ralph.service ralph-rqworker.service </dev/nullTake a backup (Step 10) before upgrading, and read the upstream release notes for the versions you are skipping.
Troubleshooting
The web interface does not answer. Check that first boot finished and the stack is up:
sudo systemctl is-active ralph-firstboot.service ralph nginx
sudo journalctl -u ralph-firstboot.service --no-pager | tail -20nginx, ralph and ralph-rqworker deliberately refuse to start until first boot has generated this VM's secrets, so all three staying inactive normally means first boot failed. The log above will say why.
The application log. Ralph logs to the journal and to /var/log/ralph:
sudo journalctl -u ralph.service --no-pager | tail -20A browser reports a CSRF or "Host" error after adding a DNS name. The name is missing from RALPH_ALLOWED_HOSTS or RALPH_CSRF_TRUSTED_ORIGINS. Revisit Step 9 and restart ralph.service.
You lost the administrator password. Set a new one directly:
# prompts twice for <new-password>, then updates the account in place
sudo /usr/local/sbin/ralph-manage changepassword ralph_adminSupport
SecureAnyCloud provides 24/7 support for this image. With any request, include the output of sudo systemctl is-active mysql redis-server docker ralph ralph-rqworker nginx and cat /etc/ralph/image-digest.
Deploy on Azure
Launch Ralph DCIM on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com