Self-host TriliumNext with Levelrail

Verified

A hierarchical, self-hosted notebook for building a personal knowledge base, with full-text search.

  • AuthorTriliumNextVerified by Levelrail
  • LicenceAGPL-3.0-or-later
  • Memory256 MiB
  • Archarm64
  • Services1

How to self-host TriliumNext

  1. Pull the images

    One image is pulled on your server.

    Show images
    • ghcr.io/triliumnext/trilium:stable
  2. Create the app

    One service starts in a single Compose app, with 1 named volume mount for your data, on port 8080.

  3. Fill in the secrets

    1 setting is preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

TriliumNext requirements

Memory
About 256 MiB
Architectures
amd64 image published, arm64 tested
Ports
8080
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
AGPL-3.0-or-later, network copyleft (agpl) license
  • Verified. Verified on arm64 with image tag stable. Our CI ran this exact image version and it answered on its health path. Evidence
  • Host ports. It publishes port 8080 on the host, so open them in the VPS firewall only if you want that.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then TriliumNext. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the TriliumNext docs page.

Deploy TriliumNext your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy TriliumNext from the CLI

levelrail-cli templates deploy triliumnext --name my-triliumnext

Deploy TriliumNext with the API

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/triliumnext/deploy

TriliumNext configuration

TriliumNext services

ServiceImagePortsVolumes
triliumnext ghcr.io/triliumnext/trilium:stable 8080 triliumnext_data -> /home/node/trilium-data

TriliumNext environment variables

VariableServiceValue
TZ triliumnext Preset by the template

Ports and volumes

Ports
8080
Volumes
1 named mount: triliumnext_data -> /home/node/trilium-data

TriliumNext FAQ

How much memory does TriliumNext need?

The catalog lists about 256 MiB of memory for TriliumNext.

Does TriliumNext run on arm64?

For TriliumNext, arm64 is tested; amd64 is image published.

What licence is TriliumNext under?

TriliumNext is licensed under AGPL-3.0-or-later, which is network copyleft, so source sharing also applies when it is offered as a hosted service.

Does TriliumNext need configuration before it starts?

No. The template fills in its own defaults.

Which ports does TriliumNext use?

TriliumNext listens on port 8080 inside the stack.

Where does TriliumNext keep its data?

In a named volume: triliumnext_data mounted at /home/node/trilium-data.

Can I deploy TriliumNext on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id trilium-next for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image ghcr.io/triliumnext/trilium:stable is what you deploy there.

levelrail-cli templates deploy triliumnext --name my-triliumnext