A OpenPGP server. Works with cleopatra. Most normal fucntions: search, publish. For stable realese use branch stable
  • Python 97.1%
  • Dockerfile 2.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-29 13:39:49 +02:00
app.py Add files via upload 2026-03-29 13:34:08 +02:00
docker-compose.yml Add files via upload 2026-03-29 13:34:08 +02:00
Dockerfile Add files via upload 2026-03-29 13:34:08 +02:00
LICENSE Initial commit 2026-03-29 13:32:35 +02:00
README.md Update README.md 2026-03-29 13:39:49 +02:00

🔐 PGP Keyserver

A simple, self-hosted OpenPGP keyserver built with Python (Flask) and GPG, running in Docker. Designed for local network use.

License

Requirements

  • Docker Desktop

File Structure

pgp-keyserver/
├── app.py
├── Dockerfile
└── docker-compose.yml

Getting Started

docker compose up -d --build

The server runs on port 11371.

Usage

Kleopatra (GUI)

  1. Open Settings → Configure Kleopatra → Directory Services
  2. Click Add
  3. Enter: hkp://localhost:11371 (or hkp://192.168.X.X:11371 for other devices on the network)
  4. Click OK and Apply

GPG (terminal)

Send a key to the server:

gpg --keyserver hkp://localhost:11371 --send-keys YOUR_KEY_ID

Search for a key:

gpg --keyserver hkp://localhost:11371 --search-keys email@example.com

Receive a key:

gpg --keyserver hkp://localhost:11371 --recv-keys YOUR_KEY_ID

Browser

Search for a key:

http://localhost:11371/pks/lookup?op=index&search=email@example.com

Retrieve a key in ASCII format:

http://localhost:11371/pks/lookup?op=get&search=FINGERPRINT

Features

  • ✅ Upload public keys
  • ✅ Duplicate prevention (checked by fingerprint)
  • ✅ Search by email (partial and full)
  • ✅ Search by key ID and fingerprint
  • ✅ Revocation certificate support
  • ✅ Compatible with Kleopatra and GPG
  • ✅ Persistent storage via Docker volume

Local Network Usage

Find your IP address:

ipconfig

Other devices on the network can use the server by adding the following in Kleopatra:

hkp://192.168.X.X:11371

Management

Stop the server:

docker compose down

View logs:

docker logs pgp-keyserver

Remove the server and all data:

docker compose down -v

Notes

  • The server starts automatically after a system reboot (requires Docker Desktop to be running)
  • Key data is stored in the Docker volume pgp-keyserver_keydata
  • This server is not intended for public internet use — no TLS or rate limiting