
Deploy Databasement
Back up MySQL, Postgres, Mongo and Redis on a schedule, to S3 or a volume
Databasement
Just deployed
/data
Deploy and Host Databasement on Railway
Databasement is an open-source (MIT) database backup manager with a web UI. You register MySQL, MariaDB, PostgreSQL, MongoDB, Redis, SQLite and other servers, schedule backups, send the dumps to S3-compatible storage, SFTP or a local volume, and restore a snapshot onto any registered server from the browser or a REST API.
About Hosting Databasement
This template runs Databasement v1.10.12 (the official davidcrty/databasement image, pinned by digest) as one service built from a public GitHub repo. The web server, queue worker and scheduler run together in that container, so scheduled backups and restores work without extra services. A Railway volume at /data holds the SQLite application database and the local backup storage, so both survive redeploys and restarts. Upstream makes the first visitor to /register the super admin; this template creates the admin from generated variables before the public URL answers, so registration is closed from the start. The health check is /health.
Common Use Cases
- Schedule nightly backups of the MySQL, PostgreSQL, MongoDB or Redis databases behind your Railway apps, using their private hostnames
- Keep backup copies off-site in S3-compatible storage such as Cloudflare R2, Backblaze B2 or AWS S3, with retention rules
- Restore a snapshot onto another server to test a migration, or to seed staging with production data
Dependencies for Databasement Hosting
- One Railway service built from
aalfath/databasement-railway-template(Databasement v1.10.12) - One Railway volume at
/data(SQLite database and local backups)
Deployment Dependencies
- Databasement: https://github.com/David-Crty/databasement
- Release v1.10.12: https://github.com/David-Crty/databasement/releases/tag/v1.10.12
- Self-hosting docs: https://david-crty.github.io/databasement/self-hosting/docker
- Template repo: https://github.com/aalfath/databasement-railway-template
Implementation Details
After deploy: open the public URL and sign in as admin@databasement.local (or the ADMIN_EMAIL you set) with the generated ADMIN_PASSWORD from the service's Variables tab. Change the password in your profile. The admin is created on the first boot only: changing the two variables later does nothing, so use the profile page or php artisan user:reset-password instead. Invite more users from the Users page.
First backup: the template adds upstream's demo backup, a daily backup of Databasement's own database to the "Local Backups" volume at /data/backups. To protect another Railway database, add a server with its private hostname (for example postgres.railway.internal, port 5432) and credentials, then add an S3 or SFTP volume so the copies live outside this service's volume.
Keep APP_KEY safe: it encrypts every stored credential and, by default, encrypted backups. Don't change it after deploy unless you follow upstream's key-rotation steps.
Optional settings (add as variables): APP_DISPLAY_TIMEZONE (for example Europe/London) for schedule times, BACKUP_ENCRYPTION_KEY, SMTP mail and OAuth/OIDC login. See https://david-crty.github.io/databasement/self-hosting/configuration.
Updates: each Databasement release is a commit to the template repo with a CHANGELOG.md entry. Railway then shows an update notice in your project and you choose when to apply it. Migrations run on start.
Why Deploy Databasement on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Databasement on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Databasement
aalfath/databasement-railway-template