Skip to content

Installation: WSL2 Windows

Brett Jia edited this page Sep 6, 2023 · 8 revisions

WSL2 (Windows Subsystem For Linux) installation is experimental and not recommended.

Main steps

  1. Install and enable WSL2.
  2. Install Scrypted using the standard Linux Installation instructions. Alternatively, install with the standard Docker Linux instructions (see below for more details on setting up Docker).
  3. Enable bridged networking for WSL2.

Setting up Docker on Windows

Docker can be installed either with Docker Desktop, or docker-ce within your WSL2 distribution. Alternatively, you can use podman in WSL2, though this has not yet been tested.

The following instructions are for setting up docker-ce only. These steps assume you are using Ubuntu.

  1. Open up WSL2, either using bash.exe or wsl.exe.
  2. Configure the upstream docker-ce repository:
source /etc/os-release
curl -fsSL https://download.docker.com/linux/${ID}/gpg | sudo apt-key add -
echo "deb [arch=amd64] https://download.docker.com/linux/${ID} ${VERSION_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt update
  1. Install docker-ce:
sudo apt install docker-ce docker-ce-cli containerd.io

Optional: Install docker-compose:

sudo apt install docker-compose
  1. Add your user account to the docker group:
sudo usermod -aG docker $USER
  1. Start Docker service:
sudo service docker start

Optional: Add a docker-start.bat file to your Windows startup folder (press "WindowsKey+R", then run "shell:startup") with the following contents:

wsl.exe -u root -e bash -c "service docker start"

This will ensure that Docker service is started every time your Windows machine reboots.