Configuration¶
PufferPanel is configured either via environment variables or via a JSON configuration file.
Each configuration environment variable is prefixed with PUFFER.
The configuration file is located at /etc/pufferpanel/config.json by default.
If it is not found there, PufferPanel also checks the current working directory for a config.json file.
The configuration file path can be overridden with the PUFFER_CONFIG environment variable.
Note
Relative directories in config options are relative to the current working directory of the PufferPanel process.
Configuration Options¶
Config File |
Environment Variables |
Description |
|---|---|---|
logs |
|
Path of the directory in which to place the |
web.host |
|
The IP (and port) that the HTTP server listens on. |
panel.enable |
|
Whether the panel (frontend) is enabled or not. |
panel.database.dialect |
|
The type of database that the panel is using/connecting to.
Supported:
sqlite3, mysql, postgresql, sqlserver |
panel.database.url |
|
The url of the database to use. This is specific to the dialect.
e.g. for
"sqlite3", a file:<path> URL is used.If the value is empty, |
panel.database.log |
|
Whether to enable extra verbose database logging. |
panel.web.files |
|
Path of a directory containing additional/replacement files to serve.
e.g. additional themes, branding
|
panel.web.cookies.secure |
|
Value of the |
panel.web.cookies.httpOnly |
|
Value of the |
panel.web.cookies.domain |
|
Value of the |
panel.web.cookies.age |
|
Value of the |
panel.web.cookies.sameSite |
|
Value of the |
panel.web.cookies.path |
|
Value of the |
panel.email.templateFolder |
|
Path to a directory which contains If present, |
panel.email.provider |
|
Which email provider to use for sending emails to users.
Supported:
smtp, sendgrid, mailjet, mailgun, debugIf set to an empty string or any unsupported value, emails are disabled.
|
panel.email.from |
|
The FROM field (or sender Email address) to use for outgoing emails.
With some providers, only an email address might be supported only.
|
panel.email.domain |
|
Used by the
mailgun and mailjet providers.For
mailgun: The domain registered in the admin interface.For
mailjet: The public API key. |
panel.email.host |
|
Used by the
smtp provider.For
smtp: The IP/domain and port of the mail server to connect to. |
panel.email.key |
|
Used by the
mailgun, mailjet and sendgrid providers.For
mailgun: The private API key.For
mailjet: The private API key.For
sendgrid: The private API key. |
panel.email.username |
|
Used by the
smtp provider.For
smtp: The username used to authenticate to the SMTP server. |
panel.email.password |
|
Used by the
smtp provider.For
smtp: The password used to authenticate to the SMTP server. |
panel.settings.companyName |
|
Name that is displayed in the user interface (e.g. heading). |
panel.settings.defaultTheme |
|
The theme that is selected by default, if not overridden by a user.
This theme is also used for e.g. the login page.
|
panel.settings.themeSettings |
|
The default theme settings applied to the theme selected in
These settings are also applied to e.g. the login page. |
panel.settings.masterUrl |
|
The base URL that the panel can be reached at. |
panel.sessionKey |
|
The key used to sign the session cookie.
If this value is empty, a new value is generated and saved in the config.
|
panel.registrationEnabled |
|
Whether users should be able to register accounts themselves. |
panel.token |
|
The seed used to generate the private key for signing JWTs.
If this value is empty, a new value is generated and saved in the config.
|
daemon.enable |
|
Whether the daemon (backend) is enabled. |
daemon.console.buffer |
|
Size of the memory buffer used to cache a server’s output in KB. |
daemon.console.forward |
|
Whether to forward the output of servers to stdout. |
daemon.sftp.host |
|
The IP (and port) that the SFTP server listens on. |
daemon.sftp.key |
|
The path to a file containing the private key used by the SFTP server.
If this file does not exist, it is generated with a fresh private key.
|
daemon.sftp.log |
|
Whether to enable debug logging for the SFTP server. |
daemon.auth.url |
|
The url of the panel to authenticate to. This option is only relevant for remote nodes and is provided by the panel when registering the remote node. |
daemon.auth.clientId |
|
The client identifier used by a remote node to authenticate to the panel. This option is only relevant for remote nodes and is provided by the panel when registering the remote node. |
daemon.auth.clientSecret |
|
The client secret used by a remote to authenticate to the panel. This option is only relevant for remote nodes and is provided by the panel when registering the remote node. |
daemon.data.cache |
|
The path of the directory to use as a cache folder. If this is a relative path, it will be relative to the path set in daemon.data.root. |
daemon.data.servers |
|
The path of the directory in which to store the servers’ data. If this is a relative path, it will be relative to the path set in daemon.data.root. |
daemon.data.backups.folder |
|
The path of the directory in which to store server backups. If this is a relative path, it will be relative to the path set in daemon.data.root. |
daemon.data.binaries |
|
The path of the directory in which to store downloaded binary files (e.g. Java, DepotDownloader). If this is a relative path, it will be relative to the path set in daemon.data.root. |
daemon.data.root |
|
The path of the directory to use as a data root directory. If this value is an empty string, the parent directory of the servers folder will be used instead. |
daemon.data.crashLimit |
|
The maximum amount of times that a server can crash while still being restarted. |
daemon.curseforge.key |
|
If not an empty string, overrides the default Curseforge API key provided by PufferPanel. |
daemon.depotDownloader.version |
|
The version tag that should be used when downloading DepotDownloader. |
daemon.depotDownloader.disableLancache |
|
Whether to disable the usage of a LAN cache by DepotDownloader. |
token.public |
|
The URL at which a remote node can obtain the public key of the panel. This option is only relevant for remote nodes and is provided by the panel when registering the remote node. |
security.forceOpenat |
|
Override the check for the OpenAt2 syscall and force to not use it.
This option should only be used if the implications are fully understood.
|
security.trustedProxies |
|
A list of proxy IP addresses which are trusted to provide the actual client IP via a header defined in security.trustedProxyHeader. |
security.trustedProxyHeader |
|
The name of the header which contains the actual client IP for a trusted proxy. |
security.disableUnshare |
|
Whether to globally disable the usage of unshare. Unshare provides some additional security, so disabling it for the entire panel is not recommended. Unshare can be disabled on a per-server basis if it poses problems there. |
docker.root |
|
If set to a non-empty string, overrides the directory where the server files live on the host system. This is used when the panel is also running inside a docker container. |
docker.disallowHost |
|
Whether to disable environment options that would be executed on the host (e.g. tty) |
Configuration Files with Default Values¶
{
"logs": "/var/log/pufferpanel",
"panel": {
"database": {
"dialect": "sqlite3",
"url": "file:/var/lib/pufferpanel/database.db?cache=shared"
},
"web": {
"files": "/var/www/pufferpanel"
}
},
"daemon": {
"data": {
"root": "/var/lib/pufferpanel"
}
},
"web": {
"host": "0.0.0.0:8080"
}
}
{
"logs": "/var/log/pufferpanel",
"panel": {
"database": {
"dialect": "sqlite3",
"url": "file:/var/lib/pufferpanel/database.db?cache=shared"
},
"web": {
"files": "/var/www/pufferpanel"
}
},
"daemon": {
"data": {
"root": "/var/lib/pufferpanel"
}
},
"docker": {
"disallowHost": true
}
}
If a value is not set in the config file or in the environment variable, these values are used.
{
"logs": "logs",
"web": {
"host": "0.0.0.0:8080"
},
"panel": {
"enable": true,
"database": {
"dialect": "sqlite3",
"url": "",
"log": false
},
"web": {
"files": "www",
"cookies": {
"secure": false,
"httpOnly": true,
"domain": "",
"age": 2592000,
"sameSite": "Strict",
"path": "/"
}
},
"email": {
"templateFolder": "",
"provider": "",
"from": "",
"domain": "",
"host": "",
"key": "",
"username": "",
"password": ""
},
"settings": {
"companyName": "PufferPanel",
"defaultTheme": "PufferPanel",
"themeSettings": {},
"masterUrl": "http://localhost:8080"
},
"sessionKey": "",
"registrationEnabled": true,
"token": ""
},
"daemon": {
"enable": true,
"console": {
"buffer": 50,
"forward": false
},
"sftp": {
"host": "0.0.0.0:5657",
"key": "sftp.key",
"log": false
},
"auth": {
"url": "http://localhost:8080",
"clientId": "",
"clientSecret": ""
},
"data": {
"cache": "cache",
"servers": "servers",
"backups": {
"folder": "backups"
},
"binaries": "binaries",
"crashLimit": 3,
"root": ""
},
"curseforge": {
"key": ""
},
"depotDownloader": {
"version": "latest",
"disableLancache": false
}
},
"token": {
"public": ""
},
"security": {
"forceOpenat": false,
"trustedProxies": [],
"trustedProxyHeader": "",
"disableUnshare": false
},
"docker": {
"root": "",
"disallowHost": false
}
}