-
-
Notifications
You must be signed in to change notification settings - Fork 341
Requirements for self hosted runners
Shivam Mathur edited this page Feb 5, 2024
·
19 revisions
Note: This guide is for using self-hosted runners without docker. To set up a docker container with a self-hosted runner follow this guide.
To set up a self-hosted runner for setup-php, make sure the following requirements are met on your system.
-
Ubuntu 20.04 (focal)
andUbuntu 18.04 (bionic)
are supported. -
The runner needs a user account having password-less sudo access, otherwise, you would have to enter the password on each workflow run.
# Add your user to the sudo group and enable password-less sudo for all sudoers.
usermod -a -G sudo "$(id -un)"
echo "%sudo ALL = (ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
- If your workflow uses services, then make sure docker is installed.
curl https://get.docker.com | sh
sudo chmod o+rw /var/run/docker.sock
- If you are using
WSL
, check thewsl
version of your distro usingwsl -l -v
.
Connect your Windows docker service to aWSL 1
distro using this guide, forWSL 2
distro follow this guide.
-
Windows 7
and above are supported. - The runner needs a user account that has Administrative privileges.
# Check that it lists Administrators in Local Group Memberships
net user $env:USERNAME | findstr "Local Group Memberships"
-
Powershell Core 6.0
or newer needs to be installed and added toPATH
environment variable.
# Setup Latest Powershell Core using windows Powershell.
Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-powershell.ps1') } -AddToPath"
- If you are using
composer
, installing7z
will speed it up onWindows
.
# Install choco
$installScript = Invoke-WebRequest -Uri "https://community.chocolatey.org/install.ps1" -UseBasicParsing
& ([scriptblock]::Create($installScript))
# Install 7-Zip
choco install -y --force 7zip.install
-
MacOS Big Sur 12.x
and above are supported. Both Intel and ARM64macOS
are supported. -
The runner needs a user account having password-less sudo access, otherwise, you would have to enter the password on each workflow run.
-
Run
visudo
sudo visudo
-
Make the following change
- %admin ALL=(ALL) ALL + %admin ALL=(ALL) NOPASSWD: ALL