Skip to content

Configuration

Tip

Hover over any variable or label to reveal a 'copy to clipboard' button

Docker Secrets

1.0.0

PlugNPiN supports Docker Secrets for managing sensitive credentials and host URLs. This is the recommended approach for production deployments.

Precedence: Environment variables always take precedence over Docker Secrets.

Usage: Secrets' filenames must match the corresponding environment variable.

Environment Variables

Required

Variable Description Notes
ADGUARD_HOME_HOST
0.8.0
The URL of your AdGuard Home instance Only required if ADGUARD_HOME_DISABLED is set to false. Can be set using Docker Secrets
ADGUARD_HOME_USERNAME
0.8.0
Your AdGuard Home username Only required if ADGUARD_HOME_DISABLED is set to false. Can be set using Docker Secrets
ADGUARD_HOME_PASSWORD
0.8.0
Your AdGuard Home password Only required if ADGUARD_HOME_DISABLED is set to false. Can be set using Docker Secrets
NGINX_PROXY_MANAGER_HOST
0.1.0
The URL of your Nginx Proxy Manager instance. Can be set using Docker Secrets
NGINX_PROXY_MANAGER_USERNAME
0.1.0
Your Nginx Proxy Manager username. Can be set using Docker Secrets
NGINX_PROXY_MANAGER_PASSWORD
0.1.0
Your Nginx Proxy Manager password.
Important: It is recommended to create a new non-admin user with only the "Proxy Hosts - Manage" permission.
Can be set using Docker Secrets
PIHOLE_HOST
0.1.0
The URL of your Pi-Hole instance. Only required if PIHOLE_DISABLED is set to false. Can be set using Docker Secrets
PIHOLE_PASSWORD
0.1.0
Your Pi-Hole password.
Important: It is recommended to create an 'application password' rather than using your actual admin password.
Only required if PIHOLE_DISABLED is set to false. Can be set using Docker Secrets

Optional

Variable Description Default
ADGUARD_HOME_DISABLED
0.8.0
Set to false to enable AdGuard Home functionality true
DEBUG
0.1.0
Set to true to enable DEBUG level logs false
DOCKER_HOSTS
0.9.0
Comma-separated list of multiple docker hosts to monitor, with an empty string meaning the default local host.
For example DOCKER_HOSTS=,tcp://192.168.0.101:2375
""
DOCKER_HOST
0.1.0
The URL of a docker socket proxy. If set, you don't need to mount the docker socket as a volume. Querying containers must be allowed (typically done by setting the CONTAINERS environment variable to 1). None
METRICS
1.0.0
Exposes a /metrics endpoint for Prometheus scraping. See Monitoring → Prometheus. false
METRICS_SERVER_PORT
1.0.0
Port for the metrics endpoint. See Monitoring → Prometheus. 9100
PIHOLE_DISABLED
0.6.0
Set to true to disable Pi-Hole functionality false
RUN_INTERVAL
0.1.0
The interval at which to scan for new containers, in Go's time.ParseDuration format. Set to 0 to run once and exit. 1h
TZ
0.1.0
Customise the timezone. ""

Per Container Configuration

Use the following labels on your containers to enable specific features

General Options

Label Description Default Notes
plugNPiN.options.createOnHealthy
1.0.0
If set to true, PlugNPiN will wait for the container to become healthy before creating entries false This option requires the container to have a Docker Healthcheck defined. If no healthcheck is found, an error will be logged and no entries will be created

AdGuard Home

Label Description Default Notes
plugNPiN.adguardHomeOptions.targetDomain
0.8.0
If provided, a CNAME DNS Rewrite will be created

Nginx Proxy Manager

Label Description Default Notes
plugNPiN.npmOptions.accessListName
1.0.0
Access list to use for this host. Must already exist on the NPM instance
plugNPiN.npmOptions.advancedConfig
0.7.0
Advanced nginx configuration (referred to as Custom Nginx Configuration in NPM UI) If using a docker compose file make sure to use | so new lines will be respected, for example:
labels:
- plugNPiN.ip=192.168.0.100:8000
- plugNPiN.url=service.home
- |
plugNPiN.npmOptions.advancedConfig=location / {
allow 192.168.0.1/15;
deny all;
}
plugNPiN.npmOptions.blockExploits
0.4.0
Enables or disables the "Block Common Exploits" option on the proxy host. Set to true or false true
plugNPiN.npmOptions.cachingEnabled
0.4.0
Enables or disables the "Cache Assets" option on the proxy host. Set to true or false false
plugNPiN.npmOptions.certificateName
0.4.0
Certificate to use for this host. Must already exist on the NPM instance
plugNPiN.npmOptions.forceSsl
0.4.0
Force SSL false
plugNPiN.npmOptions.http2Support
0.4.0
Enable HTTP/2 Support false
plugNPiN.npmOptions.hstsEnabled
0.4.0
Enable HSTS false
plugNPiN.npmOptions.hstsSubdomains
0.4.0
Enable HSTS Subdomains false
plugNPiN.npmOptions.scheme
0.4.0
The scheme used to forward traffic to the container. Can be http or https http
plugNPiN.npmOptions.websocketsSupport
0.4.0
Enables or disables the "Allow Websocket Upgrade" option on the proxy host. Set to true or false false

Pi-Hole

Label Description Default Notes
plugNPiN.piholeOptions.targetDomain
0.5.0
If provided, a CNAME record will be created instead of a DNS record