
Deploy GitHub Actions Runner
Deploy GitHub Actions Runner on Railway. Self-hosted CI runner. One click.
GitHub Actions Runner
Just deployed
Deploy and Host GitHub Actions Runner on Railway
GitHub Actions Runner is the agent that picks up and runs your GitHub Actions jobs. This template runs a self-hosted runner on the official image, configured only with variables, with no custom image or extra repo.
About Hosting GitHub Actions Runner
On every start the service asks the GitHub API for a short-lived registration token using your access token, registers a uniquely named runner and starts listening for jobs. The registration token is never stored. When Railway stops the container on a redeploy or restart, the runner waits for the running job to finish and then removes itself from GitHub, so offline runners don't pile up.
Common Use Cases
- Run CI jobs for private repositories on your own Railway compute
- Target jobs with custom labels (
runs-on: [self-hosted, railway]) - Run builds, tests, linters and deploy scripts without spending GitHub-hosted minutes
- Share one runner pool across an organization
Dependencies for GitHub Actions Runner Hosting
- A GitHub repository or organization where you are an admin
- A GitHub access token with runner admin permissions
Deployment Dependencies
Implementation Details
| Variable | Default | Description |
|---|---|---|
ACCESS_TOKEN | (required) | GitHub token, kept out of the job environment |
RUNNER_SCOPE | repo | repo or org |
GH_OWNER | (required) | GitHub user or organization name |
GH_REPO | Repository name (repo scope only) | |
RUNNER_NAME | railway | Name prefix, a random suffix is added on each start |
RUNNER_LABELS | railway | Extra labels, comma-separated |
RUNNER_GROUP | Runner group (org scope only) | |
RUNNER_EPHEMERAL | true | One job per registration, clean workspace every job |
RUNNER_CLEAN_STALE | true | Remove offline runners with the same prefix on start |
RUNNER_DISABLE_UPDATE | false | Disable runner self-update |
RAILWAY_DEPLOYMENT_DRAINING_SECONDS | 900 | Time a running job gets to finish on redeploy |
RUNNER_SCRIPT | startup script | Do not edit |
Token permissions: a fine-grained token needs Administration: Read and write on the repository, or Self-hosted runners: Read and write on the organization. A classic token needs repo or admin:org.
Quick start: fill in ACCESS_TOKEN, GH_OWNER and GH_REPO, deploy, and the runner shows up under Settings > Actions > Runners. Then use runs-on: [self-hosted, railway] in your workflow.
Railway has no Docker daemon, so jobs using container:, services: or docker build/docker run should run on ubuntu-latest. Use it only with private repositories.
Why Deploy GitHub Actions Runner 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 GitHub Actions Runner on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Author
Created and maintained by Douglas Rubim.
GitHub: https://github.com/douglasrubims
Template Content
GitHub Actions Runner
ghcr.io/actions/actions-runner:latestGH_OWNER
GitHub user or organization name
ACCESS_TOKEN
Required: GitHub token with runner admin permissions (repo or org)