System Variables
These environment variables are injected by the PCS when an app is installed. Use them in your docker-compose.yml instead of hardcoding values.
Available variables
| Variable | Example value | Description |
|---|---|---|
$APP_DOMAIN | yourname.nsl.sh | The user's domain root. Use for Caddy labels: myapp-${APP_DOMAIN} |
$APP_PUBLIC_IP_DASH | 203-0-113-42 | Public IPv4 with dots replaced by dashes. Used for nip.io / sslip.io addresses. |
$AUTH_HASH | (generated) | Secure token for AppShield authentication. Pair with index: /?hash=$AUTH_HASH. |
$APP_DEFAULT_PASSWORD | (generated) | Securely generated password for first-boot admin/DB credentials. |
$APP_EMAIL | admin@yourname.nsl.sh | Admin email address for the app. |
$AppID | myapp | The app's name, derived from the compose name: field. Used in volume paths: /DATA/AppData/$AppID/. |
$PUID | 1000 | User ID for file ownership. Use with user: $PUID:$PGID for user-facing directories. |
$PGID | 1000 | Group ID for file ownership. |
$TZ | Asia/Seoul | System timezone. |
Usage examples
In Caddy labels
labels:
caddy_0: myapp-${APP_DOMAIN}
caddy_1: myapp-${APP_PUBLIC_IP_DASH}.nip.io
caddy_2: myapp-${APP_PUBLIC_IP_DASH}.sslip.io
In volume paths
volumes:
- /DATA/AppData/$AppID/config/:/app/config
- /DATA/AppData/$AppID/data/:/app/data
In environment
environment:
ADMIN_PASSWORD: $APP_DEFAULT_PASSWORD
ADMIN_EMAIL: $APP_EMAIL
TZ: $TZ
tip
Never hardcode domain names, IP addresses, or passwords. Always use these variables so your app works correctly on any PCS.