Deploy Coolify

Run the Coolify dashboard on Railway and deploy apps to your own servers.

Deploy Coolify

Just deployed

Just deployed

/var/www/html/storage/app

Just deployed

/var/lib/postgresql/data

Just deployed

/data

Deploy and Host Coolify on Railway

Coolify logo

Coolify is an open source, self-hostable platform for deploying apps, databases and services to your own servers, often described as a self-hosted alternative to Heroku, Netlify and Vercel. From one dashboard you connect servers over SSH, then deploy from Git repositories, Dockerfiles or Docker Compose, launch databases with scheduled backups, and pick from hundreds of one-click services, with automatic HTTPS on every app. Coolify is Apache-2.0 licensed with about 66,300 GitHub stars, and version 4.7.6 is the latest release. This template runs the Coolify control plane on Railway: the dashboard, background workers, realtime server, PostgreSQL 18 and Redis 8.2, all wired together with generated secrets. Your apps then run on the servers you add, such as a Hetzner, DigitalOcean or home-lab machine. Coolify Cloud manages the dashboard for you for about $5/month plus more per extra server (approximate). Running it on Railway usually costs about $10–20/month.


What This Template Deploys

ServicePurpose
proxyCaddy with the single public domain on port 8080. Sends dashboard traffic to Coolify and websocket traffic to the realtime server, so everything shares one origin.
coolifyThe Coolify app, from coollabsio/coolify:latest with a Railway boot step. Runs the dashboard, queues and scheduler. Volume at /var/www/html/storage/app for SSH keys and app files.
coolify-realtimecoollabsio/coolify-realtime, the websocket server for live logs and status updates. Private only.
PostgresPostgreSQL 18 with a volume, storing servers, projects, deployments and settings.
RedisRedis 8.2 with a volume, for queues, cache and locks.

Only the proxy is public. Every other service talks over Railway's private network.


About Hosting Coolify on Railway

Most people run Coolify on the same server as their apps. Putting the control plane on Railway keeps the dashboard online even when an app server is down or being rebuilt, and lets one dashboard manage many servers.

Your own servers, your own bill. Add any Linux server reachable over SSH and Coolify installs Docker and its proxy there. You pay the server provider directly.

Git push to deploy. Connect GitHub, GitLab, Bitbucket or Gitea, deploy on every push, and get preview deployments for pull requests.

Databases with backups. Launch PostgreSQL, MySQL, MariaDB, MongoDB, Redis and more, with scheduled backups to S3-compatible storage.

One-click services. Deploy hundreds of ready-made services, from analytics to CMS to automation tools.

Automatic HTTPS. Every app gets a free certificate on its domain.

Teams and notifications. Invite teammates, manage access, and get deploy alerts by email, Discord, Slack or Telegram.


Deploy Coolify in Under 5 Minutes

  1. Before deploying, set ROOT_USER_EMAIL on the coolify service to your own email.
  2. Click Deploy on Railway and wait for all five services to turn healthy.
  3. Open the proxy service's domain and sign in with ROOT_USER_EMAIL and ROOT_USER_PASSWORD from the coolify service variables.
  4. Under Servers, add your own server with its IP address and an SSH key, then validate it.
  5. Create a project, connect a Git source, and deploy your first app to that server.

Important: How It Differs from a Standard Install

Coolify normally manages the machine it runs on. Railway has no Docker host for it, so the built-in localhost server stays unreachable; ignore it and add your own servers instead.

The web terminal does not open sessions here, because the realtime service cannot share the SSH key volume with the app. Deployments, server checks and logs over SSH work normally; use your own SSH client for a shell.


Common Use Cases

  • Heroku or Vercel replacement: host web apps on your own servers with git-push deploys.
  • Managing many servers: one dashboard for production, staging and side-project machines.
  • Agency hosting: deploy and manage client sites on servers you control.
  • Database hosting: run databases with automatic backups on cheap VPS servers.
  • Home lab: manage apps on a home server from a dashboard that stays online.
  • Preview environments: spin up a deployment for every pull request.
  • Self-hosting open source tools: install popular services with one click.
  • Static sites and APIs: deploy front ends, APIs and workers side by side on one server, each with its own domain.

