Self-hosting

Hidoki runs as one Node process with a SQLite database and a folder of uploads. We recommend running it with Docker Compose.

Quick start

On your server
$ git clone <repository-url> hidoki && cd hidoki
$ docker compose up -d --build
$ docker compose logs hidoki

Open http://localhost:8080, enter the setup code from docker compose logs hidoki, and create the first admin and the first workspace. Compose publishes the port on localhost only, so on a remote machine use an SSH tunnel or put your proxy in front first. The code works once and stops working when setup is done. Your data lives in the hidoki-data Docker volume: the database and the uploaded files.

The container runs as a non-root user and answers health checks at /api/v1/health.

What you need

  • A machine with Docker and Docker Compose
  • A domain name and a TLS proxy such as Caddy, or a Cloudflare Tunnel
  • SMTP details, if you want Hidoki to email invites and password resets

To run it without Docker, use Node 24 or later with npm ci, npm run build and npm start.

Configuration

Put settings in a .env file next to docker-compose.yml. The ones most installs set:

VariableWhat it does
HIDOKI_PUBLIC_URLThe address people reach Hidoki at. Used in emailed links, push and webhooks. Set it to your HTTPS URL.
HIDOKI_HOST_PORTThe host port Docker Compose publishes. Defaults to 8080.
HIDOKI_HOST_BINDThe host interface Docker Compose publishes on. Defaults to 127.0.0.1, so nothing is exposed until you choose to.
HIDOKI_SMTP_URLSMTP connection URL for invites and password resets.
HIDOKI_MAIL_FROMThe From address for outgoing mail.
HIDOKI_MAX_UPLOAD_MBThe upload size limit. Defaults to 50.
HIDOKI_TRUST_PROXYHow to find the client IP behind a proxy: a hop count, or cloudflare.
HIDOKI_TWIST_COMPATSet to 1 to turn on the adapter for existing Twist API scripts.

Hidoki generates web push keys on first start and keeps them in the database.

Behind a proxy

Put a TLS-terminating proxy in front, pass WebSocket upgrades on /api/v1/ws, and set HIDOKI_PUBLIC_URL to your HTTPS address. With Caddy, this is the whole config:

Caddyfile
chat.example.com {
    reverse_proxy 127.0.0.1:8080
}

Set HIDOKI_TRUST_PROXY=1 with one proxy in front, so rate limits see the real client IP. The guide also covers running Hidoki behind a Cloudflare Tunnel.

Backups and upgrades

The backup script copies the database with SQLite's online backup while Hidoki keeps running, checks the copy, and saves the uploaded files next to it. Run it from cron and copy the result off the machine.

Back up, then upgrade
$ scripts/backup.sh /srv/backups/hidoki
$ git pull
$ docker compose up -d --build

Database migrations run on start. scripts/restore.sh puts a backup back in place, on the same machine or a new one.

The full guide

The self-hosting guide in the repository has every setting, the Cloudflare Tunnel setup, email, push notifications through a relay, and restore steps: docs/self-hosting.md.