---
title: "Deploy Github Actions Runner"
description: "Deploy a scalable self-hosted GitHub Actions Runner."
category: "Automation"
url: https://railway.com/deploy/pXId5Q
---

# Deploy Github Actions Runner

Deploy a scalable self-hosted GitHub Actions Runner.

**[Deploy Github Actions Runner on Railway](https://railway.com/template/pXId5Q)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/pXId5Q/manifest.json

- **Creator:** echohack
- **Category:** Automation
- **Total deploys:** 161

## Template content

### myoung34/github-runner https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/githubactions/githubactions-original.svg

- **Image:** myoung34/github-runner

## Documentation

![GitHub Actions Runner Banner](https://res.cloudinary.com/railway/image/upload/v1746548005/docs/github-actions/DL-V2-LinkedIn_FB_nuym8w.webp)


# GitHub Actions Self Hosted Runners

View a complete tutorial here -> https://docs.railway.com/tutorials/github-actions-runners

1. Setup an `ACCESS_TOKEN`. This will enable the runner to self register with your GitHub organization or enterprise.
2. Add any extra labels you want for your runners.
3. Deploy the template.
4. Click on your new Service -> Settings -> Regions. Select the region(s) you want and the number of replicas you want.
5. Deploy the changes and run some GitHub Actions!

## Setup a fine-grained PAT
1. Create a new fine-grained personal access token. Setup -> https://github.com/settings/personal-access-tokens
2. Set the Resource owner as your organization. Alternatively, you can select your Enterprise or Repo. If you don't then you won't have access to organization scoped runners
3. Set Expiration
4. Set Repository Access
5. Under Permissions, Select Organization Permissions -> Self Hosted Runners -> Read and Write (If Enterprise, select Enterprise instead).
6. You don't need any other permissions!

## Additional Configuration
You can set up [additional configuration and settings](https://github.com/myoung34/docker-github-actions-runner?tab=readme-ov-file#environment-variables) from the GitHub repo.

## Best Practices

### Avoid Serverless
Using the Serverless Setting on this Service is not recommended and will result in idle runners disconnecting from GitHub and needing to reauthenticate. GitHub Runners have a 50 second HTTP longpoll which keeps them alive. While the runners in this template can automatically reauth with an `ACCESS_TOKEN` it will result in offline / abandoned runners.

### Avoid Docker-in-Docker
Railway's current container model does not allow for docker containers inside its containers, which means any GitHub Actions workflow that pulls a container and runs it will fail.

## About GitHub Runners on Railway
Deploying [GitHub Actions Self Hosted Runners](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners) on Railway is an excellent way to run your own CI infrastructure because you only [pay for what you use](/reference/pricing/plans). With self-hosted runners, you also unlock the ability to cache expensive and time-consuming dependencies (`node_modules`, `cargo`, etc.) or large git repositories. Best of all, Railway's built-in [replicas](/reference/scaling#horizontal-scaling-with-replicas) means you can scale your runners horizontally, or even distribute them to different data centers with just a click and redeploy. You'll save build times and costs over using standard runners, *AND* you'll unlock more sophisticated workflows -- without needing a PhD in DevOps.

```
# Deploy and Host, ## About Hosting, ## Why Deploy, ## Common Use Cases, ## Dependencies for, ### Deployment Dependencies
```

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