Knowledge Base Open Source Self Hosted

Your Docs. Your Server. Your Knowledge Base.

LibreKB is a free, open source knowledge base web app built on PHP and MySQL. It runs on pretty much any server, hosting account, or Docker, and installs in minutes.

GPL-3.0 · PHP 8.4+ · MySQL or MariaDB

The LibreKB public knowledge base home page, showing category cards for Getting Started, Billing, and Troubleshooting.

01 · Features

Everything A Help Center Needs

Write articles, organize them into categories, and publish a clean, responsive knowledge base that matches your brand.

Free And Open Source

100% free and open source under the GPL-3.0 license.

Runs Almost Anywhere

Pretty much any server, hosting account, or Docker. Installs in minutes.

Your Branding

Easy to customize branding to match your project or business, with optional custom CSS for the public site.

TinyMCE Editor

Easily edit articles with TinyMCE, and choose which buttons appear on the editor toolbar.

Nested Categories

Nest categories to any depth, then collapse and filter categories and articles on the admin dashboard.

File Attachments

Attach files to articles for readers to download.

User Groups

Manage users with predefined user groups, with password resets via email.

Organized Settings

Site settings are grouped into General, Appearance, Editor, API, and Maintenance.

Read-Only JSON API

An optional API for articles and categories, plus a responsive design based on Bootstrap.

02 · Screenshots

See It In Action

Captured from a fresh LibreKB 2.3.1 install with sample content.

LibreKB public home page with category cards.
A LibreKB article page with breadcrumb navigation, headings, and a bulleted list.
The LibreKB admin dashboard showing category and article counts and the knowledge base structure tree.

03 · API

A Read-Only API, Off By Default

Since 2.2.0, LibreKB can expose the public knowledge base as JSON for other applications. An administrator turns it on under Settings.

  • GET only, JSON responses
  • Optional API key via the X-API-Key header
  • Hidden and disabled content stays hidden
  • Configurable CORS origin
# Search articles
curl -s "https://kb.example.com/api/v1/articles/search?q=password&page=1&per_page=20"

# Get one article by id or slug
curl -s "https://kb.example.com/api/v1/articles/1" -H "X-API-Key: YOUR_KEY"
curl -s "https://kb.example.com/api/v1/articles/slug/reset-password" -H "X-API-Key: YOUR_KEY"

# Categories
curl -s "https://kb.example.com/api/v1/categories"
curl -s "https://kb.example.com/api/v1/categories/slug/getting-started"

04 · Getting Started

Install In Six Steps

  1. Check Requirements. PHP 8.4 or newer, MySQL or MariaDB, and a web server that honors .htaccess (Apache, LiteSpeed, OpenLiteSpeed, or Lighttpd). Enable pdo_mysql, curl, mbstring, and fileinfo.
  2. Upload The Files. Set the document root to the folder that contains index.php. The included .htaccess handles rewrites.
  3. Configure. Copy config.example.php to config.php, set the database details, and set systemURL to your public address.
  4. Create A Database. The database user must be allowed to create tables. PHP must be able to write storage/uploads and storage/cache.
  5. Run The Installer. Open /install and enter the admin email and password.
  6. Log In. Sign in at /login. Once that user exists, /install no longer runs.

Prefer Docker?

The repo includes a Dockerfile and docker-compose.yml with a MySQL 8.0 service.

docker compose up -d

Upgrading

Overwrite the files with the new release, keep your config.php, then visit /upgrade.

05 · Hosting

Recommended Hosting Providers

Need somewhere to run LibreKB? These hosts are a good fit.

Some links are affiliate links. Choosing one supports the project at no extra cost to you.

06 · Open Source

Free Software, GPL-3.0

LibreKB is licensed under the GNU General Public License v3.0. Report problems and request features in GitHub Issues.