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 usewireguard-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.
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:
- Select your container.
- Open the Resources tab.
- Select Add and then Device Passthrough.
- Set the Device Path to
/dev/net/tun. - Save the configuration.
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 OKwireguard-go OKconnmark OK
connmark OK check fails, follow Configuring Return-Path Rules before continuing.5
Install Serververse Transit
- Sign in to the Serververse Labs Dashboard.
- Navigate to Tunnels.
- Open your tunnel and select Generate command.
- Copy the generated command and execute it inside the 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 Restart the container if necessary, then verify that DNS resolution works.
resolvconf, which can interfere with the /etc/resolv.conf configuration managed by Proxmox.If domain names stop resolving after installation, remove the package: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 usesiptables 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.
- Host access available
- No host access
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
RTNETLINK answers: Not supported
RTNETLINK answers: Not supported
This can indicate that userspace WireGuard is unavailable or that the TUN device has not been passed through correctly.Verify that both If either check fails, correct the configuration before running the installer again.
/dev/net/tun and wireguard-go are available:Couldn't load target CONNMARK
Couldn't load target CONNMARK
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./dev/net/tun is missing
/dev/net/tun is missing
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.Domain names no longer resolve
Domain names no longer resolve
The Restart the container if necessary and test DNS resolution again.
resolvconf package may have changed how DNS configuration is managed.Remove it if it is not required:The tunnel starts but services are unreachable
The tunnel starts but services are unreachable
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:
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 whetherwireguard-go is available:
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: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.