Something went wrong. Try again.
deployment templates for lichen
Something went wrong. Try again.
README.md
Lichen Docker Compose Deployment #
Deploy lichen to any VPS with Docker.
Quick start #
- Copy this directory to your server
- Create
.envfrom the example:cp .env.example .env # edit .env — set DOMAIN and ADMIN_PASSWORD - Point your domain's DNS A record to the server IP
- Start:
docker compose up -d - Caddy automatically obtains a TLS certificate via Let's Encrypt
Custom binary (optional) #
To run a custom-built lichen instead of the image default:
mkdir -p bin
# build locally and copy, or scp from your dev machine:
scp your-machine:path/to/target/release/lichen bin/
docker compose restart app
The entrypoint checks for bin/lichen and uses it for both admin commands and
hosted startup (lichen server --multi --root-dir /data run). Update
entrypoint.sh together with the binary; the image fallback must also supply lichen.
Remove the file and restart to revert to the standard image.
tmpfs for preview builds (optional) #
Lichen uses /tmp for temporary preview builds. You can mount it as tmpfs (RAM-backed) for faster previews and reduced SSD wear:
docker compose -f docker-compose.yml -f docker-compose.tmpfs.yml up -d
Set LICHEN_TMPFS_SIZE in .env to adjust the size (default: 512m):
LICHEN_TMPFS_SIZE=1g
Verify it's working inside the container:
docker compose exec app mount | grep /tmp
# should show: tmpfs on /tmp type tmpfs ...
Files #
docker-compose.yml— service definitions (app + caddy)docker-compose.tmpfs.yml— optional override to mount /tmp as tmpfsentrypoint.sh— startup script (admin user, custom binary check)Caddyfile— HTTPS with on-demand TLS via Let's Encrypt.env.example— configuration templatebin/— drop a custom lichen binary here (gitignored)