Secure, zero-config peer-to-peer and relay-assisted Virtual Private Network (VPN/LAN) tool.
MyNet is an open-source, self-hosted VPN application written in Go by CrosMakesGames. It creates a secure virtual private network that connects computers across firewalls, double NATs, and strict network environments using MyNet-assigned virtual IP addresses (100.64.0.0/10). With MyNet, you can easily host LAN games, SSH into remote machines, ping virtual peers, and share local services across devices without requiring public IPs or complex router configurations.
- Relay-First NAT Traversal: Connect instantly through NATs and firewalls using the official default relay server (
relay-na1.crosmakesgames.com). - Direct P2P Mode: Opt-in high-performance peer-to-peer networking with automatic UPnP port forwarding and STUN hole-punching.
- Zero Configuration: Get up and running in seconds with auto-generated 6-character network codes (e.g.,
ABC123). - Cross-Platform: Full support for Windows (WinTun driver interface) and Linux (
/dev/net/tun) onamd64architecture. - Comprehensive Device & Access Management: Real-time connection status monitoring, virtual IP assignment, device listing, network pinging, direct SSH helper, and administrative device promotion/demotion.
- Robust Security: Enforce join passwords, ban or unban unauthorized devices, and restrict administrative commands.
- Daemon & Background Mode: Run host and join sessions silently in the background (
--daemon,--quiet). - Native System Service Integration: Install seamlessly as a background system service on Linux (
systemd) or Windows (sc.exe/ NSIS installer). - Automated Deployment: Ready-to-use PowerShell and Shell scripts (
deploy-and-join.ps1,install-linux.sh --quiet --yes) for unattended IT and server installations. - Custom Relay Hosting: Standalone
mynet-relaybinary included to host custom relay servers on public VPS nodes.
Connect two devices in under 30 seconds:
Run the host command on Machine A:
mynet host relayOutputs a 6-character network code (e.g. ABC123) using the default relay relay-na1.crosmakesgames.com:8443.
Run the join command on Machine B:
mynet join relay ABC123Check assigned IP and active peers:
mynet ip # Shows your virtual IP (e.g. 100.64.0.2)
mynet devices # Lists all connected devices on the VPN
mynet ping 100.64.0.1 # Ping host deviceMyNet offers 3 flexible installation methods for Linux and Windows.
Download pre-compiled binaries for your operating system:
- Linux (
amd64):chmod +x mynet mynet-relay sudo ./mynet help - Windows (
amd64): Open PowerShell or Command Prompt as Administrator and run:.\mynet.exe help
Run the automated shell installer script:
sudo ./install-linux.shCopies mynet and mynet-relay binaries to /usr/local/bin, creates /etc/mynet and /var/lib/mynet directories, and optionally configures systemd services.
Double-click MyNet-Setup.exe to launch the step-by-step NSIS Setup Wizard:
- Welcome & License Agreement
- Select Components:
MyNet CLI,MyNet Relay Server,Windows Service,Desktop Shortcut - Choose Installation Directory (Default:
C:\Program Files\MyNet) - Finish install —
mynetis automatically added to systemPATH.
Run from an elevated PowerShell window:
# Interactive installation
.\install-windows.ps1
# Install everything silently (Relay + Windows Service + Desktop Shortcut)
.\install-windows.ps1 -Silent -Relay -Service -DesktopPrerequisites: Go 1.21 or higher, make build utility, and makensis (optional, for Windows setup wizard).
git clone https://github.com/crosmakesgames/mynet.git
cd mynet/source
# Build all binaries for Windows and Linux
make all
# Target-specific build commands:
make build-linux # Builds Linux amd64 binaries in bin/
make build-windows # Builds Windows amd64 binaries in bin/
make installer # Builds Windows NSIS installer (MyNet-Setup.exe)
make package # Builds binaries and bundles release ZIP archive
make test # Runs unit test suite
make clean # Removes build artifactsHost a network using the default relay server without opening ports:
mynet host relayTo specify a custom relay server address:
mynet host relay relay-na1.crosmakesgames.com:8443To set a custom server name and join password when hosting:
mynet host relay --name "MyGameServer" --password "SecretPass123"Host a direct peer-to-peer network (requires port forwarding TCP 8443 and UDP 8444, or UPnP support):
mynet start p2pmynet join relay ABC123Join using a specific relay address or password:
mynet join relay ABC123 relay-na1.crosmakesgames.com:8443 --password "SecretPass123" --name "LaptopClient"mynet join p2p 192.168.1.50Specify custom host port or password:
mynet join p2p 203.0.113.5:8443 --password "SecretPass123"| Task | Command | Description |
|---|---|---|
| Check Status | mynet status |
Displays active connection, role, and relay details. |
| Show Virtual IP | mynet ip |
Prints your assigned CGNAT virtual IP (100.64.0.x). |
| List Devices | mynet devices |
Lists all active peers, host status, and virtual IPs. |
| Ping Peer | mynet ping <ip> |
Tests network connectivity and latency to a peer. |
| SSH Helper | mynet ssh <user@ip> |
Opens SSH connection to a peer over the VPN. |
| Stop Hosting | mynet stop |
Stops hosting the active network session. |
| Leave Network | mynet leave |
Disconnects client from the joined network. |
| Full Cleanup | mynet remove |
Stops session, disconnects, and clears firewall rules. |
While hosting, require joiners to authenticate:
# Set join password on active network
mynet password set MySecurePassword
# Disable password requirement
mynet password offHosts and network admins can manage connected devices using device IDs:
# Ban a device from the network
mynet ban <device_id>
# Unban a previously blocked device
mynet unban <device_id>
# Promote a connected device to network admin
mynet promote <device_id>
# Demote an admin device back to standard client
mynet demote <device_id>Run commands in the background without blocking terminal sessions:
--daemon/-d: Detaches process to run in background.--quiet/-q: Silences output and automatically confirms relay prompts usingrelay-na1.crosmakesgames.com:8443.
Examples:
# Host in background quietly
mynet host relay --daemon --quiet
# Join network in background
mynet join relay ABC123 -d -qSet up MyNet to run continuously as a system background service that auto-starts on system boot.
# Install MyNet as systemd service
sudo mynet install
# Or install silently during script setup
sudo ./install-linux.sh --yessudo systemctl start mynet # Start MyNet service
sudo systemctl stop mynet # Stop MyNet service
sudo systemctl restart mynet # Restart MyNet service
sudo systemctl enable mynet # Enable auto-start on boot
sudo systemctl status mynet # Check status
sudo journalctl -u mynet -f # View real-time logsService file created at /etc/systemd/system/mynet.service.
- GUI Installer: Select Windows Service during installation via
MyNet-Setup.exe. - PowerShell / CLI:
mynet install --quiet # or .\install-windows.ps1 -Silent -Service
Run from PowerShell / CMD as Administrator:
sc.exe start MyNet # Start MyNet service
sc.exe stop MyNet # Stop MyNet service
sc.exe query MyNet # Query statusMyNet includes dedicated scripts for automated IT provisioning and headless deployments.
# Fully automated, silent full installation (binaries + systemd services)
sudo ./install-linux.sh --quiet --yes
# Binaries-only installation without services
sudo ./install-linux.sh --quiet --no# Silent installation to default directory
.\install-windows.ps1 -Silent
# Silent full install with desktop shortcut & service
.\install-windows.ps1 -Silent -Relay -Service -Desktop
# Custom install directory
.\install-windows.ps1 -Silent -InstallDir "C:\Tools\MyNet"Downloads the latest release from GitHub, installs silently, installs system service, and joins a network in one command:
powershell -ExecutionPolicy Bypass -File .\deploy-and-join.ps1 `
-NetworkCode "ABC123" `
-RelayAddr "relay-na1.crosmakesgames.com:8443" `
-Password "SecretPass" `
-AsService `
-Daemon1_silent_install_from_github.ps1: Fetches latest setup executable from GitHub and runs/Ssilent install.2_silent_join_relay.ps1 -NetworkCode "ABC123": Joins relay network in silent mode.3_full_deploy.ps1 -NetworkCode "ABC123": Downloads, installs, and connects silently in one sequence.
To run your own public or private MyNet relay server, use the standalone mynet-relay binary on a machine with a public IP address (TCP 8443 and UDP 8444).
# Start relay server (default: max 50 networks, TCP 8443, UDP 8444)
mynet-relay host
# Custom capacity and ports
mynet-relay host 100 --addr 0.0.0.0 --port 8443 --data-port 8444 --daemonOn a Linux VPS, run the automated setup script to open firewall ports (ufw / firewalld / iptables) and register the mynet-relay systemd service:
sudo ./setup-relay.sh --max-networks 100For complete relay configuration details and production hardening, visit mynet.crosmakesgames.com/website/relay/.
# Interactive uninstaller
sudo ./uninstall-linux.sh
# Complete silent purge (removes binaries, services, config /etc/mynet, data /var/lib/mynet)
sudo ./uninstall-linux.sh -y --purgesudo mynet uninstall --fullGo to Settings > Apps > Installed Apps and select MyNet, or run Uninstall.exe in C:\Program Files\MyNet.
# Interactive uninstall
.\install-windows.ps1 -Uninstall
# Silent full purge (removes binaries, service, PATH entries, registry, and ProgramData)
.\install-windows.ps1 -Uninstall -Silent -Purgemynet uninstall --full| Command | Arguments / Flags | Description |
|---|---|---|
mynet host relay |
[relay_addr] [--name <name>] [--password <pw>] [--daemon/-d] [--quiet/-q] |
Host network via relay server (default: relay-na1.crosmakesgames.com:8443). |
mynet start p2p |
[--name <name>] [--password <pw>] [--daemon/-d] [--quiet/-q] |
Host direct P2P network (requires port forwarding / UPnP). |
mynet join relay |
<code> [relay_addr] [--password <pw>] [--name <name>] [--daemon/-d] [--quiet/-q] |
Join network via relay code. |
mynet join p2p |
<ip[:port]> [--password <pw>] [--name <name>] [--daemon/-d] [--quiet/-q] |
Join direct P2P host. |
mynet stop |
None | Stop hosting current network. |
mynet leave |
None | Disconnect from joined network. |
mynet remove |
None | Stop session, disconnect, and clear firewall rules. |
mynet status |
None | Show active network connection status and role. |
mynet ip |
None | Display assigned virtual IP address (100.64.0.x). |
mynet devices |
None | List all devices on the virtual network. |
mynet ping |
<ip> |
Ping virtual IP address of a VPN peer. |
mynet ssh |
<user@ip> |
Open SSH terminal session to virtual IP peer. |
mynet password set |
<password> |
Require password authentication for joining. |
mynet password off |
None | Disable join password requirement. |
mynet ban |
<device_id> |
Ban device from current network. |
mynet unban |
<device_id> |
Unban device. |
mynet promote |
<device_id> |
Promote connected device to admin. |
mynet demote |
<device_id> |
Demote admin device to client. |
mynet install |
[--quiet/-q] |
Install MyNet as system service. |
mynet uninstall |
[--full] [--quiet/-q] |
Uninstall system service (--full removes files, PATH, registry). |
mynet version |
None | Display version information. |
mynet help |
None | Display CLI help menu. |
| Command | Arguments / Flags | Description |
|---|---|---|
mynet-relay host |
[max_nets] [--addr <addr>] [--port <port>] [--data-port <port>] [--daemon/-d] [--quiet/-q] |
Run relay server (default: 50 networks max, 0.0.0.0:8443 TCP, 8444 UDP). |
mynet-relay stop |
None | Stop running relay server daemon. |
mynet-relay remove |
None | Stop relay server and clean up firewall rules. |
mynet-relay status |
None | Check relay server status and listening ports. |
mynet-relay install |
[--quiet/-q] |
Install relay server as system service. |
mynet-relay uninstall |
None | Remove relay server system service. |
mynet-relay version |
None | Display relay version information. |
mynet-relay help |
None | Display relay CLI help menu. |
MyNet stores JSON configuration files and state databases in platform-standard directory locations:
| OS Platform | Component | Location |
|---|---|---|
| Windows | System Config Dir | C:\ProgramData\MyNet\ |
| Client Config File | C:\ProgramData\MyNet\client.json |
|
| Server Config File | C:\ProgramData\MyNet\server.json |
|
| SQLite Database | C:\ProgramData\MyNet\server.db |
|
| Client State File | C:\ProgramData\MyNet\client_state.json |
|
| Daemon Logs | C:\ProgramData\MyNet\client.log, server.log, relay.log |
|
| Linux | Config Directory | /etc/mynet/ |
| Client Config File | /etc/mynet/client.json |
|
| Server Config File | /etc/mynet/server.json |
|
| Data Directory | /var/lib/mynet/ |
|
| SQLite Database | /var/lib/mynet/server.db |
|
| Client State File | /var/lib/mynet/client_state.json |
|
| Daemon Logs | /var/lib/mynet/client.log, server.log, relay.log |
{
"server_addr": "relay-na1.crosmakesgames.com:8443",
"password": "",
"device_name": "MyDesktop",
"data_dir": "/var/lib/mynet"
}{
"name": "mynet",
"bind_addr": "0.0.0.0",
"control_port": 8443,
"data_port": 8444,
"enable_password": false,
"network_cidr": "100.64.0.0/10",
"data_dir": "/var/lib/mynet"
}No. By default, MyNet uses relay mode (mynet host relay), which connects outbound to relay-na1.crosmakesgames.com:8443. Port forwarding is only necessary if you explicitly choose direct P2P mode (mynet start p2p).
MyNet uses the 100.64.0.0/10 CGNAT block (RFC 6598). This range is specifically designed to avoid IP conflicts with home or enterprise LAN subnets (192.168.x.x or 10.x.x.x).
Yes. Installing MyNet as a system service (mynet install on Linux or Windows) enables auto-start behavior on system boot.
Yes. Control channels and data packets transmitted over MyNet VPN virtual interfaces are authenticated and encrypted.
Networks support multiple concurrent clients. When hosting via relay, the relay server allows up to its configured max network capacity.
MyNet is open-source software published by CrosMakesGames and licensed under the MIT License. See LICENSE.txt for full license details.
- GitHub Repository: https://github.com/crosmakesgames/mynet
- Official Website: https://mynet.crosmakesgames.com
- Relay Server Guide: https://mynet.crosmakesgames.com/website/relay/