User Account for Self-Hosted Runner on Linux #24643
-
I’m installing build runners on Linux VMs in our org, and configuring them to run as a service. The instructions are mostly clear, but there are three things that are confusing me: First question: touch: cannot touch ‘.env’: Permission denied I see some people online suggest setting RUNNER_ALLOW_RUNASROOT to get past this; but I feel like I must be doing something wrong. Am I installing the runner in the wrong place? Should I or should I not be using sudo? Second question: Third question: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
So after some experimentation, I got it working. Here’s what I’ve found: The proper approach seems to be to create a “github_runner” user account first, then sudo into that user account and install the runner to ~/action-runner. My three issues all seem to have stemmed from the fact I was trying to install off the root (/) instead of home (~). So I guess the main takeaway from this post is that I think there should be some additional documentation when setting up a Linux build runner specifically (https://github.com/organizations/<org>/settings/actions/runners/new?arch=x64&os=linux), letting users know to create a user account first, sudo into it, and install the runner to the user account’s home (~). This differs from the Windows install directions–which recommend installing to C:\action-runner–and I think is worth calling out specifically to avoid confusion. |
Beta Was this translation helpful? Give feedback.
So after some experimentation, I got it working. Here’s what I’ve found:
The proper approach seems to be to create a “github_runner” user account first, then sudo into that user account and install the runner to ~/action-runner. My three issues all seem to have stemmed from the fact I was trying to install off the root (/) instead of home (~).
So I guess the main takeaway from this post is that I think there should be some additional documentation when setting up a Linux build runner specifically (https://github.com/organizations/<org>/settings/actions/runners/new?arch=x64&os=linux), letting users know to create a user account first, sudo into it, and install the runner to the user accoun…