-
-
Notifications
You must be signed in to change notification settings - Fork 264
Installation: WSL2 Windows
WSL2 (Windows Subsystem For Linux) is very experimental and not recommended. There are very few users using this method, and it is not well documented.
- Install and enable WSL2.
- 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).
-
Enable bridged networking for WSL2.
-
Alternatively: Use this Powershell script to set the appropriate Windows Firewall rules and port forward the host to WSL2. Edit line 15
$ports
to include the ports you want to forward: 10443 for accessing the scrypted UI. (Note that this option retains the NAT that WSL2 uses, and does not allow Scrypted to open arbitrary high-number ports on the host for certain components like local network WebRTC.)Note that this script requires Administrative privileges, and must be run after each boot since WSL2 may change its IP. If you must switch users to run this (i.e. WSL2 is running under a non-administrator account), then the script will not be able to detect WSL2's IP. Run the following manually in WSL2 to get the IP:
ip addr | grep -Ee 'inet.*eth0'
Then replace lines 5-10 with:
$remoteport = "<WSL2 IP from above>"
-
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.
- Open up WSL2, either using
bash.exe
orwsl.exe
. - 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
- Install
docker-ce
:
sudo apt install docker-ce docker-ce-cli containerd.io
Optional: Install docker-compose
:
sudo apt install docker-compose
- Add your user account to the
docker
group:
sudo usermod -aG docker $USER
- 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.
Scrypted Docs have moved. Please visit https://docs.scrypted.app.