version: '3.8' services: webtop: # Using the Ubuntu base with XFCE desktop environment for a great balance of features and low resource usage image: lscr.io/linuxserver/webtop:ubuntu-xfce container_name: webtop restart: always # Note on Root Exception: Linuxserver.io images require root privileges at boot to run s6-overlay # initialization scripts (like setting folder permissions). They internally drop privileges # down to the ${PUID} and ${PGID} provided in the environment section to run the actual application. # Therefore, we do NOT use the `user:` directive here. security_opt: - seccomp:unconfined # Required for some internal applications (e.g. Chrome inside the container) to function properly environment: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} - TITLE=${TITLE:-Webtop} volumes: # Maps the virtual desktop's /config (home directory) to persistent NAS storage - /volume1/docker/webtop/config:/config:rw # Optional: You can mount media folders here so you can access your NAS files from inside the virtual desktop # - /volume1/media:/media:rw ports: - "3030:3000" # HTTP Access # - "3001:3001" # HTTPS Access (Optional, usually handled by a reverse proxy instead) # shm_size is important for web browsers (like Chrome/Firefox) running inside the container to prevent crashing shm_size: "1gb"