Henglos IO
Getting started

Self-hosting

Run Henglos IO on your own machine or server, with Docker.

Henglos IO is self-hosted: the hosting (the API, accounts, workflows, packages) and the studio (the web app) run on your machine or server, and your drivers connect to it.

With Docker Compose

The repository's deploy/docker folder has everything: the two images, with Caddy in front to serve them on one address.

Browser ──▶ Caddy ──▶ /io/*  ──▶ hosting   (API, sockets, collaborative editing)
                  └─▶ the rest ──▶ studio

Configure

cd deploy/docker
cp .env.example .env

Fill in the two secrets in .env — openssl rand -hex 32 makes one:

.env
HIO_JWT_SECRET=…
HIO_SECRETS_KEY=…

Every setting is in Configuration.

Start

docker compose up -d

Open it

Go to http://<this machine>. With no account yet, it opens the setup page — the account you create there is the instance's first user. Afterwards it goes straight to the login.

With a domain (HTTPS)

Point the domain's DNS to the machine, open ports 80 and 443, and set it in .env — Caddy gets a certificate from Let's Encrypt on its own:

.env
HIO_SITE_ADDRESS=hio.example.com
docker compose up -d

The images

ImagePortWhat it is
henglosio/hosting3333The API (/io/api), the sockets (/io/ws) and the collaborative editing (/io/collab).
henglosio/studio5173The web app.

Both are tagged by version (1.0.0-beta.1) and have a healthcheck.

  • The hosting keeps everything in /data — the database (SQLite) and the installation's id: mount a volume there. On every start it brings the database up to date, then serves.
  • The studio calls the hosting on its own origin (/io/*), so the two must be served behind one address — by Caddy, as above, or by your own reverse proxy or Ingress, sending /io/* to the hosting (WebSockets included) and the rest to the studio.

Without Compose, the same thing by hand:

docker volume create hio-data
docker run -d --name hio-hosting -v hio-data:/data \
  -e HIO_JWT_SECRET=… -e HIO_SECRETS_KEY=… \
  henglosio/hosting:1.0.0-beta.1
docker run -d --name hio-studio henglosio/studio:1.0.0-beta.1
# …and a reverse proxy in front of both, as described above.

Updates

Change the images' tags in docker-compose.yaml to the new version, then:

docker compose pull
docker compose up -d

The database is brought up to date when the hosting starts.

Backups

Everything is in the hio-data volume. Stop the hosting and copy it:

docker compose stop hosting
docker run --rm -v henglos-io_hio-data:/data -v "$PWD":/backup alpine \
  tar czf /backup/hio-data.tgz -C /data .
docker compose start hosting

Keep HIO_SECRETS_KEY with the backup

Saved credentials are encrypted with it — a backup restored with another key has them unreadable.

From source

To work on Henglos IO itself, the repository is a pnpm + Turborepo monorepo:

pnpm install
cp apps/hosting/example.env apps/hosting/.env
pnpm --filter hosting db:push
(cd apps/hosting && docker compose -f docker-compose.dev.yaml up -d)   # a local registry (Verdaccio) on :4873
pnpm dev
ServicePortWhat it is
Studio5173The web app
Hosting3333The API, under /io
Package registry4873A local Verdaccio for your own packages

The repository's Caddyfile serves both at https://hio.localhost (caddy run).

On this page