Installing Pomerium on POP! OS Latest

Pomerium is a zero-trust identity-aware access proxy that allows users to securely access internal applications and services. In this tutorial, we will cover the steps to install Pomerium on POP! OS Latest.

Prerequisites

There are a few prerequisites that you need to fulfill before you begin the installation process:

Step 1: Update the System

It is always recommended to update your system packages to the latest version. You can do this by opening a terminal and running the following commands:

sudo apt update
sudo apt upgrade

Step 2: Install Dependencies

Before installing Pomerium, you need to install some dependencies that are required for its installation. Run the following command to install the dependencies:

sudo apt install -y curl unzip libssl-dev libffi-dev

Step 3: Download and Extract Pomerium Binary

To download and extract the Pomerium binary, follow the below steps:

  1. Go to the Pomerium releases page.
  2. Download the latest release tarball file that matches your system’s architecture (e.g. pomerium-linux-amd64.tar.gz).
  3. Open a terminal and navigate to the directory where you have downloaded the tarball file.
  4. Extract the contents of the tarball file to a directory named pomerium:
tar -xzf pomerium-linux-amd64.tar.gz -C pomerium --strip-components 1

Step 4: Install Pomerium

To install Pomerium, follow the below steps:

  1. Navigate to the pomerium directory where you have extracted the binary.
  2. To install the binary system-wide, copy the extracted binary to the /usr/local/bin/ directory:
sudo cp pomerium /usr/local/bin/

Step 5: Configure Pomerium

Once you have installed Pomerium, you need to configure it to work with your application. You can do this by creating a configuration file.

  1. Create a config.yaml file in the directory where you want to run Pomerium:
nano config.yaml
  1. Copy and paste the following example YAML configuration:
---
# Address is the publicly addressable host:port pair to reach this application.
# This can be an IP address, a hostname, or "localhost" to listen on loopback.
address: 0.0.0.0:8080

# The OIDC provider to use for authentication
authenticate_service_url: "https://sso.example.com"

# The shared secret to use for signing keys.
# This should be a 32, 64, or 128 length string.
# It should be kept secret as anyone with this string
# can sign tokens for pomerium.
shared_secret: "SuperSecretKey"

# A list of allowed domains for authentication.
# Only users who hold email accounts with these domains will be allowed to authenticate
# during the authorization process.
# If the array is empty or omitted, any email domain will be allowed.
allowed_domains:
- example.com

# A list of policies to apply. Each policy is an ingress policy that maps
# from an external URI that is passed through pomerium to an internal URI
# that the application expects.
policy:
- from: "https://auth.example.com/oauth2/callback"
  to: "http://localhost:3000/oauth2/callback"
  1. Save and close the file.

Step 6: Start Pomerium

To start Pomerium, follow the below steps:

  1. Open a terminal and navigate to the directory containing the config.yaml file.

  2. Run the command below to start the Pomerium service:

pomerium --config config.yaml

Step 7: Access the Application via Pomerium

Now that you have started the Pomerium service, you can access your application through it. To access your application via Pomerium, follow the below steps:

  1. Open a web browser and navigate to the Pomerium hostname and port:
http://localhost:8080
  1. You should be prompted to authenticate with the OIDC provider that you configured in the config.yaml file.

  2. Once you have authenticated, you should be redirected to your internal application.

Congratulations! You have successfully installed and configured Pomerium on POP! OS Latest.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!