
Deploy Spug
Agentless ops platform: SSH hosts, batch jobs, deploys, cron and monitoring
Just deployed
/data
MySQL
Just deployed
/var/lib/mysql
Deploy and Host Spug on Railway
Spug is an open-source, agentless ops platform for small and medium teams. From one web UI you keep an inventory of servers and reach them over SSH: run commands on many hosts at once, open a web terminal and file manager, deploy applications, run pipelines and scheduled tasks, manage configs, and monitor sites and ports with alerts.
About Hosting Spug
Spug is a Django application with a React front end. Besides the web API it runs a websocket server for terminals and live logs, a job worker, a monitor and a scheduler, and it keeps its data in MySQL. This template runs the official Spug v4.1.2 image, pinned by digest and built from a public GitHub repo, next to Railway's MySQL. They talk over the private network, and each has its own volume. On first start Spug creates its schema and an admin account with a generated password, so there is no open setup page. The whole stack runs in about 0.3 GB of RAM.
Common Use Cases
- Run the same command or script on a group of servers and see each host's output
- Deploy applications from Git to your servers, with approvals, rollbacks and pipelines
- Schedule recurring jobs and monitor websites, ports and processes with alerts
Dependencies for Spug Hosting
- MySQL 8 (Railway's MySQL service, included)
- SSH access from Railway to the servers you want to manage
Deployment Dependencies
- Spug source, releases and docs: https://github.com/openspug/spug
- Template repo (Dockerfile, start script, changelog): https://github.com/aalfath/spug-railway-template
Implementation Details
Services in this template:
- Spug: web UI, API, websocket server, job worker, monitor and scheduler, with nginx and a private Redis in the same container. Built from
aalfath/spug-railway-template(official imageopenspug/spug:4.1.2pinned by digest). Public HTTPS domain, health check on/api/account/login/, data volume at/data. - MySQL: Railway's MySQL 8, holding Spug's users, hosts, credentials, apps, tasks and history on a volume at
/var/lib/mysql.
After deploy:
- Open the Spug service's public URL (the first start takes about a minute).
- Log in as
adminwith the value of the Spug service'sSPUG_ADMIN_PASSWORDvariable, using the standard (not LDAP) login. - Change the password under your profile, then add your servers under Hosts.
There are no prompts: the admin and database passwords are generated. Alerts (email, webhooks, chat apps), LDAP and two-factor login are optional and set in Spug's System settings. Distributing files from a host and the pipeline data-transfer node need sshfs privileges that Railway doesn't grant, so those two features are not available; everything else works. If a Spug process keeps crashing, the container exits with an error so Railway restarts it.
Updates: the Spug service builds from the template repo. When the repo moves to a new Spug release, Railway shows an "update available" notice on your project and you choose when to apply it. Read the repo's CHANGELOG.md first; schema changes are applied on start. Back up the MySQL volume before a major upgrade.
Why Deploy Spug 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 Spug 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
MySQL
mysql:8