Configuration Parameters
Specify Configuration File
Specify the configuration file using the -f parameter when running the panel program.
shell
dpanel server:start -f /etc/dpanel/config.yamlModify Configuration
Directly Modify config.yaml
Directly modify the corresponding configuration in the config.yaml file.
Override Configuration Through Startup Command
shell
dpanel server:start -f /etc/dpanel/config.yaml -e STORAGE_LOCAL_PATH=/home/dpanelOverride Configuration Through Environment Variables
shell
export STORAGE_LOCAL_PATH=/home/dpanel && dpanel server:start -f /etc/dpanel/config.yamlParameter Description
| Name | Description | Default Value | Version |
|---|---|---|---|
| APP_NAME | Program name | dpanel | - |
| APP_VERSION | Program version | - | - |
| APP_SERVER_HOST | Program binding address | 0.0.0.0 | - |
| APP_SERVER_PORT | Program running binding port | 8086 | - |
| APP_SERVER_SOCKET | Unix Socket file path for an additional program listener. Leave empty to disable it | - | - |
| STORAGE_LOCAL_PATH | Data directory generated by program running | ./ | - |
| DP_DB_MODE | Database read/write mode ro|rw|rwc | rwc | - |
| DP_ACME_COMMAND_NAME | Override acme command path | /root/.acme/acme.sh | - |
| DP_ACME_CONFIG_HOME | Override acme configuration directory | /root/.acme/ | - |
| DP_SYSTEM_BASEURL | Panel access baseurl | - | > 1.9.1 |
| DP_LOG_CONSOLE_LEVEL | Log level info|debug | info | > 1.10.0 |
| DP_RUN_IN_CONTAINER | Whether to run in container | 1 | > 1.10.0 |
| DP_DB_JOURNAL | sqlite mode WAL | DELETE | DELETE | > 1.10.0 |
Unix Socket Listener
APP_SERVER_SOCKET enables an additional Unix Socket listener alongside the existing HTTP port. For example:
shell
dpanel server:start -f /etc/dpanel/config.yaml -e APP_SERVER_SOCKET=/run/dpanel/dpanel.sockWhen enabled, the program listens on the socket file path specified by APP_SERVER_SOCKET and automatically creates the parent directory. If the path already exists and is a socket file, the old file is removed before listening again. If the path exists but is not a socket file, startup fails.
Configuration File
yaml
app:
name: ${APP_NAME-dpanel}
version: ${APP_VERSION}
env: ${APP_ENV-lite}
family: ${APP_FAMILY-ce}
server: ${APP_SERVER-http}
cors:
- http://localhost:8000
server:
http:
host: ${APP_SERVER_HOST-0.0.0.0}
port: ${APP_SERVER_PORT-8086}
socket: ${APP_SERVER_SOCKET}
prof:
host: 0.0.0.0
port: 8087
log:
default:
driver: stack
channels:
- file
- console
file:
driver: file
path: ${STORAGE_LOCAL_PATH}/logs/dpanel.log
level: warn
console:
driver: console
level: debug
database:
default:
driver: sqlite
user_name: ${DB_USERNAME-root}
password: ${DB_PASSWORD-123456}
db_name: ${STORAGE_LOCAL_PATH}/dpanel.db
charset: utf8mb4
prefix: ims_
options:
mode: ${DP_DB_MODE}
system:
baseurl: ${DP_SYSTEM_BASEURL}
storage:
local:
path: ${STORAGE_LOCAL_PATH}
permission:
default_username: __public__
docker:
timeout: ${DP_SYSTEM_DOCKER_TIMEOUT-10}