
Deploy EspoCRM | (Just Updated) Open-Source CRM That Actually Installs
Sales CRM that installs itself, with an admin password only you know
postgres
Just deployed
/var/lib/postgresql
Just deployed
/var/www/html/data
Deploy and Host EspoCRM on Railway
EspoCRM is an open-source CRM: accounts, contacts, leads and opportunities, a sales pipeline, activities and calendar, email integration, workflows, reports and a REST API. This template deploys EspoCRM 10.0.6 with a PostgreSQL database, installs it on the first boot, and hands you an administrator account whose password is generated for your deployment alone.
About Hosting EspoCRM
EspoCRM is a PHP application served by Apache, with its data in PostgreSQL and its uploads, cache and customisations on disk. Two things decide whether a self-hosted deployment actually works.
The first is the disk layout. EspoCRM's official image treats a volume mounted
on the document root as a "legacy" installation and skips its installer
entirely, so a deployment that mounts the whole application directory serves an
empty folder and a 403 Forbidden — a CRM that never existed. This template
mounts the volume on the data directory instead, and symlinks the two
customisation directories onto it, so the installer runs and your schema and
layout changes survive a redeploy.
The second is the administrator account. The official image seeds the admin user only during that one-time installation, from environment variables that fall back to the documented default password when they are left empty. This template refuses to boot without an administrator password, refuses to boot with the upstream default, and re-applies your password on every boot — so a redeploy is a working password reset, which matters because a fresh instance has no mail server to send a reset link with.
Apache is also pointed at the port Railway assigns, and the scheduled-job daemon runs alongside it so workflows, reminders and email fetching actually fire.
Why Deploy EspoCRM on Railway?
Railway gives EspoCRM the two things it needs — a managed PostgreSQL service on the private network and a persistent volume — behind a single deploy. The application and its database come up together with the credentials already wired, an HTTPS domain is issued automatically, and scaling memory or CPU is a slider rather than a server migration.
Common Use Cases
- A sales team tracking leads, opportunities and a pipeline without per-seat SaaS fees.
- A support or account-management team that needs contact history and email in one place.
- A back office automating follow-ups, reminders and reports through EspoCRM's workflow engine.
Dependencies for EspoCRM
- PostgreSQL 17 (included in this template).
- A persistent volume for uploads, cache and customisations.
Deployment Dependencies
After Deploying
- Open the public URL.
- Sign in as
adminwith the generatedESPOCRM_ADMIN_PASSWORDfrom the EspoCRM service's variables. - Change the password from within EspoCRM, or rotate it by editing that variable and redeploying.
Template Content
postgres
postgres:17.10-alpine