Deploy GitHub Actions Runner

Deploy GitHub Actions Runner on Railway. Self-hosted CI runner. One click.

Deploy GitHub Actions Runner

GitHub Actions Runner

actions/actions-runner:latest

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

VariableDefaultDescription
ACCESS_TOKEN(required)GitHub token, kept out of the job environment
RUNNER_SCOPEreporepo or org
GH_OWNER(required)GitHub user or organization name
GH_REPORepository name (repo scope only)
RUNNER_NAMErailwayName prefix, a random suffix is added on each start
RUNNER_LABELSrailwayExtra labels, comma-separated
RUNNER_GROUPRunner group (org scope only)
RUNNER_EPHEMERALtrueOne job per registration, clean workspace every job
RUNNER_CLEAN_STALEtrueRemove offline runners with the same prefix on start
RUNNER_DISABLE_UPDATEfalseDisable runner self-update
RAILWAY_DEPLOYMENT_DRAINING_SECONDS900Time a running job gets to finish on redeploy
RUNNER_SCRIPTstartup scriptDo 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

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
121
View Template
Evolution API with n8n
Automate WhatsApp workflows with Evolution API, n8n, and Postgres.

codestorm
125
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
865