instruction: How do you implement autoscaling for GitHub Actions self-hosted runners?
output: Configuring the self-hosted runner application as a service - GitHub Docs Skip to main content GitHub Docs Version: Free, Pro, &amp; Team Search or ask Copilot Search or ask Copilot Select language: current language is English Search or ask Copilot Search or ask Copilot Open menu Open Sidebar GitHub Actions / How-tos / Manage runners / Self-hosted runners / Configure the application Home GitHub Actions Get started Quickstart Understand GitHub Actions Continuous integration Continuous deployment Actions vs Apps Concepts Workflows and actions Workflows Variables Contexts Expressions Reusable workflows Custom actions Deployment environments Concurrency Workflow artifacts Dependency caching Notifications for workflow runs Runners GitHub-hosted runners Larger runners Self-hosted runners Private networking Runner groups Runner scale sets Actions Runner Controller Support for ARC Security Secrets GITHUB_TOKEN OpenID Connect Artifact attestations Script injections Compromised runners Kubernetes admissions controller Metrics Billing and usage How-tos Write workflows Use workflow templates Choose when workflows run Trigger a workflow Control jobs with conditions Control workflow concurrency Choose where workflows run Choose the runner for a job Run jobs in a container Choose what workflows do Use jobs Find and customize actions Use GitHub CLI Add scripts Use secrets Use variables Pass job outputs Set default values for jobs Deploy to environment Run job variations Reuse automations Reuse workflows Create workflow templates Share across private repositories Share with your organization Secure your work Use artifact attestations Use artifact attestations Increase security rating Enforce artifact attestations Verify attestations offline Manage attestations Security harden deployments OIDC in AWS OIDC in Azure OIDC in Google Cloud Platform OIDC in HashiCorp Vault OIDC in JFrog OIDC in PyPI OIDC in cloud providers OIDC with reusable workflows Deploy Configure and manage deployments Control deployments View deployment history Manage environments Review deployments Create custom protection rules Configure custom protection rules Deploy to third-party platforms Node.js to Azure App Service Python to Azure App Service Java to Azure App Service .NET to Azure App Service PHP to Azure App Service Docker to Azure App Service Azure Static Web App Azure Kubernetes Service Amazon Elastic Container Service Google Kubernetes Engine Sign Xcode applications Create and publish actions Manage custom actions Create a CLI action Set exit codes Publish in GitHub Marketplace Release and maintain actions Manage workflow runs Manually run a workflow Re-run workflows and jobs Cancel a workflow run Disable and enable workflows Skip workflow runs Delete a workflow run Download workflow artifacts Remove workflow artifacts Manage caches Approve runs from forks Manage runners GitHub-hosted runners Use GitHub-hosted runners Customize runners View current jobs Connect to a private network Connect with OIDC Connect with WireGuard Self-hosted runners Add runners Run scripts Customize containers Configure the application Use proxy servers Apply labels Use in a workflow Manage access Monitor and troubleshoot Remove runners Larger runners Manage larger runners Control access Use larger runners Monitor workflows Use the visualization graph View workflow run history View job execution time Add a status badge Use workflow run logs Enable debug logging Troubleshoot workflows Administer View metrics Get support Reference Workflows and actions Workflow syntax Events that trigger workflows Workflow commands Variables Expressions Contexts Deployments and environments Dependency caching Reusable workflows Metadata syntax Workflow cancellation Dockerfile support Runners GitHub-hosted runners Larger runners Self-hosted runners Security Secure use Secrets OIDC Limits GitHub Actions Importer Supplemental arguments and settings Custom transformers Tutorials Create an example workflow Build and test code Go Java with Ant Java with Gradle Java with Maven .NET Node.js PowerShell Python Ruby Rust Swift Xamarin apps Authenticate with GITHUB_TOKEN Create actions Create a JavaScript action Create a composite action Publish packages Publish Docker images Publish Java packages with Gradle Publish Java packages with Maven Publish Node.js packages Manage your work Add labels to issues Close inactive issues Add comments with labels Schedule issue creation Store and share data Use containerized services Create a Docker container action Use Docker service containers Create PostgreSQL service containers Create Redis service containers Migrate to GitHub Actions Automated migrations Use GitHub Actions Importer Azure DevOps migration Bamboo migration Bitbucket Pipelines migration CircleCI migration GitLab migration Jenkins migration Travis CI migration Manual migrations Migrate from Azure Pipelines Migrate from CircleCI Migrate from GitLab CI/CD Migrate from Jenkins Migrate from Travis CI Use Actions Runner Controller Quickstart Authenticate to the API Deploy runner scale sets Use ARC in a workflow Troubleshoot GitHub Actions / How-tos / Manage runners / Self-hosted runners / Configure the application Configuring the self-hosted runner application as a service You can configure the self-hosted runner application as a service to automatically start the runner application when the machine starts. Platform navigation Mac Windows Linux In this article Installing the service Installing the service Starting the service Checking the status of the service Stopping the service Uninstalling the service Customizing the self-hosted runner service Customizing the self-hosted runner service Note You must add a runner to GitHub before you can configure the self-hosted runner application as a service. For more information, see Adding self-hosted runners . For Linux systems that use systemd , you can use the svc.sh script that is created after successfully adding the runner to install and manage using the application as a service. On the runner machine, open a shell in the directory where you installed the self-hosted runner application. Use the commands below to install and manage the self-hosted runner service. Note Configuring the self-hosted runner application as a service on Windows is part of the application configuration process. If you have already configured the self-hosted runner application but did not choose to configure it as a service, you must remove the runner from GitHub and re-configure the application. When you re-configure the application, choose the option to configure the application as a service. For more information, see Removing self-hosted runners and Adding self-hosted runners . You can manage the runner service in the Windows Services application, or you can use PowerShell to run the commands below. Note You must add a runner to GitHub before you can configure the self-hosted runner application as a service. For more information, see Adding self-hosted runners . On the runner machine, open a shell in the directory where you installed the self-hosted runner application. Use the commands below to install and manage the self-hosted runner service. Installing the service Stop the self-hosted runner application if it is currently running. Install the service with the following command: sudo ./svc.sh install Alternatively, the command takes an optional user argument to install the service as a different user. ./svc.sh install USERNAME Installing the service Stop the self-hosted runner application if it is currently running. Install the service with the following command: ./svc.sh install Starting the service Start the service with the following command: sudo ./svc.sh start Note On Debian-based Linux systems (such as Debian or Ubuntu) with needrestart enabled, you can prevent needrestart from restarting the runner service during a workflow job by configuring it to ignore the runner service. Run the following command: echo '$nrconf{override_rc}{qr(^actions\.runner\..+\.service$)} = 0;' | sudo tee /etc/needrestart/conf.d/actions_runner_services.conf Start-Service "actions.runner.*" ./svc.sh start Checking the status of the service Check the status of the service with the following command: sudo ./svc.sh status Get-Service "actions.runner.*" ./svc.sh status For more information on viewing the status of your self-hosted runner, see Monitoring and troubleshooting self-hosted runners . Stopping the service Stop the service with the following command: sudo ./svc.sh stop Stop-Service "actions.runner.*" ./svc.sh stop Uninstalling the service Stop the service if it is currently running. Uninstall the service with the following command: sudo ./svc.sh uninstall Remove-Service "actions.runner.*" ./svc.sh uninstall Customizing the self-hosted runner service If you don't want to use the above default systemd service configuration, you can create a customized service or use whichever service mechanism you prefer. Consider using the serviced template at actions-runner/bin/actions.runner.service.template as a reference. If you use a customized service, the self-hosted runner service must always be invoked using the runsvc.sh entry point. Customizing the self-hosted runner service If you don't want to use the above default launchd service configuration, you can create a customized service or use whichever service mechanism you prefer. Consider using the plist template at actions-runner/bin/actions.runner.plist.template as a reference. If you use a customized service, the self-hosted runner service must always be invoked using the runsvc.sh entry point. Help and support Get quick answers! Ask Copilot your question. Ask Copilot Did you find what you needed? Yes No Privacy policy Help us make these docs great! All GitHub docs are open source. See something that&#x27;s wrong or unclear? Submit a pull request. Make a contribution Learn how to contribute Still need help? Ask the GitHub community Contact support Legal © 2025 GitHub, Inc. Terms Privacy Status Pricing Expert services Blog