Migrate from Railway

Updated

Railway is a capable platform, and for a project with several services and a database it is often the right home. But a demo, a prototype or a single API does not need projects and environments, and after Railway's trial the free plan covers only a small monthly credit (see Railway's pricing for the current numbers). This guide moves one Railway service to APPISH. For the bigger picture, see APPISH vs Railway.

Which services move cleanly

Railway serviceMoves to APPISH?
Web app or API answering HTTPYes
MCP server, bot, webhook receiverYes (bots need a small health endpoint)
Service with a volumeOnly if it can live without the volume
Postgres, MySQL, RedisNo — keep it on Railway or move it to a hosted provider
Cron jobs, background workersNo

1. Build the image Railway was building for you

If the repository has a Dockerfile, Railway was already using it, and you can build it as is. If Railway built the service automatically, write a short Dockerfile; the Node.js and FastAPI guides have ready ones. Railway passes the port in PORT, so fix it in the Dockerfile and keep the code unchanged:

ENV PORT=8080
EXPOSE 8080

2. Copy the variables

Open the service's Variables tab and switch to the raw editor to copy them all. Two kinds need attention:

Pass each value as an image tag: env_KEY___VALUE for simple values, env64_KEY___VALUE (base64url-encoded) for URLs and keys. The docs show how to encode.

3. Push

docker buildx build --platform linux/amd64 \
  -t push.to.appi.sh/<your-push-id>/app:port_8080 \
  -t push.to.appi.sh/<your-push-id>/app:env64_DATABASE_URL___<base64url> \
  --push .

Copy the exact push address from your APPISH Dashboard. Once the slot shows Healthy, check the app at https://<your-slot>.appi.sh, then remove the service on Railway.

Keeping the database on Railway

It is fine to move only the app and leave the database where it is. Traffic then goes over the public proxy, which adds latency and may count as egress on Railway's side. For a demo that is usually acceptable; for anything busier, move the database next to the app or keep both on Railway.

Related