CLI
Run the server and client from the command line.
First, install TunGo.
Server setup
Allow incoming connections to the ports you use. See Server networking and ports.
- Linux
- Docker
Create a client configuration
sudo tungo s gen
Copy the configuration — you will need it to connect the client.
Start the server:
sudo tungo s
The commands below are for Docker Engine on Linux with access to /dev/net/tun.
Create a client configuration
docker run --rm --network host \
-v tungo_volume:/etc/tungo \
nlipatov/tungo:latest s gen
Copy the configuration — you will need it to connect the client.
The tungo_volume volume stores configurations and keys in /etc/tungo. Keep this volume when replacing the container.
Start the server
Enable packet forwarding on the host and keep it enabled after reboot:
printf '%s\n' 'net.ipv4.ip_forward = 1' 'net.ipv6.conf.all.forwarding = 1' | \
sudo tee /etc/sysctl.d/90-tungo.conf
sudo sysctl -p /etc/sysctl.d/90-tungo.conf
docker run -d \
--name tungo \
--restart unless-stopped \
--network host \
--device /dev/net/tun \
--cap-add NET_ADMIN \
-v tungo_volume:/etc/tungo \
nlipatov/tungo:latest
- Follow the logs:
docker logs -f tungo - Stop the server:
docker stop tungo - Start it again:
docker start tungo
Client setup
On Linux / macOS, create /etc/tungo if it does not exist, then save the generated client configuration as /etc/tungo/client_configuration.json. Set the file permissions to 600. These steps require administrator privileges. Start the client:
sudo tungo c
Windows
On Windows, save the configuration to %ProgramData%\TunGo\client_configuration.json. In PowerShell running as administrator:
cd "$env:ProgramFiles\TunGo"
.\tungo-windows-amd64.exe c
For arm64, replace amd64 with arm64 in the filename.