Self-host Dex with Levelrail

OpenID Connect identity provider that fronts other identity sources. The install form carries config.yaml as an editable file, so it starts with a local database and the issuer address you choose.

  • Authordexidp
  • LicenceApache-2.0
  • Memory128 MiB
  • Services1

How to self-host Dex

  1. Pull the images

    One image is pulled on your server.

    Show images
    • ghcr.io/dexidp/dex:v2.46.1
  2. Create the app

    One service starts in a single Compose app, with 1 named volume mount for your data, on port 5556.

  3. Fill in the secrets

    You do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

After the first start

  • Open the address followed by /dex/.well-known/openid-configuration to see the discovery document, then edit the config file setting to add connectors and static clients.

Dex requirements

Memory
About 128 MiB
Architectures
amd64 unknown, arm64 unknown
Ports
5556
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
Apache-2.0, permissive license
  • Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Dex. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the Dex docs page.

Deploy Dex your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy Dex from the CLI

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain dex=app.example.com.

levelrail-cli templates install dex --name my-dex

Deploy Dex with the API

Create a token in the dashboard first. Name, env and domains are the request fields.

curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/dex/install \
  -d '{
    "name": "my-dex"
  }'

Dex configuration

Dex services

ServiceImagePortsVolumes
dex ghcr.io/dexidp/dex:v2.46.1 5556 data -> /var/dex

Dex environment variables

The catalog lists no environment variables for this template.

Ports and volumes

Ports
5556
Volumes
1 named mount: data -> /var/dex

Dex FAQ

How much memory does Dex need?

The catalog lists about 128 MiB of memory for Dex.

Does Dex run on arm64?

For Dex, arm64 support is not confirmed; amd64 is unknown.

What licence is Dex under?

Dex is licensed under Apache-2.0, which is permissive, with few conditions on reuse.

Does Dex need configuration before it starts?

No. The template fills in its own defaults.

Which ports does Dex use?

Dex listens on port 5556 inside the stack.

Where does Dex keep its data?

In a named volume: data mounted at /var/dex.

Can I deploy Dex on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Dex, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image ghcr.io/dexidp/dex:v2.46.1 is what you deploy there.

levelrail-cli templates install dex --name my-dex