Introduction
SelfDocHub is a self-hosted hub for collecting, merging and publishing API documentation. This page explains what it does and how the rest of the documentation is organized.
Your services push their OpenAPI/Swagger, GraphQL, OpenRPC or AsyncAPI specifications to a SelfDocHub instance running on your own infrastructure. SelfDocHub stores every submission as a version, merges the services into one searchable web UI and keeps the history of changes.
What you get#
- One place for all APIs. Every service is published through a simple HTTP call from its CI pipeline, with a per-service token. See Publishing a Specification.
- Versions and branches. Every accepted specification is kept as a version. SelfDocHub computes a Change Log between versions and marks breaking changes.
- Try-It. Send real requests to your environments from the endpoint page, save them, share them by link and copy them as code. See Try-It.
- Markdown overlays. Editors can replace descriptions of services, tags, endpoints and parameters without touching the source specification. See Markdown Overlays.
- Your own structure. Arrange a service as folders, tags, endpoints and hand-written text pages. See Service Structure and Text Pages.
- Export. Produce DOCX, PDF, HTML or Markdown documents with the Export Wizard.
- AI access. Let an AI client read your documentation over the Model Context Protocol. See MCP Server.
- Access control. Roles, teams, two-factor authentication and OpenID Connect single sign-on. See Roles and Permissions.
Supported formats#
| Format | Notes |
|---|---|
| OpenAPI / Swagger | Swagger 2.0 is converted to OpenAPI 3 |
| OpenRPC | JSON-RPC methods |
| GraphQL | SDL text or an introspection result |
| AsyncAPI | Versions 2.0–2.6 and 3.x; no Try-It |
A service has exactly one format. The format is detected from the first published version and locked for that service.
How it is built#
SelfDocHub is a single Go binary with the web interface embedded. State lives in one data directory: an SQLite database plus plain files for specifications, overlays and exports. There is no separate database server to run. Run exactly one instance per data directory.
Roles at a glance#
SelfDocHub has three user roles: admin, editor and reader. Pages in this documentation mention the role needed for an action. The full matrix is in Roles and Permissions.
Guides to the features#
- Self-hosted OpenAPI documentation portal and merging specs of many services
- GraphQL, AsyncAPI and OpenRPC documentation
- API changelog and breaking change detection
- MCP server for AI assistants
- Export to PDF, DOCX, HTML and Markdown
- An internal API portal for your teams