Skip to content

Configuration

Specifying the Configuration File

The configuration file is specified using the -f parameter when running the panel application.

shell
dpanel server:start -f /etc/dpanel/config.yaml

Modify Configuration

Directly Modify config.yaml

Simply modify the corresponding configuration in the config.yaml file.

Override Configuration via Startup Command

shell
dpanel server:start -f /etc/dpanel/config.yaml -e STORAGE_LOCAL_PATH=/home/dpanel

Override Configuration via Environment Variables

shell
export STORAGE_LOCAL_PATH=/home/dpanel && dpanel server:start -f /etc/dpanel/config.yaml

Parameter Description

NameDescriptionDefault ValueVersion
APP_NAMEProgram Namedpanel-
APP_VERSIONProgram version--
APP_SERVER_PORTProgram execution port8086-
STORAGE_LOCAL_PATHData directory generated by the program./-
DB_MODEDatabase read/write mode ro|rw|rwcrwc-
DP_SYSTEM_BASEURLPanel access baseurl-> 1.9.1
DP_SYSTEM_DOCKER_INIT_TIMEOUTTimeout for initializing or switching Docker servers10 seconds> 1.9.1

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: 0.0.0.0
    port: ${APP_SERVER_PORT-8086}
  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: ${DB_MODE}
system:
  baseurl: ${DP_SYSTEM_BASEURL}
  storage:
    local:
      path: ${STORAGE_LOCAL_PATH}
  permission:
    default_username: __public__
  docker:
    timeout: ${DP_SYSTEM_DOCKER_TIMEOUT-10}