services: ntfy: image: binwiederhier/ntfy container_name: ntfy command: - serve environment: - TZ=Europe/Zurich - NTFY_BASE_URL=https://ntfy.example.com - NTFY_CACHE_FILE=/var/lib/ntfy/cache.db - NTFY_AUTH_FILE=/var/lib/ntfy/auth.db - NTFY_AUTH_DEFAULT_ACCESS=deny-all - NTFY_BEHIND_PROXY=true - NTFY_ATTACHMENT_CACHE_DIR=/var/lib/ntfy/attachments - NTFY_ENABLE_LOGIN=true - NTFY_UPSTREAM_BASE_URL=https://ntfy.sh # Connect to container: docker exec -it ntfy sh # Add admin user: ntfy user add --role=admin # Add normal user: ntfy user add # Add permission for topic: ntfy access # List access tokens: ntfy token list # Create new access token: ntfy token add # Docs: https://docs.ntfy.sh/config/#users-and-roles user: 0:0 volumes: - ./cache:/var/cache/ntfy - ./config:/etc/ntfy - ./db:/var/lib/ntfy/ ports: - 80:80 restart: unless-stopped