Skip to content

Installing liwan Using Docker Compose

Create a docker-compose.yml file:

docker-compose.yml
services:
liwan:
image: ghcr.io/explodingcamera/liwan:1.7
container_name: liwan
ports:
# Bind liwan to localhost on port 9042
- "127.0.0.1:9042:9042"
volumes:
# Store liwan data in a persistent Docker volume
- liwan-data:/data
# See https://liwan.dev/reference/configuration for all configuration options
environment:
# Set the public URL where your liwan instance will be reachable
- LIWAN_BASE_URL=https://a.example.com
# Trust the reverse proxy connecting through this isolated deployment
- LIWAN_TRUSTED_PROXIES=*
volumes:
liwan-data:

Then start liwan:

Terminal window
docker compose up -d

For a public instance, add a reverse proxy for HTTPS and public routing. The * value is appropriate here because liwan is bound to host loopback and the Compose network is isolated. Use the actual proxy address or network instead if other untrusted services can connect to liwan. See the trusted proxy guidance.

To view the logs (and find the setup URL), you can run:

liwan
docker compose logs liwan
It looks like you're running liwan for the first time!
You can get started by visiting: http://localhost:9042/setup?t=1234567890
To see all available commands, run `liwan --help`