Install PKI Manager and log in
Source:
docs/guides/get-started.md
This guide runs PKI Manager with Docker Compose and the published images. It takes about ten minutes. Every step below was run on a clean machine with release 3.15.0.
You get three containers:
| Container | What it does |
|---|---|
pki-frontend |
Web UI (nginx). It also forwards /trpc and /api to the backend, so the browser needs only this URL. |
pki-backend |
API, certificate logic, SQLite database in pki/. |
pki-kms |
Cosmian KMS. It keeps every private key. It is on an internal network, not published to the host. |
1. Get the Compose files
Section titled “1. Get the Compose files”You need Docker with the Compose v2 plugin (docker compose).
git clone https://github.com/oriolrius/pki-manager-web.gitcd pki-manager-web/dockercp .env.example .env2. Set the essentials in .env
Section titled “2. Set the essentials in .env”Open .env and set these values. The defaults work on localhost.
| Variable | Set it to | Why |
|---|---|---|
IMAGE_TAG |
a release, for example 3.15.0 |
latest changes under you; pin a version. |
FRONTEND_EXTERNAL_PORT / BACKEND_EXTERNAL_PORT |
free ports (default 8080 / 3000) |
Host ports of the UI and the API. |
FRONTEND_URL |
the URL people open, for example http://localhost:8080 |
CORS. |
CRL_DISTRIBUTION_URL |
a URL that clients can reach, ending in /crl |
It is written into every certificate you issue, so set it before the first CA. |
3. Create the data folder for the backend
Section titled “3. Create the data folder for the backend”The backend runs as user 1001 and keeps its database in ../pki. If Docker creates that
folder, root owns it and the backend stops with SqliteError: unable to open database file.
Create it first:
mkdir -p ../pkisudo chown 1001:1001 ../pkiNote: if your shell uses
umask 077, the files fromgit cloneare readable only by you, and nginx in the container answers403forconfig.json. Runchmod 644 config.json.
4. Start it
Section titled “4. Start it”docker compose pulldocker compose up -d --no-build --wait--no-build uses the published images (the Compose file can also build from source).
--wait returns when all three containers are healthy. The backend runs its database
migrations on every start.
Check it:
curl -s http://localhost:3000/health# {"status":"ok","timestamp":"…"}Open http://localhost:8080.
5. Choose how people log in
Section titled “5. Choose how people log in”Without OIDC (the default .env), there is no login and the API accepts every call
without a token. Use this only to try PKI Manager on your own machine.
With OIDC (any real use), PKI Manager trusts an identity provider such as Keycloak, Auth0,
Okta or Microsoft Entra ID. Two roles exist: user (view, issue, download) and admin
(also create CAs, revoke, delete).
-
In
.env, set the backend side:Terminal window OIDC_ISSUER=https://keycloak.example.com/realms/pkiOIDC_AUDIENCE=pki-webOIDC_ROLES_CLAIM=realm_access.roles -
In
docker/config.json(served to the browser), set the frontend side:{"oidc": {"authority": "https://keycloak.example.com/realms/pki","clientId": "pki-web","scope": "openid profile email"}} -
docker compose up -d --no-build --waitagain.
The client pki-web is a public client with PKCE (no client secret). Its redirect URI is
<your UI URL>/callback. Step-by-step setup: Keycloak, and
OIDC for other providers and the details.
The browser now goes to your identity provider first:

6. First look
Section titled “6. First look”After login you see the dashboard. A new install has no CAs and no certificates yet.

The top bar has four entries:
-
Dashboard: counters, and the certificates and CAs that expire next.
-
PKI: Certificate Authorities, Certificates, Bulk operations.

-
SSH: the SSH certificate authority (user and host certificates). Start with the SSH video series.
-
Operations: Integrations (tokens for automation and Kubernetes) and the API documentation.

Your name (top right) opens the user menu. The sun icon switches light and dark mode.
Stop or remove
Section titled “Stop or remove”docker compose down # stop; the data stays on diskAll data is in two folders next to docker/: pki/ (database) and kms/data/ (KMS keys).
Back up both together. To start again from zero, stop the stack and delete both folders.