With the recent acquisition of Figma by Adobe, it was time to start looking for an alternative before it became another product Adobe acquired and slowly died from neglect.

Penpot Link to heading

This brings me to Penpot, Penpot is a Open Source design and prototyping platform. Available trough the web but also available to self-host using container techologies like Docker or Podman.

Having played around with the application available online, I was impressed and excited to try and get this running on my home-server. Though the documentation for this was primarily oriented around using Docker and Docker Compose. I’d have to create the same configuration but using podman.

Configuration Link to heading

Penpot provides a neat guide to getting this setup with Docker and Docker Compose. However in this case I will be using it as a reference.

Additionally this configuration will be geared towards use in an existing Traefik Proxy setup.

Prerequisites Link to heading

Aside from the obvious podman requirement. Penpot relies on container to container communication to function properly. This requires the containers to be able to resolve eachother’s internal IP based on their name. Docker does this by default however podman will require an additional package to be installed.

Podman-plugins is the package that is required. Once installed containers should be able to resolve eachother’s IP based on their name.

Essentials Link to heading

Before creating the containers, it is necassery to first create a Pod for them and a network for the containers to use.

podman network create --name penpot-network;
podman pod create --name penpot --network penpot-network;

Download the provided env file using a utility like wget.

wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/config.env;

This env file is important as it contains necassery environment variables for penpot to configure itself correctly. Leaving every value as the default is fine. However in my case I will be changing a few lines, to fit my usecase of penpot using my gitlab instance to authenticate users.

PENPOT_PUBLIC_URI=http://localhost:9001
PENPOT_FLAGS="enable-registration enable-login"

becomes

PENPOT_PUBLIC_URI=https://{MY_PENPOT_DOMAIN}
PENPOT_FLAGS=enable-login-with-gitlab,disable-registration,disable-login

Additionally the following block is found near the bottom of the env file:

# PENPOT_GITLAB_BASE_URI=https://gitlab.com
# PENPOT_GITLAB_CLIENT_ID=
# PENPOT_GITLAB_CLIENT_SECRET=

This will be uncommented and filled in with my GitLab’s base URI. The CLIENT_ID and CLIENT_SECRET are values generated when you register a new OAuth application in GitLab.

The application was given the following scopes:

  • read_user
  • openid
  • profile
  • email

The callback URL to use should look like this:

https://{YOUR_PENPOT_DOMAIN}/api/auth/oauth/gitlab/callback