Installing Kantree with Docker
In this article
Kantree is distributed as a Docker image. It runs in one container (app) next to PostgreSQL, Redis and nginx.
We provide two files to get started:
docker-compose.yml: a working example that starts all the containersnginx-docker.conf: the reverse proxy configuration used by the example
Starting Kantree
First, install Docker and Compose.
Then, next to docker-compose.yml, create a .env file containing a secret key:
KANTREE_SECRET_KEY=<random value>
Use a random value of at least 32 characters, for example generated with openssl rand -hex 32. Keep it stable: changing it logs every user out. See Secret keys.
Start the containers:
$ docker compose up -d
Kantree is then available at http://localhost:8080.
Running and configuring the container
What the container runs, how to run Kantree commands and how to configure it are explained in the Container chapter.
Creating an admin user
Create an administration user from the command line (see Running commands):
$ docker compose run --rm app create-admin USERNAME EMAIL
Make an existing user an admin:
$ docker compose run --rm app make-admin USERNAME
Serving from your own domain
The example works on http://localhost:8080. To serve Kantree from your own domain name, set server_name, server_secured and push_server_url as explained in Hostnames.
The default push_server_url of the container (http://localhost:8080) is only correct for the example: you must set it when you use another address.
Serving Kantree using HTTPS
To serve Kantree behind HTTPS, your reverse proxy must handle TLS. Update the nginx configuration as explained in their documentation, or use your own reverse proxy.
Then set server_secured: true and use https:// in push_server_url (see Hostnames).
Using your own reverse proxy
If you already use a central reverse proxy, you can use it instead of the nginx container of the example. Forward these paths to the app container. WebSocket upgrades are required for the first three:
| Path | Port |
|---|---|
/ |
5000 (web server) |
/socket.io |
4000 (push server) |
/hocuspocus |
4500 (collaboration server) |
/mcp, /.well-known/oauth-protected-resource/mcp |
4600 (MCP server, when enabled) |
Accept request bodies of at least the size of your largest uploaded file: the example accepts 50 MB (client_max_body_size in nginx).
Use nginx-docker.conf as a reference for the headers and timeouts.
Tip: on RHEL/CentOS/Rocky, if nginx reports a permission denied error when trying to connect the upstream (kantree), it is due to SELinux. You will need to modify SELinux as explained here.
Web administration console
You can manage users and teams from the online administration console located at /admin (eg: http://localhost:8080/admin). Note that you need to be an admin to access this console, refer to the Creating an admin user section.