> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serververs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tunneling setup for self-hosted hypervisors

> Deploy a Serververse™ Network Transit tunnel on a Proxmox VE host and route a public subnet to your virtual machines.

This guide sets up a **Serververse™ Network Transit** tunnel on a self-hosted hypervisor and routes a public subnet to your VMs. The example uses **Proxmox VE, but you may use any other hypervisor, steps are similar**: you create a bridge on the host, the installer attaches your routed subnet to it, and any VM on that bridge gets a public IP.

> [!NOTE]
>
> As of **v0.3**, the install script automatically routes the subnet and assigns it to the Proxmox bridge. Follow every step below in order.

> [!NOTE]
>
> This routed method is supported only if you have purchased a whole subnet with a minimum size of `/30`. Visit our store to place an order, or open a ticket on our Discord server for guidance.

> [!WARNING]
>
> Make sure you have **out-of-band access** (IPMI, VNC, or console) to the Proxmox host before you start. A misconfigured route on the host can cut off your connection.

> [!WARNING]
>
> **Important: Standard Subnet IP Usage**
>
> With a standard subnet, **3 IP addresses are normally reserved**: the **network address, gateway address, and broadcast address**. For example, a **/29 contains 8 IP addresses, but normally only 5 can be directly assigned** to servers.
>
> You can, however, **use all IP addresses from the subnet** by making your **L2 gateway, dedicated server, or another device act as the gateway** and handling the routing yourself. This allows you to avoid the traditional **network, gateway, and broadcast IP allocation**.
>
> Keep in mind that this setup requires the gateway device to handle **Layer 2/Layer 3 forwarding and ARP correctly**. Since all traffic passes through the gateway, it must have sufficient **CPU and network capacity**.
>
> **High packet rates, many concurrent connections, or high-bandwidth traffic can significantly increase CPU usage.** If the gateway is CPU-limited, it can become a **networking bottleneck**, even if the physical network interface still has plenty of available bandwidth.
>
> The gateway also becomes a **single point of failure** unless redundancy is configured.
>
> For most deployments, we recommend using the **IP Transit routed method** when you need to efficiently use the **entire subnet** without putting additional routing overhead on a dedicated gateway.

## How it works

```text theme={null}
Internet
   ↓
Serververse Edge Network
   ↓
WireGuard Transit Tunnel (Proxmox host)
   ↓
br-transit bridge  (gateway = first usable IP of your subnet)
   ↓
Your VMs (public IPs from the subnet)
```

## Before you begin

> [card] Proxmox VE host
>
> With `root` access to the host shell.

> [card] Network Transit subnet
>
> A Serververse account with a transit **subnet** assigned.

> [card] Out-of-band access
>
> IPMI, VNC or console access to the host.

> [card] Cloud-init basics
>
> Familiarity with creating Proxmox VMs and cloud-init.

## Set up your tunnel

**1. Create the transit bridge**

On the Proxmox host, edit the network configuration:

```bash theme={null}
nano /etc/network/interfaces
```

Add this to the **end** of the file:

```text theme={null}
auto br-transit
iface br-transit inet static
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        mtu 1420
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
```

Save the file, then apply the configuration (or reboot the host):

```bash theme={null}
ifreload -a
```

> [!NOTE]
>
> `bridge-ports none` is intentional. The bridge only carries routed traffic from the tunnel, so it isn't attached to a physical NIC. The MTU of `1420` matches WireGuard overhead.

**2. Open your tunnel in the dashboard**

