Container keeps restarting

The app is exiting at startup and restart: unless-stopped starts it again. The reason is in the container log:

docker compose logs --tail 50 netlens      # or: docker logs --tail 50 netlens
docker inspect netlens --format '{{.State.ExitCode}} {{.State.Error}}'

Common causes

Log message Fix
PermissionError: [Errno 13] Permission denied: '/data...' The data directory is not writable by the container user. Only happens with your own data folder: run sudo chown 10001:10001 <that folder>
Is a directory / the page asks for a token you never set Old files: the token is optional now. Use docker-compose.simple.yml, or leave NETLENS_TOKEN empty to get the first-start wizard
NETLENS_RANGES contains non-scannable range Use private ranges only, no larger than /20
NETLENS_BIND must be in format host:port Fix the value, for example 0.0.0.0:8080
address already in use Another service on the host already uses port 8080 (the container uses host networking). Change NETLENS_BIND

Compose refuses to start

If docker compose up itself refuses to start, the message names the missing variable (none of the shipped compose files require one). Run docker compose config to see the final configuration with all variables filled in.