Push to your own git. Railway still builds.
Railway builds when you push to GitHub or GitLab. Not if your git lives on Gitea, Forgejo or Codeberg.
I keep my code on my own Gitea. I didn't want a GitHub copy, and I didn't want a runner whose only job was to run railway up. So I built a small bridge.
You deploy it as a Railway service and point it at your forge. You push. The forge sends a webhook. The bridge checks the signature, downloads the source, repacks it, uploads it to Railway's build - the same path railway up uses - and discards it.
Why not something else
I looked at other ways first.
Change every Dockerfile to download source from the forge at build time. Then every project has to change, and the forge token sits in build secrets.
Run a CI runner that calls railway up on each push. Then you maintain a runner.
Mirror the repo to GitHub. Then the source lives there anyway.
I went with the bridge. One service covers every repo. The projects keep their normal Dockerfiles.
The dashboard



Click Enable, pick the service, and the bridge creates the webhook on your forge. You can set a root directory for a monorepo, or a branch, so main goes to production and develop goes to staging. The same repo can be enabled more than once. If you don't give it a forge token, you add a repo by name and create the webhook yourself.

The first visit asks you to register a passkey. That is how you sign in. The Railway token in the environment is only used to talk to Railway, never to sign you in.

If you lose your passkeys, rgb open signs you into the dashboard with a registered SSH key. If that is gone too, railway ssh still works - the bridge skips auth on localhost.
The same thing from the CLI
export RGB_BRIDGE_URL=https://your-bridge.example.com
rgb login
# status bar and enabled list
rgb status
rgb GET /api/mappings
# Enable
rgb POST /api/repos/myorg/myrepo/enable '{"railway_service_id":"...","railway_environment_id":"...","deploy_branch":"main"}'
# same repo, a subdirectory, a different service
rgb POST /api/repos/myorg/monorepo/enable '{"railway_service_id":"...","railway_environment_id":"...","root_directory":"packages/api"}'
# Remove
rgb DELETE /api/repos/myorg/myrepo
# Add SSH Key
rgb keys list
rgb keys add
rgb keys remove <id>
# open the dashboard already signed in
rgb open
nix run github:gui-wf/railway-gitea-bridge
You need a volume at /data. Without it, mappings and passkeys disappear on the next deploy.
Set RAILWAY_TOKEN to a workspace or account token. GITEA_URL defaults to Codeberg. Set GITEA_TOKEN if you want the repo picker and automatic webhooks. Then open the URL and register a passkey.
The upload path is the same one the Railway CLI uses. It is not a public API. If Railway changes it, the bridge has to change with it.
You can deploy your own at https://railway.com/deploy/railway-gitea-bridge.
(Guilherme Fontes, gui.wf. Source and the rgb CLI: https://github.com/gui-wf/railway-gitea-bridge, MIT.)