2026-02-22 12:56:05 -05:00
# Service Setup Guide: Portracker
Portracker is a real-time port monitoring and service discovery tool.
## 1. Pre-Setup (Manual)
### Create Service User
- [ ] **Manual ** : Create a local user named `svc-portracker` in Synology DSM (Control Panel > User & Group).
- [ ] **Manual ** : Give this user read/write access to the `docker` shared folder.
### Get User IDs
2026-02-22 14:39:26 -05:00
- [ ] **Manual ** : SSH into your NAS and run `sudo synouser --get svc-portracker` .
2026-02-22 14:41:12 -05:00
- [ ] **Confirmed IDs ** : `User ID` (PUID) is `1043` , `Group ID` (PGID) is `65538` .
- [ ] **Action ** : Use these values in your Portainer stack environment.
2026-02-22 12:56:05 -05:00
## 2. Infrastructure Setup
### Run Setup Script
- [ ] **Action ** : Run the setup script to initialize the data directory:
```bash
sudo bash create_portracker_folders.sh
```
- **What it does**:
- Creates `/volume1/docker/portracker/data` .
- Sets ownership to the `svc-portracker` user (Note: You may need to edit the script with your specific PUID/PGID before running).
## 3. Portainer Deployment
### Environment Variables
- [ ] **Action ** : In the Portainer Stack configuration, add the following environment variables:
2026-02-22 14:41:12 -05:00
- `PUID=1043`
- `PGID=65538`
- `TZ=America/Toronto` (Replace with your actual timezone)
2026-02-22 12:56:05 -05:00
### Deploy Stack
2026-02-22 15:20:33 -05:00
- [ ] **Action ** : Create a new stack named `portracker-stack` .
2026-02-22 12:56:05 -05:00
- [ ] **Action ** : Paste the content of `docker-compose.portainer.yml` and deploy.
- [ ] **Verification ** : Access the dashboard at `http://[NAS_IP]:4999` .
> [!NOTE]
> This service requires access to the Docker socket and host PID to monitor network services. It runs with elevated capabilities (`SYS_PTRACE`, `SYS_ADMIN`).