Last active
September 3, 2024 11:52
-
-
Save kgersen/e84ccccb2553ac35f9e6b82e214da74c to your computer and use it in GitHub Desktop.
install MyDU server in Windows without Docker Desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install myDU server on Windows without Docker Desktop: | |
in a Windows terminal: | |
wsl --install | |
# this will create and install a Ubuntu VM. | |
# choose an username and a password and don't forget them! | |
# when you see a Linux prompt (colored prompt with username first), enter the following commands: | |
sudo snap install docker | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
exit | |
# this should put you in back in the original Windows terminal: | |
wsl --shutdown | |
wsl | |
cd | |
# from there install mydu server: | |
docker run --rm -it -v ./mydu:/output novaquark/dual-server-fastinstall | |
sudo chown -R $USER:$USER mydu | |
cd mydu | |
cp config/dual.yaml config/dual.yaml.ori | |
python3 scripts/config-set-domain.py config/dual.yaml http://127.0.0.1 127.0.0.1 | |
mkdir prometheus-data && sudo chmod a+w prometheus-data | |
./scripts/up.sh # this starts the server, could take longer the 1st time | |
./scripts/admin-set-password.sh admin MY_PASSWORD #choose MY_PASSWORD has you want | |
launch mydu client and connect to localhost, admin, MY_PASSWORD | |
if you wan to host a server for other people (LAN or Internet or VPN): | |
shutdown the vm: wsl --shutdown | |
create a file named wsl.config in your Windows home directory (usually c:\Users\YourLogin) | |
and put these line in the file: | |
[wsl2] | |
networkingMode=mirrored | |
firewall=false | |
[experimental] | |
sparseVhd=true | |
hostAddressLoopback=true | |
then restart the linux vm: | |
wsl | |
cd ~/mydu | |
sudo snap install jq | |
# choose one of these: | |
# for LAN only: | |
MYIP=$(ip -json route get 8.8.8.8 | jq -r ".[] .prefsrc") | |
# for Internet: | |
MYIP=$(curl -s https://api.ipify.org) | |
# for tailscale vpn: | |
MYIP=$(tailscale ip -4) | |
docker compose down | |
python3 scripts/config-set-domain.py config/dual.yaml http://$MYIP $MYIP | |
./scripts/up.sh | |
echo server is running, IP is $MYIP | |
Use the displayed IP in the MyDU client. | |
In case of Internet (public IP you'll need to redirect port 9210 to your host and router lookback/hairpinning support is required). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment