
Deploy ERPNext v16 | Odoo Alternative, 2 Services Not 4, No Build Step
Open-source ERP: accounting, stock, manufacturing, HR, CRM. Nothing to set.
Just deployed
/var/lib/mysql
Just deployed
/home/frappe/frappe-bench/sites
Deploy and Host ERPNext on Railway
ERPNext is a complete open-source ERP — double-entry accounting, inventory and warehouses, buying and selling, manufacturing (BOMs, work orders, capacity planning), projects, HR and payroll, a built-in CRM, and a website/portal builder — all on the Frappe framework, with a REST API over every document type and a low-code builder for your own doctypes, workflows and print formats. It is the open-source alternative people reach for instead of Odoo, NetSuite or SAP Business One.
This template deploys ERPNext v16.30.0 as two services — the application and MariaDB — off images pinned to an exact version. There is no build step: both images are prebuilt, so the deploy is a pull, not a fifteen-minute compile. The deploy form has nothing you have to fill in.
About Hosting ERPNext
ERPNext is not one process. A working install needs the web server, a background worker for every queued job (emails, stock reposts, ledger rebuilds, scheduled reports), a scheduler for cron-driven documents, a socket.io service for realtime updates, redis for the cache and the job queues, and nginx in front to serve the built assets and route the websocket. frappe_docker splits those across six containers around a shared sites/ volume.
That shared volume is the thing Railway does not offer: a Railway volume attaches to exactly one service, and frappe's web, worker and scheduler all read and write the same sites/ directory. So on Railway, ERPNext is a single container by necessity — this template runs the full process set under honcho, exactly as bench start does, and if any one process exits the container is torn down and restarted rather than left half-running.
Three things this template does differently from the other ERPNext listings:
- Prebuilt, pinned images instead of a repo build. Every other ERPNext listing here points Railway at a GitHub repository, so each deploy runs a full ERPNext image build on your account's build minutes, against a base tag that moves — two deploys a fortnight apart are not the same software. Here the version is the tag:
frappe/erpnext:v16.30.0, wrapped asghcr.io/bon5co/erpnext-railway. Nothing compiles at deploy time. - Two services, not four. Frappe wants three redis databases — cache, queue, socketio — which the other listings satisfy with two extra always-on redis containers. This image runs one redis beside the bench (db
0for cache, db1for queue and socketio), which is what a development bench does anyway. You pay for the app and the database, and nothing else. - Custom domains work without re-creating the site. The site directory is named
erpand nginx passes that fixed name asX-Frappe-Site-Nameon every request, so frappe resolves the same site whateverHostit arrives with. Listings that name the site afterRAILWAY_PUBLIC_DOMAINserveSite not foundthe moment you attach your own domain — the site would have to be created again under the new name.
Sizing: expect roughly 400–500 MB for the application container (nginx, gunicorn, one worker, scheduler, socketio, redis) and 250–350 MB for MariaDB at idle, so the Hobby plan is enough to start. GUNICORN_WORKERS and FRAPPE_WORKER_QUEUES are ordinary Railway variables — raise them when the ERP is carrying real users.
First boot takes 5–10 minutes. The entrypoint runs bench new-site --install-app erpnext, which creates the database, installs both apps and builds several hundred doctypes before anything listens on a port. The healthcheck is set to wait for it. Every later boot finds the existing site and starts in seconds.
Why Deploy ERPNext 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 ERPNext 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.
- No build minutes and no drift — prebuilt images mean the deploy is a pull, and the version you deployed is the version that redeploys six months from now.
- Nothing to configure — the database host, the root password and the
Administratorpassword are all generated and wired at deploy time. The form is empty. - A cheap ERP to leave running — two always-on containers instead of four, on a platform that bills what you use rather than a per-user seat price.
- Your own domain, your own data — attach a custom domain in the Railway UI and it works; the site and its uploads live on your volume.
- Room to grow into — ERPNext is a real ERP, not a demo. The same deploy carries you from one bookkeeper to a manufacturing team.
Common Use Cases
- Replacing per-seat ERP or accounting SaaS — full double-entry accounting, invoicing, purchase and sales cycles, and stock control without a per-user subscription.
- Inventory and manufacturing for a small producer — multi-warehouse stock, BOMs, work orders and material requests, with the ledger and the warehouse in the same system.
- A back office your own software can drive — every doctype is exposed over the REST API, so an existing storefront or app can create customers, sales orders and payment entries directly.
Dependencies for ERPNext Hosting
- MariaDB 11.8 (included in this template) on a volume at
/var/lib/mysql, configured for utf8mb4 withinnodb_read_only_compressed=0— ERPNext fails at site creation on a stock server that is still defaulting to latin1. - Redis (included, inside the application container) for the cache, the job queues and realtime.
- A volume for
sites/(included) at/home/frappe/frappe-bench/sites— the site database config, every uploaded file and every generated print format live there. - An SMTP provider — optional and not part of the template. ERPNext sends invoices, notifications and password resets by email; add an Email Account under Settings after deploying.
Deployment Dependencies
- ERPNext — the upstream ERP (GPL-3.0)
- Frappe Framework — the application framework underneath it
- frappe/erpnext Docker image — the upstream image this template pins (
v16.30.0) - frappe_docker — upstream's container documentation and reference compose files
- bon5co/erpnext-railway — the open-source Railway wrapper images (Dockerfiles, entrypoint, Procfile) this template deploys
Implementation Details
Wait for the erpnext service to go green — the first deploy is creating the site, and the log line railway-entrypoint: site created marks the end of it. Then open your Railway domain and log in:
- Username:
Administrator - Password: the value of
ADMIN_PASSWORDon theerpnextservice (Variables tab)
The setup wizard runs on first login and asks for your company name, fiscal year, currency and chart of accounts. Change the Administrator password from Settings once you are in.
Useful variables on the erpnext service, all with working defaults:
| Variable | Default | What it does |
|---|---|---|
SITE_NAME | erp | site directory name; changing it after first boot creates a second, empty site |
GUNICORN_WORKERS | 2 | web concurrency |
GUNICORN_THREADS | 4 | threads per web worker |
FRAPPE_WORKER_QUEUES | short,default,long | queues the background worker consumes |
CLIENT_MAX_BODY_SIZE | 50m | upload size limit |
Do not set a start command on either service. Both images do their Railway-specific work in their ENTRYPOINT — the volume chown, the site creation, the MariaDB configuration — and a Railway start command replaces ENTRYPOINT rather than adding to it.
Check the stack is healthy at any time:
curl https://your-app.up.railway.app/api/method/ping
# {"message":"pong"}
Template Content