Sign in to the [Serververse Labs Dashboard](https://labs.serververs.com).

![Serververse Labs sign-in page](https://mintcdn.com/serververse/8tdQmPDJN_khTQSY/labs/images/ip-transit/dashboard-login.png?fit=max\&auto=format\&n=8tdQmPDJN_khTQSY\&q=85\&s=91159cc56d5665fa2d6f47cb89a8a1df)

Sign in to the dashboard

Go to **Tunnels**.

![Network Transit tunnels list](https://mintcdn.com/serververse/8tdQmPDJN_khTQSY/labs/images/ip-transit/dashboard-tunnels-list.png?fit=max\&auto=format\&n=8tdQmPDJN_khTQSY\&q=85\&s=4e11dec4e87a4473e913ef1a6dc3c53c)

Your tunnels

Your assigned subnet tunnel appears as a card. Click it to open the details.

![Assigned subnet tunnel card](https://mintcdn.com/serververse/8tdQmPDJN_khTQSY/labs/images/ip-transit/hypervisor-tunnel-card.png?fit=max\&auto=format\&n=8tdQmPDJN_khTQSY\&q=85\&s=a8c60047235fe802ee13ccd1289b5552)

Subnet tunnel card

**3. Copy your install command**

Click **Generate command** to copy your install command to the clipboard.

![Generate command button](https://mintcdn.com/serververse/8tdQmPDJN_khTQSY/labs/images/ip-transit/hypervisor-generate-command.png?fit=max\&auto=format\&n=8tdQmPDJN_khTQSY\&q=85\&s=f482ef5dd096f568556b96a265eaff32)

Generate the command

![Command copied confirmation](https://mintcdn.com/serververse/8tdQmPDJN_khTQSY/labs/images/ip-transit/hypervisor-command-copied.png?fit=max\&auto=format\&n=8tdQmPDJN_khTQSY\&q=85\&s=018b63082f08d17c89899c69f01d6c5d)

Command copied to clipboard

> [!NOTE]
>
> The command is unique to your account and subnet. Treat it like a password and don't share it publicly.

**4. Run the installer on the Proxmox host**

Paste the command into the **host shell** (not inside a VM). When it finishes, the output looks like this:

![Installer output for a subnet tunnel](https://mintcdn.com/serververse/8tdQmPDJN_khTQSY/labs/images/ip-transit/hypervisor-install-output.png?fit=max\&auto=format\&n=8tdQmPDJN_khTQSY\&q=85\&s=46696f6af6d1588b6f92fc38e0c85921)

Installer output

Note the **bridge IP** (the gateway) and the **usable range** it prints. You'll need both for the VM.

**5. Create the virtual machine**

1. Create a new VM in the Proxmox web interface.
2. Under **Hardware**, edit the network device and set the bridge to **`br-transit`**.
3. Under **Cloud-Init**, set:

| Setting | Value | Example |
| - | - | - |
| **IP Address** | An IP from your subnet, with its prefix length | `91.226.56.10/29` |
| **Gateway** | The IP attached to the bridge, **not** the VM's own IP | `91.226.56.9` |
| **User / Password** | A root password so you can SSH in | |

> [!WARNING]
>
> The gateway must be the **bridge's** IP. Using the VM's own IP, or an address outside the subnet, leaves the VM without connectivity.

**6. Verify the IP**

Start the VM, open its console or SSH in, and run:

```bash theme={null}
# Confirm the assigned IP and networking
curl ip.me
ip a
```

![curl output showing the routed public IP](https://mintcdn.com/serververse/8tdQmPDJN_khTQSY/labs/images/ip-transit/hypervisor-verify-curl.png?fit=max\&auto=format\&n=8tdQmPDJN_khTQSY\&q=85\&s=16b9123bd063a2b413b144f8182d11ae)

Expected result

> [!TIP]
>
> `curl ip.me` should return the IP you assigned to the VM, `ip a` should list it on the VM's network interface, and the VM should now be reachable over SSH from the internet.

## Adding more VMs

Repeat the **Create the virtual machine** step for each VM: same `br-transit` bridge, same gateway, and a different unused IP from your subnet. Don't assign the network, broadcast, or gateway addresses to a VM.

## Using LXC Containers

LXC containers can use the `br-transit` bridge in the same way as virtual machines. Configure the container's network interface to use `br-transit`, assign a static IP address from your subnet, and set the bridge IP as the gateway.

For example:

```bash theme={null}
pct set <ct-id> --net0 name=eth0,bridge=br-transit,ip=192.168.1.67/29,gw=192.168.1.1 
```

Replace `<ct-id>` with your container ID and adjust the IP address, subnet prefix, and gateway to match your allocation and bridge configuration.

No additional Transit installation is required inside the container when using this bridge-based routing setup.

If you want to run a separate Transit tunnel directly inside an LXC container instead, follow the [LXC Container Setup](https://docs.serververs.com/labs/ip-transit/tunneling-lxc) guide.

## Managing your tunnel

View all your transit IPs, their status, and usage in the [dashboard](https://labs.serververs.com) under **Tunnels**. To check the tunnel from the host:

```bash theme={null}
sudo sv-transit status
```

See the [`sv-transit` CLI reference](https://docs.serververs.com/labs/ip-transit/tunneling#manage-your-tunnel) for upgrade and removal commands.

> [!WARNING]
>
> Do not restart the host's networking while the WireGuard tunnel is online. This causes a routing overlap and shuts down WireGuard.

> [!NOTE]
>
> If a networking restart is really needed, use out-of-band access (IPMI, VNC, or console) to the Proxmox host and shut down WireGuard first with `wg-quick down sv-transit`. Then restart the networking. Once networking is back online, start WireGuard again with `wg-quick up sv-transit`.

## Troubleshooting

> [accordion] VM has no internet access
>
> 1. Check the VM's NIC is on `br-transit`.
> 2. Check the cloud-init gateway is the **bridge IP**: `ip addr show br-transit` on the host.
> 3. Check forwarding is on: `cat /proc/sys/net/ipv4/ip_forward` should print `1`.
> 4. Check the tunnel is up: `wg show`.

> [accordion] Tunnel is up but the IP isn't reachable externally
>
> Edge provisioning can take 1–2 minutes to propagate. If it still fails, confirm the tunnel shows as **Online** in the dashboard and that no firewall on the host or VM is blocking inbound traffic.

> [accordion] Lost access to the host after the installer ran
>
> Connect through IPMI, VNC or the console and inspect the routing table with `ip route`. If needed, remove the tunnel with `sudo sv-transit uninstall` and contact us by opening a ticket on Discord.

> [accordion] VM networking lost after restarting the host networking
>
> Use VNC or the Proxmox CLI (for a container: `pct enter <ct-id>`, for a VM: `qm console <vm-id>`) and manually restart networking. If that doesn't help, restarting the VM usually resolves the issue. If it persists, contact us by opening a ticket on Discord.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.