Installation¶
Build from Source¶
Requires Go 1.26+.
Cross-Compile¶
Makefile Targets¶
| Target | Description |
|---|---|
make build | Build for current OS |
make build-linux | Cross-compile for Linux amd64 |
make build-windows | Cross-compile for Windows amd64 |
make build-darwin | Cross-compile for macOS amd64 |
make build-all | Build Linux, Windows, and macOS |
make run | Build and run locally |
make clean | Remove build artifacts |
Version Injection¶
All build targets inject the version at build time via -ldflags. The version is auto-detected from the latest git tag:
Release builds (GitHub Actions) inject the exact git tag (e.g. v1.2.3) into the binary.
Verify¶
tw --version # prints: tw version v1.2.3
tw --help
tw status # works on any machine, even before setup
Terraform (cloud relays only)¶
Terraform >= 1.0 (tested with 1.16); needed only for tw relay create with a cloud provider — the manual bring-your-own-VM path does not use it.
wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform
Verify:
Other platforms and downloads: developer.hashicorp.com/terraform/install.
Shell Completion (zsh)¶
Completion is dynamic: it offers stored context names and IDs, usernames, server IDs, and application names. See Status, Service & Completion.
Install as a System Service¶
After building, you can register tw as a system service so it starts on boot and runs in the background.
1. Copy the binary to a system path:
2. Install and start the service:
This creates a systemd unit at /etc/systemd/system/tw.service that runs tw dashboard with automatic restart on failure.
3. Manage the service:
1. Place the binary in a permanent location:
2. Install and start the service (run as Administrator):
This registers a Windows service that starts automatically on boot.
3. Manage the service:
You can also manage it from the Services console (services.msc) — service name tw, display name Tunnel Whisperer.
1. Copy the binary to a system path:
2. Allow the binary in macOS security settings:
On first run, macOS Gatekeeper will block the unsigned binary. To allow it:
- Open System Settings > Privacy & Security
- Scroll to the Security section — you will see a message about
twbeing blocked - Click Allow Anyway
- Run
twagain and click Open in the confirmation dialog
Alternatively, remove the quarantine attribute directly:
3. Install and start the service:
This creates a launchd plist at /Library/LaunchDaemons/com.tunnelwhisperer.tw.plist that keeps the service running and starts it on boot.
4. Manage the service:
The service runs tw dashboard, which auto-starts the server or client based on your config mode. See Status, Service & Completion for details.
Config Directory¶
Tunnel Whisperer stores configuration in a platform-specific directory:
| Platform | Path |
|---|---|
| Linux | /etc/tw/config/ |
| macOS | /etc/tw/config/ |
| Windows | C:\ProgramData\tw\config\ |
Override with the TW_CONFIG_DIR environment variable or the --config-dir flag.
Next: Pick Your Role¶
Every machine plays one of three roles. Continue with the section for yours: