Skip to content

Installing Liwan Using Docker Compose

Create a docker-compose.yml file:

docker-compose.yml
version: "3.8"
services:
liwan:
image: ghcr.io/explodingcamera/liwan:1.6
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
volumes:
liwan-data:

Then start Liwan:

Terminal window
docker compose up -d

This starts Liwan on 127.0.0.1:9042 with persistent data in the liwan-data Docker volume. For a public instance, you will usually add a reverse proxy for HTTPS and public routing. See Setting up a Reverse Proxy.

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`