Configuration

VariableServiceDefaultDescription
ROOT_USER_EMAILcoolifyadmin@coolify.ioFirst admin email; change it before deploying
ROOT_USER_PASSWORDcoolify🔐 Auto-generatedFirst admin password, readable in the variables
ROOT_USERNAMEcoolifyRoot UserDisplay name of the first admin
APP_KEYcoolify🔐 Auto-generatedEncryption key for stored secrets; never change it
APP_URLcoolifyproxy domainPublic dashboard URL
PUSHER_APP_ID / KEY / SECRETcoolify🔐 Auto-generatedShared with the realtime server
DATABASE_URL / REDIS_URLcoolifyprivate URLsConnections to Postgres and Redis
PHP_MEMORY_LIMITcoolify512MPHP memory ceiling
APP_NAMEcoolify, realtimeCoolifyMust match on both services

Custom domain. Add your domain to the proxy service, then update APP_URL on the coolify service to match and redeploy.

Encryption key. APP_KEY encrypts SSH keys and secrets in the database. Back it up with your Postgres backups; changing it makes stored secrets unreadable.

Updates. The app and realtime images follow latest, so a redeploy installs the newest Coolify. Back up Postgres first and read the release notes.

Backups. Back up Postgres and the coolify volume. Your apps' own data lives on your servers, so back those up with Coolify's database backups or your provider's snapshots.

Firewall. Your servers must accept SSH from the internet, since Railway does not have a fixed outgoing IP address. Use key-only SSH and keep the server updated.


Getting the Most from Coolify

Start with one server. Add a single VPS, deploy one app, and confirm domains and HTTPS work before moving more.

Use a wildcard domain. Point a wildcard DNS record at your server so each app or preview gets its own subdomain automatically.

Schedule database backups. Configure S3-compatible storage once and turn on backups for every database you create.

Separate environments. Use projects and environments to keep staging and production apart.

Set resource limits. Give each app memory and CPU limits so one busy service cannot starve the others.

Watch notifications. Connect a notification channel so failed deploys and server problems reach you quickly.


Coolify vs. Alternatives

FeatureCoolify on RailwayCoolify CloudHerokuDokploy
Dashboard hostingYour Railway projectManagedManagedYour server
Apps run onYour serversYour serversHerokuYour server
LicenseApache-2.0Proprietary serviceProprietaryApache-2.0 core
Git push deploys✅✅✅✅
One-click services✅✅Add-ons✅
Web terminal❌✅✅✅
PriceAbout $10–20/month plus serversAbout $5/month plus servers (approximate)Per dynoHosting cost

Coolify Cloud is the easiest managed option. Heroku needs no servers but costs more as you grow. This template keeps a self-hosted Coolify dashboard online on Railway while your apps run on cheap servers you own.


Dependencies for Coolify Hosting

  • A Railway account.
  • At least one Linux server reachable over SSH for your apps.

Deployment Dependencies

Implementation Details

The app image prepares the Railway volume and then starts Coolify's own supervisor. The Caddy proxy splits websocket paths to the realtime server, matching the routing Coolify writes for its own installs.


Frequently Asked Questions

What is Coolify? An Apache-2.0 open source, self-hosted platform for deploying apps and databases to your own servers.

How much does it cost to host? About $10–20/month on Railway, plus whatever your app servers cost.

Do my apps run on Railway? No. Coolify runs on Railway and deploys apps to servers you add over SSH.

How do I log in? Use ROOT_USER_EMAIL and ROOT_USER_PASSWORD from the coolify service variables.

Why is the localhost server unreachable? Railway has no Docker host for Coolify to manage. Add your own servers instead.

Does the web terminal work? No. Use your own SSH client; deployments and logs work normally.


Why Deploy and Host Coolify 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 Coolify on Railway, you get an always-on self-hosted deployment dashboard that manages apps and databases on servers you own.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0