Pritunl VPN

Web interface not loading after initial install

I have encountered this several times when trying to set up a  server:

  • Install the Pritunl package(s)
  • Start the server
  • Navigate to the web interface and complete the first-launch server config (set the port, database info, &c.)
  • Restart the server - nothing will load

Even though the Pritunl service says the server has started and is running, I cannot load the web management interface.

The first step to diagnose this is to try starting the server manually from the CLI to look for errors:

systemctl stop pritunl
pritunl start --conf=/etc/pritunl.conf

This should start the Pritunl server and web interface. However, if there are no visible errors, and you still cannot load the web interface, here's the solution I have found.

It seems that, on some systems, Pritunl hangs, in the background, on generating the self-signed SSL certificate it uses for the web portal, but doesn't report this. I've found that, if you manually set the SSL certificate, Pritunl will start working again.

Stop the Pritunl server by pressing ^C. Now, you need to obtain an SSL certificate and private key. If you use LetsEncrypt (recommended), you can get it for free. Alternatively, you can generate a self-signed one using the guide here (see Generated Self-Signed SSL Certs page).

Now, manually set the SSL certificate and key for Pritunl like so:

pritunl set app.server_cert "$(cat /path/to/certificate.cert)"
pritunl set app.server_key "$(cat /path/to/certificate.key)"

I've found that, more often than not, this resolves the issue. You can restart the Pritunl server either manually or through the SystemD service, and it should start working.


openvpn–ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)

This is because the node device for the tunnel interface does not exist. Create it:

mkdir -p /dev/net
mknod /dev/net/tun c 10 200