Skip to content

Installation

kataba is a Node.js application with a MariaDB database. It runs directly with Node.js, as described here, or as a Docker image, which is the simpler way for most servers. Each kataba instance serves exactly one organisation.

Requirements

  • Node.js, a current release; kataba is developed on Node 26. Only needed without Docker.
  • MariaDB, with an empty database and a user with full privileges on it.
  • Authentik as the identity provider that users sign in with, see Sign-in and roles.
  • Disk space for uploaded images and attachments, outside the application's directory. kataba needs no object storage or other services.
  • A reverse proxy that terminates TLS in front of kataba, such as nginx, Caddy or Traefik, for any instance that others reach.

Installing with Node.js

1. Get kataba

git clone https://git.mike-ochmann.de/MassiveDynamic/kataba.git
cd kataba
git checkout v1.3.0   # the release to install
npm install

npm install also generates the database client and compiles the translations.

2. Create the database

As a database admin, create the database and a user for kataba:

CREATE DATABASE kataba;
CREATE USER 'kataba'@'localhost' IDENTIFIED BY 'secret';
GRANT ALL PRIVILEGES ON kataba.* TO 'kataba'@'localhost';

3. Configure

cp .env.example .env
npx auth secret   # writes AUTH_SECRET into .env

Then fill in the other values in .env, see Configuration: at least DATABASE_URL, UPLOAD_DIR, AUTH_URL and the Authentik application.

4. Apply the schema

npx prisma migrate deploy

This creates kataba's tables in the empty database. Run it again after each update.

5. Build and start

npm run build
npm start

kataba now listens on port 3000; PORT chooses another. Point your reverse proxy at it, and keep it running with your server's service manager, such as a systemd unit.

The first sign-in

A new instance is empty. Sign in as a member of the admin group: you become kataba's first admin, and can give the instance a name and an accent colour in the settings, build the categories and write the home page.

To move an existing instance to a new server instead, restore a backup into the new instance before anyone signs in.