services: kopia: image: kopia/kopia:latest container_name: kopia hostname: kopia-server environment: # Reads the password from the .env file - KOPIA_REPOSITORY_PASSWORD=${KOPIA_REPOSITORY_PASSWORD} # --- User/Group Permissions --- # These are still good practice, even on Windows. # 1000 is a common default. - PUID=1000 - PGID=1000 - KOPIA_SERVER_USERNAME=${KOPIA_SERVER_USERNAME} - KOPIA_SERVER_PASSWORD=${KOPIA_SERVER_PASSWORD} ports: # Exposes the Kopia Web UI on port 51515 - "51515:51515" volumes: # --- Kopia Internal Config/Cache --- # These stay as Docker-managed volumes. - kopia_config:/app/config - kopia_cache:/app/cache - kopia_logs:/app/logs # --- YOUR BACKUP DESTINATION --- # Maps your host's G:\kopia-backups to /app/repository inside the container. # Kopia will write its backup data here. - g:/kopia-backups:/app/repository # --- YOUR SOURCE DATA --- # Maps your host's E:\installers and H:\immich-photos to /source/installers inside the container. # ':ro' (read-only) is a safety best practice. - e:/installers:/source/installers:ro - h:/immich-photos:/source/immich-photos:ro command: - server - start - --ui - --address=0.0.0.0:51515 - --insecure - --password=${KOPIA_REPOSITORY_PASSWORD} - --server-username=${KOPIA_SERVER_USERNAME} - --server-password=${KOPIA_SERVER_PASSWORD} restart: unless-stopped # Defines the Docker-managed volumes for config/cache/logs # The repository is no longer here because it's a direct host mount. volumes: kopia_config: kopia_cache: kopia_logs: