HostIt is a high performance self hosted version of similar services such as Playit.gg or Ngrok used to create a tunnel to forward your local projects to the wider web. Very useful especially in cases where your ISP or router can't do port forwarding, and also provides better security than port forwarding.
- GO version 1.24.0 (Or greater) needs to be installed.
- VPS for a Linux server (With go installed as well)
- Ports 7000/7001 (agent control and data listeners), 7002 (dashboard). So ensure these ports are opened and not blocked.
- Make sure the respective folders are on the respective machines. Client + Shared for the client, and then server + shared for the server.
-
cd into the server directory Then run
./build.sh
-
Start the server.
./server.sh
-
Open the dashboard (
http://<server-host>:7002) to finish setup. First start shows the setup wizard, once finished the server has been setup. -
Optionally, run it as a service, via install-service.sh (Must be ran as sudo)
-
cd into the client dictory and run
./build.sh
-
Start the agent launcher script (the dashboard runs on
127.0.0.1:7003by default):./client.sh
-
Setup the client with the correct token and server IP.
-
Click "Save + restart agent", it should connect successfully to the server, unless something is misconfigured.
-
Optionally run it as a service, via install-service.sh (must be ran as sudo)
-
cd into the client dictory and run
.\build.ps1
-
Run the launcher:
.\client.ps1
-
Setup the client with the correct token and server IP.
-
Click "Save + restart agent", it should connect successfully to the server, unless something is misconfigured.
-
Additional note, windows is considered experimental, and untested. Expect bugs!
If you launch the server/agent from an SSH session in the foreground, it will exit when the SSH session closes. Use systemd so it keeps running in the background and can auto-restart.
- Build once:
cd server && ./build.sh - Install + start (requires sudo):
sudo sh ./server/install-service.sh - Logs:
journalctl -u hostit-server@$(systemd-escape -p "$(pwd)/server").service -f - Stop completely:
sudo systemctl stop hostit-server@$(systemd-escape -p "$(pwd)/server").service
- Build once:
cd client && ./build.sh - Install + start (requires sudo):
sudo sh ./client/install-service.sh - Logs:
journalctl -u hostit-agent@$(systemd-escape -p "$(pwd)/client").service -f - Stop completely:
sudo systemctl stop hostit-agent@$(systemd-escape -p "$(pwd)/client").service
Both dashboards now include Process → Restart / Exit.
- When running under systemd, clicking these will terminate the process and systemd will bring it back.
- If not running under systemd, it will just exit.
You CAN NOT connect via the server with your VPS IP if you're on the same NAT network, especially in games. Weird networking crap. Just connect locally.