Jump to content

WireGuard vs OpenVPN

From Pulsed Media Wiki


WireGuard and OpenVPN are the two VPN protocols you are most likely to use with a seedbox. Both create an encrypted tunnel between your device and your seedbox, letting you access services as if you were on the same local network.

This article compares the two protocols and explains how to set each one up on a Pulsed Media seedbox.

When you need a VPN tunnel to your seedbox

A seedbox already encrypts traffic between you and the server over HTTPS (for the web panel) and SSH/SFTP (for file transfers). A VPN tunnel on top of that is not needed for basic seedbox use.

A VPN tunnel to your seedbox is useful when:

  • You want to route your internet traffic through the seedbox to use its IP address (privacy from your ISP)
  • You run services on the seedbox that only listen on localhost (databases, internal APIs)
  • You want a private network between your devices and the seedbox
  • You need to access the seedbox from networks that block SSH or HTTPS on non-standard ports

Protocol comparison

WireGuard OpenVPN
Codebase size ~4,000 lines of code ~100,000+ lines
Encryption ChaCha20, Curve25519, BLAKE2s Configurable (AES-256-GCM typical)
Speed Faster (kernel-level, less overhead) Slower (userspace, TLS handshake overhead)
Connection setup Sub-second 5-15 seconds typical
Protocol UDP only UDP or TCP (TCP useful on restrictive networks)
Authentication Public key pairs (like SSH keys) Certificates or username/password
Client support Built into Linux kernel 5.6+. Native apps for Windows, macOS, iOS, Android Broad support across all platforms, including older systems and routers
Configuration Single short config file per peer Longer config with certificates, more options
Port Single UDP port Single UDP or TCP port
NAT traversal Built-in keepalive Requires explicit keepalive config
Stealth/obfuscation None built-in (UDP only, identifiable) TCP mode can run on port 443, harder to block

When to use WireGuard

Use WireGuard when speed and simplicity matter. It has lower latency, higher throughput, and connects in under a second. The configuration is a single file with a few lines. If you are setting up a VPN for the first time, WireGuard is easier to get working.

WireGuard is the better choice for most seedbox users.

When to use OpenVPN

Use OpenVPN when you need TCP transport (for networks that block UDP), when you need to run the VPN on port 443 to bypass restrictive firewalls, or when your client device only supports OpenVPN (some older routers and embedded devices).

OpenVPN is also the better choice if you need username/password authentication rather than key-based authentication.

Setting up WireGuard on a PM seedbox

There are two approaches depending on your seedbox plan.

Rootless Docker container (shared seedbox)

On shared seedbox plans where you do not have root access, you can run WireGuard in a rootless Docker container. This runs entirely in your user space.

  1. Install the WireGuard container:
mkdir -p ~/wireguard
cd ~/wireguard
# Pull a rootless WireGuard Docker image
docker run -d --name wireguard \
  --cap-add=NET_ADMIN \
  -p 51820:51820/udp \
  -v ~/wireguard/config:/config \
  -e PEERS=1 \
  linuxserver/wireguard
  1. After the container starts, find your client config:
cat ~/wireguard/config/peer1/peer1.conf
  1. Import this config file into the WireGuard app on your device.

Note: Docker availability depends on your seedbox plan and server configuration. If Docker is not available, contact support.

Global install (dedicated server)

On a dedicated server or managed dedi where you have root access:

  1. Install WireGuard:
apt install wireguard
  1. Generate key pair:
wg genkey | tee /etc/wireguard/server_private.key | wg pubkey > /etc/wireguard/server_public.key
chmod 600 /etc/wireguard/server_private.key
  1. Create /etc/wireguard/wg0.conf:
[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = SERVER_PRIVATE_KEY

[Peer]
PublicKey = CLIENT_PUBLIC_KEY
AllowedIPs = 10.0.0.2/32
  1. Start the interface:
wg-quick up wg0
systemctl enable wg-quick@wg0
  1. On your client device, create a matching config with the server's public key and endpoint (SERVERNAME.pulsedmedia.com:51820).

Setting up OpenVPN on a PM seedbox

Rootless Docker container (shared seedbox)

mkdir -p ~/openvpn
docker run -v ~/openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig \
  -u udp://SERVERNAME.pulsedmedia.com
docker run -v ~/openvpn:/etc/openvpn --rm -it kylemanna/openvpn ovpn_initpki
docker run -v ~/openvpn:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn

Generate a client certificate:

docker run -v ~/openvpn:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full client1 nopass
docker run -v ~/openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient client1 > ~/client1.ovpn

Download client1.ovpn via SFTP and import it into your OpenVPN client.

Global install (dedicated server)

On a dedicated server with root access, install OpenVPN and use a setup script or configure manually. The configuration involves generating a CA, server certificate, client certificates, and a server config file. This is more involved than WireGuard but well-documented in the OpenVPN community documentation.

Performance

On a typical seedbox connection, WireGuard adds 3-5% overhead to throughput. OpenVPN adds 10-20% overhead due to its userspace processing and TLS layer.

For file transfers from your seedbox, this overhead is rarely the bottleneck. Your home internet connection is almost always the limiting factor, not the VPN tunnel. The difference matters more for latency-sensitive use (streaming, interactive sessions) where WireGuard's faster connection setup and lower per-packet overhead are noticeable.

See also