Deploy ERPNext
Deploy and Host ERPNext with Railway
erpnext
pipech/erpnext-docker-debian
Just deployed
/home/frappe/bench/sites
mariadb
mariadb:10.6
Just deployed
/var/lib/mysql
redis-queue
redis:6.2-alpine
Just deployed
/data
redis-cache
redis:6.2-alpine
Just deployed
Deploy and Host ERPNext on Railway
What is ERPNext?
ERPNext is a free, open-source ERP (Enterprise Resource Planning) system designed for small and medium businesses. Built on the Frappe framework, it provides integrated modules for accounting, HR, CRM, inventory, manufacturing, and project management.
About Hosting ERPNext
Hosting ERPNext involves deploying the Frappe framework along with its essential services: MariaDB for data storage, Redis for caching and queuing, and a reverse proxy like Nginx. On Railway, you can containerize ERPNext, configure environment variables, and attach persistent storage volumes for durability.
Service Overview
Common Use Cases
- Running a centralized ERP system for small to mid-sized companies.
Deployment Guide
- Deploy this template to Railway.
- Execute into the
ERPNext
service using Railway’s shell or CLI. - Run the setup script inside the
ERPNext
service (this will create new-site and install ERPNext apps):su frappe -c "/home/$systemUser/$benchFolderName/railway-setup.sh"
- Exit the service once the script completes.
- Remove the default start command in the Railway project settings (so that the container uses the CMD defined in the Dockerfile).
- Set the HTTP port to 80 in
ERPNext
service configuration. - Redeploy the project to finalize the setup.
- [Optional] Configure volume backups for both Frappe and MariaDB volumes. See Railway Backups Documentation for details.
Dependencies for ERPNext Hosting
Deployment Dependencies
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.
FAQ / Limitation
Q: Why is Supervisor used?
A: Railway currently limits each volume to a single service. Since multiple ERPNext services need to access the same volume, Supervisor is required to coordinate and share volumes across services (as of 2025-09-15).
--
Q: Why isn’t site creation automated during the first service startup?
A: To reduces potential errors during setup, and these are foundational steps that service maintainers should understand and be comfortable with, such as executing into the container and running bench commands.
--
Q: Shouldn't HTTP port 80 set via template?
A: Due to a Railway limitation, there is currently no way to predefine the port of a public URL within a template (as of 2025-09-15).
Ref: Railway | How to set template public url port
--
Q: Why use slightly older versions of MariaDB and Redis?
A: We use the versions defined in the official Frappe Docker images to ensure maximum compatibility with ERPNext and its dependencies.
Template Content
erpnext
pipech/erpnext-docker-debianmariadb
mariadb:10.6redis-queue
redis:6.2-alpineredis-cache
redis:6.2-alpine