You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/github/manage-github-actions-enterprise/includes/configure-self-hosted-runners.md
+36-36Lines changed: 36 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,18 @@ In the previous unit, you explored how to choose and manage GitHub-hosted and se
5
5
- Monitoring runner health and performance
6
6
- Configuring secure access using labels and IP allowlists
7
7
8
-
## Configure Self-Hosted Runners for Enterprise Use
8
+
## Configure self-hosted runners for enterprise use
9
9
10
10
Self-hosted runners in GitHub Actions provide greater flexibility and control for enterprises that require **customized environments, network access, and security hardening**. This guide covers best practices for configuring self-hosted runners, including **proxies, labels, and networking** considerations.
11
11
12
-
### 1. Setting Up a Self-Hosted Runner
12
+
### 1. Setting up a self-hosted runner
13
13
14
-
#### Step 1: Create and Register a Self-Hosted Runner
14
+
#### Step 1: Create and register a self-hosted runner
2. Click **New Runner** and select the desired OS (**Linux, Windows, or macOS**).
17
17
3. Follow the provided commands to install and configure the runner on your machine.
18
18
19
-
#### Step 2: Install & Start the Runner
19
+
#### Step 2: Install & start the runner
20
20
Run the following commands based on your OS:
21
21
22
22
**Linux/macOS**
@@ -31,10 +31,10 @@ Run the following commands based on your OS:
31
31
.\run.cmd
32
32
```
33
33
34
-
### 2. Configuring Proxies for Self-Hosted Runners
34
+
### 2. Configuring proxies for self-hosted runners
35
35
Enterprises often operate behind corporate firewalls and proxies that restrict internet access. To allow self-hosted runners to communicate with GitHub, configure proxy settings as follows:
36
36
37
-
##### Linux/macOS: Configure Proxy
37
+
##### Linux/macOS: Configure proxy
38
38
Edit the environment file to define proxy settings:
Whitelist these IPs in your firewall settings to ensure connectivity.
90
90
91
-
#### Private Network & VPN Access
91
+
#### Private network & VPN access
92
92
For enterprise workloads requiring access to private systems, configure the runner to connect via VPN or an internal network.
93
93
94
-
### 5. Security Best Practices for Enterprise Runners
94
+
### 5. Security best practices for enterprise runners
95
95
Restrict runners to trusted workflows: Prevent untrusted code from executing on self-hosted runners.
96
96
Use ephemeral runners: Automatically remove runners after jobs to prevent persistent threats.
97
97
Monitor runner activity: Log all runner actions and audit access.
98
98
Apply OS security patches: Regularly update and secure the runner machine.
99
99
100
-
### Manage Self-Hosted Runners Using Groups
100
+
### Manage self-hosted runners using groups
101
101
Runner groups allow organizations to **manage access, control workload distribution, and enforce security policies** for self-hosted runners in GitHub Actions. This guide covers how to **create, manage, and move runners between groups** effectively.
102
102
103
-
### 1. Understanding Runner Groups
103
+
### 1. Understanding runner groups
104
104
Runner groups help **organize and control** self-hosted runners within a **GitHub Enterprise or Organization**. They allow:
105
105
- Restricting which repositories can use specific runners.
106
106
- Controlling runner availability for different teams or workloads.
107
107
- Managing permissions for **specific branches, workflows, or environments**.
108
108
109
-
#### Runner Group Availability
109
+
#### Runner group availability
110
110
| GitHub Plan | Runner Groups Available? |
111
111
|-------------|--------------------------|
112
112
| GitHub Free | ❌ Not Available |
113
113
| GitHub Pro | ❌ Not Available |
114
114
| GitHub Team | ✅ Available |
115
115
| GitHub Enterprise | ✅ Available |
116
116
117
-
### 2. Creating a Runner Group
117
+
### 2. Creating a runner group
118
118
119
119
1. Go to **GitHub → Organization Settings → Actions → Runners**.
120
120
2. Click **"New group"** under **Self-Hosted Runners**.
@@ -127,27 +127,27 @@ Runner groups help **organize and control** self-hosted runners within a **GitHu
127
127
### 3. Adding Runners to a Group
128
128
Once the group is created, you can **add runners manually or during registration**.
3. Select a **new runner group** and save changes.
139
139
140
-
### 4. Managing Access and Permissions
141
-
#### Restricting Runner Group Access
140
+
### 4. Managing access and permissions
141
+
#### Restricting runner group access
142
142
**Organization-level runners:** Restrict usage to specific repositories.
143
143
**Repository-level runners:** Only selected workflows can access the runner.
144
144
145
-
Example: Restrict Access to a Specific Repository
145
+
Example: Restrict access to a specific repository
146
146
1. Navigate to **Runner Group Settings.**
147
147
2. Under **Repository Access**, select **"Only select repositories".**
148
148
3. Add the repositories that are allowed to use the runner group.
149
149
150
-
### 5. Moving Runners Between Groups
150
+
### 5. Moving runners between groups
151
151
To **reassign a runner** from one group to another:
152
152
153
153
1. Go to **GitHub → Organization Settings → Actions → Runners.**
@@ -166,20 +166,20 @@ Alternatively, unregister and re-register the runner in a different group:
166
166
- Regularly audit and update runner groups based on team requirements.
167
167
- Monitor runner usage and performance to optimize CI/CD workloads.
168
168
169
-
## Monitor, Troubleshoot, and Update Self-Hosted Runners**
169
+
## Monitor, troubleshoot, and update self-hosted runners**
170
170
Managing self-hosted runners effectively requires **continuous monitoring, proactive troubleshooting, and regular updates**. This guide covers best practices and GitHub-recommended methods for ensuring **high availability, security, and performance** of self-hosted runners.
0 commit comments