Connect devices behind NATs, CGNAT, and firewalls in seconds. Secure LAN-style networking for gaming, SSH, and remote access without complex port forwarding.
Available as a full unified package or open-source repository.
Includes Linux x86_64 binaries, shell installer scripts (install-linux.sh), systemd service integrators, and portable executables.
Includes Windows GUI Setup Wizard (MyNet-Setup.exe), PowerShell installer script (install-windows.ps1), WinTun drivers, and executables.
Full Go source code, build scripts, installer templates, and documentation. Clone and build with go build ./cmd/mynet.
| Section | Description | Jump |
|---|---|---|
| Quick Start Guide | Host or join a network in 30 seconds | → Go |
| First Network Tutorial | Connect two devices across different networks | → Go |
| System Service Setup | Auto-start MyNet on boot (Linux + Windows) | → Go |
| Silent & Automated Deployment | Non-interactive install for headless servers and CI | → Go |
| Relay Server Setup | Deploy your own private relay on a Linux VPS | → Go |
| Relay Prerequisites | What you need to run a relay server | → Go |
| Relay Quick Setup | Automated setup with setup-relay.sh | → Go |
| Relay Manual Installation | Step-by-step manual install without the script | → Go |
| Relay Configuration | CLI flags and parameters table | → Go |
| Relay Firewall Setup | UFW and firewalld rules for relay ports | → Go |
| Relay systemd Management | Install, start, stop, and uninstall the relay service | → Go |
| Connecting to Custom Relay | How clients connect to your private relay | → Go |
| Downloads | Get MyNet for Linux, Windows, or source | → Go |
Powerful virtual private networking built with Go, designed for speed, security, and simplicity.
Default relay routing connects devices behind double NAT, CGNAT, and strict firewalls out of the box with zero port forwarding required.
Encrypted control and data tunneling utilizing WinTun on Windows and native TUN devices on Linux with stateful tracking.
Native binaries for Linux and Windows. Includes GUI installation wizards, PowerShell CLI utilities, and system service managers.
Deploy your own relay server on any VPS with configurable network limits and complete privacy control whenever you want.
Host or join a virtual network in less than 30 seconds.
Download the MyNet package and run the installation script or wizard for your OS.
sudo ./install-linux.sh # Linux
.\install-windows.ps1 # Windows PowerShellRun the host command. MyNet connects to the default relay server automatically.
mynet host relayMyNet generates a unique join code (e.g. ABC123). Share it with your friends or other devices to establish connection.
Ensure MyNet is installed on the client machine.
sudo ./install-linux.sh # Linux
.\install-windows.ps1 # Windows PowerShellUse the 6-digit code provided by the host. MyNet connects through the default relay automatically.
mynet join relay ABC123You now have a virtual LAN IP. Ping other devices, access shared resources, and communicate as if on the same network.
mynet devices
mynet ping 100.64.0.1Step-by-step instructions for everyday usage, system service configuration, and automation.
Connect two devices together across different networks using the default relay.
mynet host relaymynet join relay ABC123mynet devices
mynet ping 100.64.0.1Keep MyNet running automatically in the background on startup for continuous connectivity.
sudo mynet installmynet install
# Or via PowerShell script:
.\install-windows.ps1 -Servicemynet statusDeploy MyNet non-interactively across headless servers, automated scripts, or CI pipelines.
sudo ./install-linux.sh --quiet --yes.\install-windows.ps1 -Silent -Service -Desktopmynet host relay --quiet --daemonComplete administrator guide for deploying, configuring, and managing a dedicated self-hosted MyNet relay server on a machine.
To run your own MyNet relay server, ensure your hosting environment meets the following requirements:
The fastest way to deploy a relay server is using the included setup-relay.sh script. It automatically copies binaries, sets permissions, configures systemd, and sets firewall rules.
Interactive Setup:
sudo ./setup-relay.shAutomated / Silent Setup:
sudo ./setup-relay.sh --quietIf you prefer installing without the automated setup script, follow these step-by-step instructions:
Step 1: Install Binary — Copy the mynet-relay executable to your system path and grant execution permissions:
sudo cp bin/mynet-relay /usr/local/bin/mynet-relay
sudo chmod +x /usr/local/bin/mynet-relayStep 2: Test Execution — Run the relay server directly in the foreground to verify functionality:
mynet-relay host 50Customize listen addresses, maximum hosted networks, and background execution options using CLI flags.
| Parameter / Flag | Description | Default |
|---|---|---|
max-networks | Maximum concurrent virtual networks permitted on this relay. | 50 |
--addr <addr> | Network interface IP address to bind to. | 0.0.0.0 |
--port <port> | TCP port for control signaling and handshake tunnels. | 8443 |
--data-port <port> | UDP port for encrypted peer packet relay. | 8444 |
--daemon / -d | Detaches process to run in the background. | Disabled |
--quiet / -q | Silences stdout console output. | Disabled |
mynet-relay host 100 --port 8443 --data-port 8444 --daemonEnsure your Linux firewall and VPS cloud security groups allow incoming traffic on ports 8443 TCP and 8444 UDP.
UFW (Ubuntu / Debian):
sudo ufw allow 8443/tcp comment 'MyNet Control'
sudo ufw allow 8444/udp comment 'MyNet Data'
sudo ufw reloadfirewalld (RHEL / CentOS / AlmaLinux):
sudo firewall-cmd --permanent --add-port=8443/tcp
sudo firewall-cmd --permanent --add-port=8444/udp
sudo firewall-cmd --reloadInstall Service:
sudo mynet-relay install --quietControl Service via systemctl:
sudo systemctl start mynet-relay
sudo systemctl status mynet-relay
sudo systemctl restart mynet-relayUninstall Service:
sudo mynet-relay uninstallOnce your relay is running, clients specify your server address when hosting or joining:
# Host network on custom relay:
mynet host relay my-vps.example.com:8443
# Join network on custom relay:
mynet join relay ABC123 my-vps.example.com:8443