# Service Setup Guide: Paperless-ngx ## 1. Pre-Setup (Manual) ### Create Service User - [ ] **Manual**: Create a user named `svc-paperless` in Synology Control Panel. - [ ] **Manual**: Give this user read/write access to the `docker` and `media` shared folders. ### Get User IDs - [ ] **Manual**: SSH into NAS and run `id svc-paperless`. - [ ] **Expected Output**: `uid=1036(svc-paperless) gid=65538(svc-group)`. - [ ] **Action**: Note these IDs for the `stack.env` file. ## 2. Infrastructure Setup ### Run Setup Script - [ ] **Action**: Run the setup script from this directory: ```bash sudo bash create_paperless_folders.sh ``` - **What it does**: - Creates `/volume1/docker/paperless/{data,media,consume,export}`. - Creates `/volume1/docker/paperless/redisdata`. - Sets ownership to `svc-paperless`. ## 3. Portainer Deployment ### Environment Variables - [ ] **Action**: Create or update `stack.env` in Portainer with: - `PUID=1036` (Replace with your actual ID) - `PGID=65538` (Replace with your actual ID) - `PAPERLESS_SECRET_KEY` (Generate a long random string) ### Deploy - [ ] **Action**: Create a new stack named `paperless` in Portainer. - [ ] **Action**: Paste `docker-compose.portainer.yml` and deploy. - [ ] **Verification**: Access Paperless at `http://[NAS_IP]:8010`.