Wsl server TS Host

hello, I have an information, I have done WSL, linux on windows, via ssh control I would like to host my linux server on windows so that it will work via WSL but when I start the server I can’t connect to the server on my pc by running localhost:9987, do you know how to solve it? and how can I get into the ts server locally from my client? and also maybe how to host it so that my friends can run it too?

Might I ask why you don’t want to use the windows server? Going through WSL just complicates things by a lot.

But regarding your issue at hand:
It should work according to Microsoft (see here), but we all know M$…
You somehow need to forward the traffic from windows to the WSL. There are several possibilities to do that.

  1. If you are using Windows 11 and WSL 2 you can configure the mirrored networking mode as described here.
  2. Alternatively you can setup a forwarding rule in your firewall like this.

For others to access there are multiple options. You can either setup port forwarding in your router, open up your Windows Firewall, possibly configure DynDNS and/or a reverse proxy through a VPN tunnel, or alternatively use a solution like Hamachi or Zerotier, (neither of which I’d really recommend).

Tbh. you might be better off just renting a server with an ATHP for cheap to not have the hassle and potential security concerns you get from self hosting.

2 Likes