Install Pritunl On Ubuntu 20.04

Not sure why Pritunl getting started guid only details installation on RedHat based distributions. Its not hard or impossible to install it on debian based systems. Read on to know how to install Pritunl on Ubuntu 20.04 LTS

Installation Process

  1. Update your system
    sudo apt update
    sudo apt upgrade
    
  2. Add pritunl repositories
    echo "deb http://repo.pritunl.com/stable/apt focal main" | sudo tee /etc/apt/sources.list.d/pritunl.list
    
  3. Add mongo db repositories
    echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
    
  4. Add public keys for mongoDB
    curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
    
  5. Add public keys for pritunl repositories
    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A
    
  6. Install mongoDB and pritunl
    sudo apt update
    sudo apt install pritunl mongodb-server
    
  7. Start and set the service to start on boot
    sudo systemctl start pritunl mongodb
    sudo systemctl enable pritunl mongodb
    
  8. Configure pritunl from the web dashboard Access it from the browser using your server IP to configure it. http://<your_server_ip or hostname>. It will ask you for a setup key. Use the following command to get it:
    sudo pritunl setup-key
    

    Since mongo is installed on the same server, there is nothing to change in the “MongoDB URI” field. If you have mongo installed somewhere, specify the corresponding URI

  9. Once saved, wait a few moments to get to the login screen, execute the following command to get the login credentials:
    sudo pritunl default-password
    
  10. Once logged in, in the setup screen change the password and specify your server’s domain in the “Let’s Encrypt Domain” box to enable https using let’s encrypt. You can enable WireGuard if required as well.
  11. Now add an organization, a server to it and then users to the organization