Skip to content

Installing liwan Using Docker

To run liwan with Docker:

Terminal window
docker run -d --name liwan \
-p 127.0.0.1:9042:9042 \
-v liwan-data:/data \
-e LIWAN_BASE_URL=https://a.example.com \
-e LIWAN_TRUSTED_PROXIES=172.17.0.0/16 \
ghcr.io/explodingcamera/liwan:1.7

The important parts are:

  • -p 127.0.0.1:9042:9042 binds liwan to localhost on port 9042.
  • -v liwan-data:/data stores liwan data in a persistent Docker volume.
  • Set LIWAN_BASE_URL to the instance’s public URL.
  • LIWAN_TRUSTED_PROXIES allows a reverse proxy on the host to supply the client IP through Docker’s bridge network.

For a public instance, add a reverse proxy for HTTPS and public routing. Docker’s default bridge network is commonly 172.17.0.0/16, as shown above. Check the actual subnet with docker network inspect bridge and update LIWAN_TRUSTED_PROXIES when it differs. See the trusted proxy guidance.

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

liwan
docker 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`