# Self-host TriliumNext

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

- Page: https://levelrail.com/templates/triliumnext/
- JSON: https://levelrail.com/templates/triliumnext.json
- Category: Productivity
- Licence: AGPL-3.0-or-later (Network copyleft (AGPL) license)
- Source: https://github.com/TriliumNext/Trilium
- Upstream docs: https://github.com/TriliumNext/Trilium

## Requirements
- Memory: about 256 MiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: stable

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| triliumnext | ghcr.io/triliumnext/trilium | stable | 8080 | triliumnext_data -> /home/node/trilium-data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| triliumnext | TZ | preset |

## Deploy

### CLI

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

### API

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

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

## Questions

### 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.

Self-host TriliumNext, TriliumNext docker compose file, deploy TriliumNext on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
