Skip to main content

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

VariableExample valueDescription
$APP_DOMAINyourname.nsl.shThe user's domain root. Use for Caddy labels: myapp-${APP_DOMAIN}
$APP_PUBLIC_IP_DASH203-0-113-42Public 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_EMAILadmin@yourname.nsl.shAdmin email address for the app.
$AppIDmyappThe app's name, derived from the compose name: field. Used in volume paths: /DATA/AppData/$AppID/.
$PUID1000User ID for file ownership. Use with user: $PUID:$PGID for user-facing directories.
$PGID1000Group ID for file ownership.
$TZAsia/SeoulSystem 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.