FlatRun vs Railway

Railway's workflow, on a server you own.

FlatRun is an open source, self-hosted alternative to Railway. Push to deploy, preview pull requests, roll back, and share variables between projects, with your apps running as plain Docker Compose on your own server.

Open source, MIT licensed · Runs on any Linux server with Docker

Hosted platform

How FlatRun and Railway differ.

Railway and FlatRun share a model: a project holds services, every push becomes a deployment, pull requests get their own environment, and variables can point at other services. The difference is where it runs and how you pay for it.

Railway runs your services on its own infrastructure and bills a plan fee plus CPU, memory, storage and egress by the second. FlatRun runs on a server you rent or own, so the bill is the server, however many projects it holds. Each project stays an ordinary directory with a Compose file, so it keeps running if you stop using FlatRun.

Side by side

FlatRun and Railway, feature by feature.

FlatRunRailway
Where apps runYour own serversRailway's infrastructure
LicenseOpen source, MITProprietary, hosted
PricingFree. You pay for the serverPlan fee (Hobby $5, Pro $20 per workspace each month) plus usage billed per second
Compute costFixed by the server you chooseAbout $20 per vCPU and $10 per GB of memory each month
Deploy on pushGitHub, GitLab and generic webhooksYes
BuildsDockerfile, Railpack, or a Compose fileDockerfile or Railpack
Pull request previewsAn environment per pull request, removed when it closesAn environment per pull request, removed when it is merged or closed
RollbackDeploy any of the last 50 deploys againRedeploy an earlier deployment
Variable references${{ project.KEY }} and ${{ secret.NAME }}${{ service.VAR }} and ${{ shared.VAR }}
SecretsSealed, rotated on a schedule, or read from Infisical, Vault, Doppler or 1PasswordSealed variables
Sleep when idlePer project, after a set number of idle minutesServerless sleeping after inactivity
DataFolders beside the Compose fileRailway volumes
Change previewPlan and apply before a change runsStaged changes before deploy

Same ideas

Railway's words, FlatRun's words

RailwayFlatRunWhat it is on your server
ProjectProjectA directory with a Compose file
ServiceServiceA service in that Compose file
EnvironmentEnvironmentA sibling project that follows its own branch, such as shop-staging
DeploymentDeploymentOne deploy, with its commit, trigger, phase and logs
VariablesVariablesWritten to the project's .env.flatrun when it deploys
Shared variablesWorkspace secrets and referencesA value one project reads from another with ${{ project.KEY }}
VolumeData folderA bind mount beside the Compose file
TemplateTemplateA ready-made Compose project

Switching

Moving a Railway project

  1. 01

    Install FlatRun

    Run the installer on an Ubuntu or Debian server. It sets up the agent, the dashboard and the proxy.

  2. 02

    Connect the repository

    Create a project from the same GitHub or GitLab repository and branch. A Dockerfile or Railpack build works as it did on Railway.

  3. 03

    Copy variables and data

    Paste the service variables, seal the secrets, and restore database dumps into the project's database service.

  4. 04

    Point the domain

    Add the domain to the project and update DNS. FlatRun issues the certificate.

Choose FlatRun when

  • You want one fixed monthly bill instead of usage pricing.
  • Code and data must stay on hardware you choose.
  • Apps should remain ordinary Compose projects that run without the platform.
  • The same server also hosts websites and databases with domains, certificates and backups.

Choose Railway when

  • You do not want to run or patch a server at all.
  • Usage pricing suits workloads that are mostly idle or very spiky.
  • You need regions around the world without running servers in them.

Questions about Railway.

Is FlatRun a drop-in replacement for Railway?

For apps built from a repository with a Dockerfile or Railpack, the workflow is the same: connect the repository, push, preview pull requests, roll back. Railway's managed regions and per-second scaling have no equivalent; FlatRun scales on the servers you give it.

How much does running FlatRun cost?

FlatRun is free and open source. The cost is the server: a few dollars a month for a small VPS, and the same price whether it holds one project or twenty.

Can I keep using Railway's reference variables?

The syntax is close. Railway writes ${{ service.VAR }}; FlatRun writes ${{ project.KEY }} for another project's variable and ${{ secret.NAME }} for a sealed secret.

Railway details come from Railway pricing , Railway variables , Railway environments and Railway deployments . FlatRun details are in the documentation.

More comparisons

Star us on GitHub