Skip to main content
Serververse Transit can run inside an unprivileged Linux Container (LXC) using userspace WireGuard. By default, unprivileged containers do not have access to the TUN device required to establish a WireGuard tunnel. This guide explains how to configure the container, install the required dependencies, run the Serververse Transit installer, and verify the connection. This guide is for Proxmox VE 9 or later, with an Ubuntu 24.04 container.
Routing a subnet to multiple containers?You do not need to install a separate Transit tunnel inside every container. Follow the Hypervisor Setup guide to connect your containers to br-transit.

How It Works

LXC containers share the host’s Linux kernel. An unprivileged container maps its root user to an unprivileged user on the host, restricting its ability to load kernel modules and access certain devices. Serververse Transit uses WireGuard for tunneling. Inside an LXC container, it can use wireguard-go, a userspace implementation of WireGuard that does not require the WireGuard kernel module. However, userspace WireGuard still requires access to the TUN device at /dev/net/tun. You must pass this device through from the Proxmox host before installing Transit.

Prerequisites

Before proceeding, ensure that you have:
  • A Proxmox VE 9 (or later) host with access to its shell or web interface.
  • An unprivileged LXC container running Ubuntu 24.04.
  • Root access inside the container.
  • An active Serververse Transit tunnel and access to the Serververse Labs Dashboard.
You do not need to enable LXC nesting or convert the container into a privileged container.

Installation

1

Create an LXC container

Create an unprivileged LXC container using the Ubuntu 24.04 template (download it under your storage → CT Templates → Templates if it isn’t listed).Complete the initial setup and ensure that you can access the container through SSH or the Proxmox console.
2

Pass through the TUN device

In the Proxmox web interface:
  1. Select your container.
  2. Open the Resources tab.
  3. Select Add and then Device Passthrough.
  4. Set the Device Path to /dev/net/tun.
  5. Save the configuration.
If the container is running, perform a full shutdown and start it again. Restarting the operating system from inside the container is not sufficient.
3

Install the dependencies

Open a shell inside the container. From the Proxmox host, you can use pct enter <ct-id>, replacing <ct-id> with the container ID.Run:
4

Verify the container configuration

Run the following checks inside the container:
Confirm that the output includes:
  • tun OK
  • wireguard-go OK
  • connmark OK
If the connmark OK check fails, follow Configuring Return-Path Rules before continuing.
5

Install Serververse Transit

  1. Sign in to the Serververse Labs Dashboard.
  2. Navigate to Tunnels.
  3. Open your tunnel and select Generate command.
  4. Copy the generated command and execute it inside the LXC container.
If the WireGuard kernel module is unavailable, the installer may display the following message:
This is expected when using userspace WireGuard inside an LXC container.wireguard-go also prints a boxed notice saying it isn’t required because the kernel supports WireGuard. That notice is harmless; the container can’t use the host’s kernel module, so userspace WireGuard is the right choice here.
6

Verify DNS resolution

The installer may install resolvconf, which can interfere with the /etc/resolv.conf configuration managed by Proxmox.If domain names stop resolving after installation, remove the package:
Restart the container if necessary, then verify that DNS resolution works.
7

Verify the tunnel

Run:
Replace <YOUR_ROUTED_IP> with the Transit IP from your dashboard. The curl command should return that IP, and sv-transit status should report a recent handshake.
A plain curl ip.me shows your normal internet IP, not your Transit IP. Only traffic sent from the Transit IP goes through the tunnel.

Configuring Return-Path Rules

Serververse Transit uses iptables connection-marking rules (CONNMARK) to ensure that replies from Docker containers, port-forwarded services, and other NAT-based workloads return through the tunnel. These rules require the xt_connmark kernel module. An unprivileged LXC container cannot load this module itself. If the connmark OK readiness check fails, choose one of the following approaches.
Recommended: Load the required module on the Proxmox host.Run the following commands on the host:
The first command loads the module immediately. The second ensures that it is loaded automatically at boot.Re-run the connmark readiness check inside the container. Once it succeeds, continue with the Transit installer.

Troubleshooting

The required xt_connmark kernel module may not be loaded on the Proxmox host.Follow Configuring Return-Path Rules to load the module or use the limited configuration described there.
A full container shutdown and start is required after adding the device.In Proxmox, confirm that /dev/net/tun appears in the container’s Resources tab, then stop and start the container.
The resolvconf package may have changed how DNS configuration is managed.Remove it if it is not required:
Restart the container if necessary and test DNS resolution again.
If services are exposed through Docker, NAT, or port forwarding, verify that the return-path rules are configured correctly.Check the xt_connmark module on the host and confirm that the tunnel configuration contains the required connection-marking rules.

Frequently Asked Questions

Can I use the Proxmox shell instead of the web interface?

Yes. Run the following command on the Proxmox host, replacing <ct-id> with your container ID:
Shut down the container and start it again to apply the change.

Can I edit the container config file instead?

Yes. On the Proxmox host, add these lines to /etc/pve/lxc/<ct-id>.conf, then shut the container down and start it again:

Can I use a Debian container?

Package availability varies by Debian release. Check whether wireguard-go is available:
If no package candidate is available, use the Ubuntu 24.04 template instead.

Is userspace WireGuard slower?

Userspace WireGuard generally consumes more CPU than the kernel implementation and may deliver lower throughput. If you control the Proxmox host, you can load the kernel WireGuard module:
WireGuard uses the kernel module automatically whenever it’s loaded.

What if my container is hosted by another provider?

Ask your provider to enable access to /dev/net/tun for your container. If possible, also ask them to load the xt_connmark kernel module. If the provider cannot enable the required functionality, consider using the no-host-access configuration or running Transit in a virtual machine.