Contents
- First, determine the purpose of your own service
- Choose a truly available implementation
- Separate parser, cryptography, and service
- TLS, interfaces and limits
- Identities and email need separate rules
- Back up the database and the necessary operational context
- Updates and ongoing verification
- Frequently asked questions
First, determine the purpose of your own service
A custom keyserver can be useful for an organization that needs clear rules for public key distribution and control over operations. This does not mean creating a simple form that stores every block of text. A public service works with unknown inputs, personal data, updates, and revocations. Its operation has long-term security and availability commitments.
Decide whether it will be a public search, an internal list, or a distribution of pre-approved identities. Specify the required OpenPGP profiles, number of users, and method of address verification. Without such specification, it is not possible to meaningfully select a backend or system size. Private keys do not belong in this type of distribution service.
Choose a truly available implementation
Hagrid is a publicly available implementation of a validating keyserver with VKS and HKP interfaces. Please follow the documentation for the specific release to deploy and check for dependencies. Do not expect every installation to automatically provide the same algorithms or operational model as the public keys.openpgp.org service.
CH-J Keys2 is a self-operated service with different capabilities and rules. Its source code is not publicly available as a publicly available installation project. Therefore, this article does not provide a non-existent universal installation command for Keys2. If you need your own instance, choose an implementation for which you have a legitimate distribution and operational documentation.
Separate parser, cryptography, and service
Use a maintained cryptographic library with support for the necessary profiles. The server must check the structure, validity of the necessary signatures, subkey bindings, and revocations. Prepare negative tests for corrupted, weak, and mixed inputs. Receiving text without actual validation could store invalid or confusing public identities.
Limit sensitive parsing by time, size, and appropriate isolation. The web process should not need administrative privileges or access to unnecessary secrets. Separate the database account, restore permissions, and operational management. Even public data doesn't mean that unlimited uploads can't cause memory or process exhaustion.
TLS, interfaces and limits
Ensure the correct domain, valid TLS certificate, and ongoing renewal. The reverse proxy can enforce size and frequency limits, but must maintain proper HTTP states and pass the client's trusted address to the backend. Do not rely on any header sent from the internet as a true identifier to limit requests.
For the API, set download limits, wait times, and maintenance behavior. Separate search, upload, and email requests. Validate the VKS and the HKP subset used with real clients. The public homepage can work even if certificate transfers or updates are down; monitoring must include the relevant operations.
Identities and email need separate rules
Establish consent, verification, hiding, and management before publishing addresses. Tokens should be short-lived and should not appear on public pages or support logs. Limit email abuse and test on your own authorized addresses. A successfully verified mailbox is not complete proof of personal identity.
Also decide on external search and distribution of updates. The user must understand whether their query is forwarded to other services. Open synchronization is not an automatic feature of every keyserver. If you distribute revocations, describe the conditions, identity protection, and actually supported counterparts.
Back up the database and the necessary operational context
A randomly copied database file is not sufficient for recovery. Choose a consistent backup that matches the database system and include relevant metadata for verified identities, updates, and revocations. Keep secret configuration data separate. The backup may contain non-public data that a regular public export does not reveal at all.
Perform the restore in a suitable isolated environment and prevent unwanted message sending or federated mutations from the test copy. Confirm the correct number of entries, return of public certificates, and preservation of revocations. A green report from the backup program alone does not confirm that you can actually restore the service.
Updates and ongoing verification
Maintain a test set of representative profiles before upgrading. Include import, merge, back-export, and invalid inputs. After changing the library, verify that the new security policy has not changed expected behavior without explanation. Publish current capabilities and honestly label experimental support.
- The purpose, policy, and legitimately available implementation are determined.
- Validations and limits cover unknown inputs.
- Identities and email operations have a controlled lifecycle.
- The restoration was actually carried out and verified.
- The update has a regression set and rollback procedure.
Your own keyserver gives you control over the rules, but you also take responsibility for their long-term implementation. Success is not just the first HTTP 200 response. It is the repeatable availability of the correct public certificates, secure updates, and clear trust and privacy management.
Frequently asked questions
Can I store my private key on the keyserver as a backup?
No. This type of service is intended for distributing public certificates.
Is Keys2 a publicly available installation package?
Public information describes it as a custom service; the article does not provide a non-existent generic installer.
Is it enough to test the homepage?
No. Also verify API, proper export, update, and restore.
Detailed documentation
Hagrid: public project and documentation →
systemd: isolation and service restrictions →