---
title: "Deploy GitHub Actions Runner"
description: "Deploy GitHub Actions Runner on Railway. Self-hosted CI runner. One click."
category: "Automation"
url: https://railway.com/deploy/github-actions-run-1
---

# Deploy GitHub Actions Runner

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

**[Deploy GitHub Actions Runner on Railway](https://railway.com/template/github-actions-run-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/github-actions-run-1/manifest.json

- **Creator:** RBR Digital
- **Category:** Automation
- **Total deploys:** 1

## Template content

### GitHub Actions Runner https://github.com/actions.png

- **Image:** ghcr.io/actions/actions-runner:latest
- **Start command:** `bash -c 'eval "$RUNNER_SCRIPT"'`

## Documentation

# 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

- [Self-hosted runners documentation](https://docs.github.com/en/actions/hosting-your-own-runners)
- [Official runner image](https://github.com/actions/runner/pkgs/container/actions-runner)
- [Fine-grained personal access tokens](https://github.com/settings/personal-access-tokens)

### 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

## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/github-actions-run-1
