To install Firezone UI for WireGuard VPN on Ubuntu 22.04, deploy the current Firezone Gateway and manage it through the hosted Admin Portal. In about 10 minutes, your VPS can provide policy-controlled access to a private server, database, application, or subnet.
This guide uses Firezone’s current architecture. Ubuntu runs the Gateway data plane; the Firezone portal handles sites, users, resources, and policies, so the old self-hosted dashboard and local HTTPS certificate steps are not required.
Prerequisites
- A fresh 64-bit Ubuntu 22.04 (Jammy) VPS with internet access.
- A root shell or a sudo-enabled user connected over SSH.
- At least 1 vCPU and 1 GB of RAM for a small Gateway; plan additional resources for higher traffic or many clients.
- A route from this VPS to the private resource you want users to reach.
- A Firezone account, a browser for the Admin Portal, and a separate device for testing the Firezone Client.
- The current Gateway does not require a domain name, public dashboard, or local TLS certificate.
- A fresh VPSLake Linux VPS running Ubuntu 22.04.
Step 1: Update Ubuntu and install Gateway prerequisites
Updating Jammy and installing the packet-filtering commands gives the Gateway the host capabilities it checks during startup.
sudo apt update
sudo apt full-upgrade -y
sudo apt install -y ca-certificates gnupg iptables ufw wget
Confirm that this is Ubuntu 22.04 and that both IPv4 and IPv6 firewall commands are available:
. /etc/os-release && printf '%s\n' "$PRETTY_NAME"
iptables --version
ip6tables --version
Expected output identifies Ubuntu 22.04 and prints an iptables v1.x version for each command. If you are already root, remove sudo from the commands below.
Step 2: Create a Firezone Site and Gateway token
The Site defines which resources this Gateway can serve, while the token registers one specific Ubuntu host to that Site.
- Sign in to the Firezone Admin Portal, or create an account.
- Open Sites → Add Site, name it something recognizable such as
Ubuntu-2204-VPS, and save it. - On the new Site page, select Deploy a Gateway and choose the Debian/Ubuntu deployment instructions.
- Copy the single-owner token into a password manager until the authentication step is complete.
The token is a credential for this Gateway, not your Ubuntu password. Do not paste it into shell history, a ticket, a repository, or a screenshot; create a new token for every additional Gateway.
Step 3: Add the Firezone APT repository
The signed Firezone repository supplies the firezone-gateway package and lets Ubuntu receive future updates through APT.
sudo mkdir --parents /etc/apt/keyrings
wget -qO- https://artifacts.firezone.dev/apt/key.gpg | sudo gpg --dearmor --yes -o /etc/apt/keyrings/firezone.gpg
echo "deb [signed-by=/etc/apt/keyrings/firezone.gpg] https://artifacts.firezone.dev/apt/ stable main" | sudo tee /etc/apt/sources.list.d/firezone.list > /dev/null
sudo apt update
sudo apt install -y firezone-gateway
The official Debian and Ubuntu deployment guide uses this repository and package name. A successful install ends without an Unable to locate package error.
Check that APT has a package candidate:
apt-cache policy firezone-gateway
Expected output contains an installed or candidate version and a repository URL beginning with https://artifacts.firezone.dev/apt.
Step 4: Authenticate and start the Gateway
Authentication connects this VPS to the Site; systemd then keeps the Gateway running across SSH disconnects and reboots.
Run the interactive authenticator and paste the token only when prompted:
sudo firezone-gateway authenticate
Check the service and its tunnel interface:
sudo systemctl is-enabled firezone-gateway
sudo systemctl is-active firezone-gateway
sudo systemctl status firezone-gateway --no-pager -l
sudo ip link show tun-firezone
Expected output includes:
enabled
active
Active: active (running)
The interface check should show tun-firezone. Return to Firezone Admin Portal → Sites → Ubuntu-2204-VPS and confirm that the Gateway is online.
Step 5: Apply a narrow Ubuntu firewall policy
The Gateway normally initiates its control-plane and tunnel connections, so do not expose a public Firezone dashboard or add unnecessary inbound VPN ports.
Keep the current SSH session open while enabling UFW. On a server that uses the standard SSH port, run:
sudo ufw allow OpenSSH
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw --force enable
sudo ufw status verbose
Expected output includes Status: active, an allowed 22/tcp OpenSSH rule, denied incoming traffic by default, and allowed outgoing traffic. If SSH uses YOUR_SSH_PORT instead, allow it before enabling UFW:
sudo ufw allow YOUR_SSH_PORT/tcp
For a restricted or stateless egress firewall, allow outbound HTTPS to Firezone and the STUN/TURN traffic listed in Firezone’s ports and protocols reference. A normal stateful VPS firewall does not need a new inbound rule for Firezone.
Step 6: Add a resource, policy, and client
An online Gateway is only the transport path; a Resource and an explicit Policy decide what an authenticated user may reach.
- In Firezone Admin Portal → Sites → Ubuntu-2204-VPS → Resources, select Add a resource.
- Enter a descriptive name such as
Private-Appand an address such as10.20.0.15,db.internal.example, or10.20.0.0/24. Choose the narrowest address that meets the requirement. - If the resource should expose only one service, add a traffic restriction such as TCP port
443or TCP port22in the resource form. - Open Policies → New Policy, select the intended user group and resource, then save the policy. Firezone is default-deny until this rule exists.
- Install the Firezone Client on a test device, sign in with your account slug, and connect to the resource.
Before testing from the client, make sure the Gateway itself can reach the destination:
curl --fail --silent --show-error --connect-timeout 5 -o /dev/null -w 'HTTP %{http_code}\n' http://RESOURCE_IP:PORT/
Replace RESOURCE_IP and PORT with an HTTP service that is intentionally reachable from this VPS. A response proves the Ubuntu route works; it does not bypass the Firezone Policy.
Expected output from a healthy HTTP service is similar to:
HTTP 200
Verify Firezone on Ubuntu 22.04
Run the local checks after connecting the client:
sudo systemctl is-active firezone-gateway
sudo ip link show tun-firezone
sudo journalctl -u firezone-gateway -n 30 --no-pager
Expected output begins with active, shows the tun-firezone interface, and contains recent log entries without repeated authentication or connection failures. The Admin Portal should show the Gateway online, and the Client should show the permitted resource as connected.
From the test device, open the approved web service or connect to the approved SSH/RDP address. That end-to-end test confirms the client identity, policy, Gateway tunnel, route, and destination firewall are working together.
Troubleshooting
Unable to locate package firezone-gateway
APT has not loaded the Firezone repository, or the list file and signing key do not match. Repeat Step 3, run sudo apt update, and check apt-cache policy firezone-gateway; a candidate should come from artifacts.firezone.dev.
gpg: no valid OpenPGP data found
The key request returned an error page or no data, commonly because DNS, outbound HTTPS, or a proxy blocked artifacts.firezone.dev. Check connectivity with getent hosts artifacts.firezone.dev and curl -I https://artifacts.firezone.dev/apt/key.gpg, then fix egress and rerun Step 3.
The Gateway is installed but remains offline
Inspect the service log with sudo journalctl -u firezone-gateway -n 50 --no-pager. DNS failures, blocked outbound TCP 443, and an already-claimed single-owner token are common causes; correct network access or create a fresh token under Sites → YOUR_SITE → Gateways and authenticate this host once.
The client connects but the resource cannot be reached
Check the resource address, traffic restrictions, and Policy group first. Then test the destination directly from Ubuntu; the Gateway needs a route to it, and the destination’s own firewall must allow the resulting traffic.
Hardening and maintenance
- Restrict SSH at the VPS provider firewall to trusted source addresses and use SSH keys instead of password authentication.
- Treat the token and
/var/lib/firezoneas sensitive. Rotate the token in the portal if it was exposed, then re-authenticate the Gateway. - For an SSH baseline, review the generated rules from VPSLake’s SSH hardening generator before applying them to a production host.
- Update the Gateway through APT and check the service after each upgrade:
sudo apt update
sudo apt install --only-upgrade firezone-gateway
sudo systemctl is-active firezone-gateway
FAQ
Is Firezone the same as a traditional full-network VPN?
No. Firezone normally publishes named Resources and grants them through Policies, so a user does not automatically receive access to every address behind the Gateway. You can define a CIDR Resource when broad private-network access is intentional, but narrow host or service Resources are easier to control.
Do I need to install WireGuard separately on Ubuntu 22.04?
No. The Gateway package supplies the Firezone data-plane components and manages the WireGuard-based tunnel itself. Installing a separate hand-written wg0 profile is not part of this deployment.
Can I browse to the Ubuntu server to open the Firezone UI?
No local dashboard is created by this method. Use the hosted Admin Portal for Sites, Gateways, Resources, Policies, and users; the Ubuntu server only runs the Gateway service.
Do I need a domain and Let’s Encrypt certificate?
No. The current Gateway connects outbound to Firezone and does not publish a local HTTPS control panel. A domain and certificate would be relevant to a separate web application you expose through a Resource, not to this Gateway installation.