Skip to main content

Installation

Before you start

Pocket ID requires a secure context, meaning it must be served over HTTPS. This is necessary because Pocket ID uses the WebAuthn API.

  1. Download the docker-compose.yml and .env file:

     curl -O https://raw.githubusercontent.com/pocket-id/pocket-id/main/docker-compose.yml

    curl -o .env https://raw.githubusercontent.com/pocket-id/pocket-id/main/.env.example
  2. Edit the .env file so that it fits your needs. See the environment variables section for more information.

  3. Run docker compose up -d

You can now sign in with the admin account on http://localhost:3000/login/setup.

Stand-alone Installation (advanced)

Required tools:

  1. Copy the .env.example file in the frontend and backend folder to .env and change it so that it fits your needs.

    cp frontend/.env.example frontend/.env
    cp backend/.env.example backend/.env
  2. Run the following commands:

    git clone https://github.com/pocket-id/pocket-id
    cd pocket-id

    # Checkout the latest version
    git fetch --tags && git checkout $(git describe --tags `git rev-list --tags --max-count=1`)

    # Start the backend
    cd backend/cmd
    go build -o ../pocket-id-backend
    cd ..
    pm2 start pocket-id-backend --name pocket-id-backend

    # Start the frontend
    cd ../frontend
    npm install
    npm run build
    pm2 start --name pocket-id-frontend --node-args="--env-file .env" build/index.js

    # Optional: Start Caddy (You can use any other reverse proxy)
    cd ..
    pm2 start --name pocket-id-caddy caddy -- run --config reverse-proxy/Caddyfile

You can now sign in with the admin account on http://localhost/login/setup.

Unofficial Installation Methods

important

These installation methods are not officially supported, and services may not work as expected.

Proxmox

Run the helper script as root in your Proxmox shell.

Configuration Paths

  • /opt/pocket-id/backend/.env
  • /opt/pocket-id/frontend/.env
bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/pocketid.sh)"

Unraid

Pocket ID is available as a template on the Community Apps store.

Kubernetes Helm Chart

A Helm chart maintained by @hobit44 is available here.