Installation
The Gateway ships as a single static binary plus an installer script. The installer is profile-driven: it knows the difference between a Raspberry Pi running an embedded WiFi AP and a remote VPS acting as a federation peer.
The current public download is v2.16.0. It adds managed user accounts, static DHCP reservations and role-aware controls, and fixes live DHCP changes and policy enforcement after restart. No configuration change is required; migration 059 creates the reservations table. Nodes with reconciliation disabled now apply initial enforcement once at startup. WAN balancing remains optional and off by default. See release verification for test scope and limits.
System requirements
Section titled “System requirements”| Component | Minimum | Notes |
|---|---|---|
| OS | Debian 12+ or Ubuntu 22.04+ | apt-based distributions only |
| Kernel | Linux 5.15+ | In-kernel WireGuard and nftables required |
| Architecture | amd64 or arm64 |
No 32-bit support |
| RAM | 1 GB (node) / 2 GB (Pi) | More for high-throughput splitting |
| Storage | 2 GB free | SQLite + logs + TLS state in /var/lib/gateway/ |
| NICs | 1 (VPS) / 2 (Pi embedded) | WAN + LAN for embedded mode |
| Privilege | root | Required for nftables, ip rule, systemd unit installation |
Install profiles
Section titled “Install profiles”The installer accepts a --profile flag that controls which packages and subsystems get provisioned.
| Profile | Use it for | Includes |
|---|---|---|
rpi |
Raspberry Pi 4 home gateway | WiFi AP (hostapd + dnsmasq), Bluetooth (bluez), Tailscale, redsocks, SD hardening, build deps |
vps |
Remote Linux VPS | Mesh, redsocks, no WiFi, no SD tweaks |
node |
Federation peer / minimal node | Bare gatewayd + base packages only |
full |
Maximal install | Everything above + Gitea + Ollama + Go toolchain |
custom |
Operator-defined component set | Interactive prompts for each subsystem |
Quick install
Section titled “Quick install”git clone https://example.invalid/gateway.gitcd gatewaysudo ./scripts/install-gateway.sh --profile rpiThe rpi profile additionally:
-
installs
hostapdanddnsmasqfor the integrated WiFi AP -
installs
bluezand enables Bluetooth for PAN/NAP tethering and scanning -
enables the
wlan0regulatory domain -
tunes SD card mount options (
noatime, log to tmpfs) -
pins CPU governor to
ondemand -
pre-pulls the ARM64 build chain for in-place rebuilds
curl -fsSL https://thegateway.pro/install.sh | sudo bashThe bootstrap honours these environment variables:
| Variable | Default | Effect |
|---|---|---|
GATEWAY_PROFILE |
vps |
Install profile (see table above) |
GATEWAY_VERSION |
latest |
Pin a specific release tag |
GATEWAY_FROM_SOURCE |
0 |
Set to 1 to compile from source |
GATEWAY_BASE_URL |
CDN | Override download mirror |
GATEWAY_UPDATE |
0 |
Set to 1 to upgrade an existing installation |
sudo ./scripts/install-gateway.sh \ --profile vps \ --binary /tmp/gatewayd-linux-arm64Use this when you’ve cross-compiled the daemon elsewhere and want to skip the download.
git clone https://example.invalid/gateway.gitcd gatewaygo build -o gatewayd ./cmd/gatewayd/sudo install -m 0755 gatewayd /usr/local/bin/sudo ./scripts/install-gateway.sh --profile nodeCross-compilation for the Pi from x86 dev box:
GOOS=linux GOARCH=arm64 go build -o gatewayd-arm64 ./cmd/gatewayd/What the installer does
Section titled “What the installer does”-
Installs runtime packages on every profile: firewall and routing tools (
nftables,iptables,iproute2,conntrack), WireGuard and OpenVPN, a distro-supporteddhcpcdpackage, TLS and SSH clients, SQLite,tcpdump,ethtool,cryptsetup, system utilities, and Python with YAML support. Optional steps add WiFi, Bluetooth, mesh networking, or other selected components. -
Creates the runtime layout:
/usr/local/bin/gatewayd ← daemon binary/usr/local/bin/gwctl ← CLI tool/etc/gateway/tls/{ca,server}.crt ← internal CA + server cert (ECDSA P-256)/etc/gateway/tls/{ca,server}.key/var/lib/gateway/config.yaml ← bootstrap config (YAML)/var/lib/gateway/gateway.db ← SQLite store/etc/systemd/system/gatewayd.service -
Generates a self-signed internal CA and a server certificate so the API listens over TLS from the first boot.
-
Writes the bootstrap config based on profile defaults. You can edit it before enabling the service.
-
Enables the systemd unit but does not auto-start it — review the config first.
Installer update — 7 October 2026
Section titled “Installer update — 7 October 2026”The hosted installers now include runtime dependencies previously missing from a base installation, notably openvpn. The daemon download remains v2.16.0; this is an installer update, not a new binary release.
- Bluetooth (
bluezplusdnsmasqfor NAP DHCP) is included in therpiandfullprofiles, offered bycustom, and available through the full installer’s--with-bluetoothflag. - The DHCP client package is selected from
dhcpcd-base,dhcpcd5, ordhcpcdaccording to availability. Raspberry Pi installations also tryraspi-utilsorlibraspberrypi-binwhenvcgencmdis missing. network-manageris not installed: adding it could take over existing interfaces. AmneziaWG is not installed from distro repositories; it requires its module andawgto be provisioned separately.- The distro
openvpnservice is disabled by a fresh install (or when update mode adds OpenVPN);gatewaydmanages tunnel instances itself.
Network modes
Section titled “Network modes”Choose a network.mode in your bootstrap config:
| Mode | NICs | Use it for |
|---|---|---|
primary |
Manages WAN + LAN, runs DHCP | Dedicated home or office gateway |
embedded |
Sits inline between router + LAN | Adding The Gateway to an existing home network without replacing the ISP router |
portable |
Single NIC | Travel router, laptop, ad-hoc deployments |
Start the daemon
Section titled “Start the daemon”sudo systemctl enable gatewaydsudo systemctl start gatewaydsystemctl status gatewaydjournalctl -u gatewayd -fHealth check:
curl -k https://127.0.0.1:8080/health# → {"status":"ok"}Open the web UI
Section titled “Open the web UI”https://<gateway-ip>:8080The first hit lands on the setup wizard, which creates the admin account and walks you through:
- Admin username + password (stored as bcrypt hash)
- Network mode confirmation (
primary/embedded/portable) - WiFi AP SSID + WPA2 passphrase (Pi only)
- First WireGuard tunnel (paste or generate)
- Default privacy class
After setup the wizard hands you off to the dashboard.
Updating
Section titled “Updating”curl -fsSL https://thegateway.pro/install.sh | sudo env GATEWAY_UPDATE=1 bashTo pin the current release explicitly:
curl -fsSL https://thegateway.pro/install.sh | sudo env GATEWAY_UPDATE=1 GATEWAY_VERSION=v2.16.0 bashThe update procedure:
- Downloads and verifies the selected binary, then installs missing base runtime packages with
apt-get --no-upgrade. This does not request upgrades of already-installed packages; the package manager may install dependencies. If package installation fails, the script warns and continues; affected features remain unavailable. - Compares the current and downloaded binary versions. Missing packages are repaired before this check, even when the binary is already current. Matching versions skip the binary replacement and daemon restart.
- If the version differs, snapshots the old binary to
/usr/local/bin/gatewayd.bak.<timestamp>and gracefully stops the service withsystemctl stop. - Replaces the binary, starts the service, waits 4 seconds, and checks
systemctl is-active gatewayd. - Rolls back to the snapshot if the service is not active. This is a service-state check, not an HTTP
/healthprobe.
Configuration, database, certificates, and the systemd unit are kept in place. Update mode repairs base dependencies; it does not add optional Bluetooth or WiFi components.
Verify the hosted release
Section titled “Verify the hosted release”curl -fsSLO https://thegateway.pro/releases/latest/SHA256SUMScurl -fsSLO https://thegateway.pro/releases/latest/gatewayd-linux-amd64shasum -a 256 -c SHA256SUMS --ignore-missingThe latest manifest currently points to v2.16.0. Read the release notes before updating production gateways or enabling automatic WAN failover or balancing. Start with manual monitoring and keep a recovery path available.
Uninstall
Section titled “Uninstall”sudo systemctl stop gatewaydsudo systemctl disable gatewaydsudo rm /etc/systemd/system/gatewayd.servicesudo rm -rf /etc/gateway /var/lib/gateway /usr/local/bin/gatewayd /usr/local/bin/gwctlsudo nft delete table inet gateway # remove the firewall tableNext steps
Section titled “Next steps”The daemon is up. In order of what most operators do first:
- Run the quick start. Add one tunnel, one policy, one device, and verify the kill-switch works. 10 minutes.
- Set the secrets passphrase. The daemon auto-generated one on first boot — override it with one you control and store a copy off-box.
- Pick a posture. Skim the threat model so the next decisions you make match the protections you actually need.
- Take a baseline backup.
gwctl backup export > /var/backups/gateway-init.json— sanitized plaintext, useful when comparing against future state. For the encrypted-with-secrets variant see Backup.
Related
Section titled “Related”- Configuration — what each section of
config.yamlcontrols. - Release notes — what changed in v2.16.0 and what to check before upgrading.
- Sizing & performance — capacity expectations for the hardware you just installed on.
- FAQ — common pre-install questions.