Skip to content

Configuration

shvquu edited this page Jun 16, 2026 · 3 revisions

Configuration

ServerDoctor uses two files in its data folder:

  • config.yml — storage backend, REST API and webhooks
  • messages.yml — message/format overrides (reloadable with /serverdoctor reload)

Both are created automatically on first start (written by Bukkit on Paper, copied from the jar on Velocity). Existing files are never overwritten.

Storage

storage:
  # Active backend. One of: memory | sqlite | postgresql | mariadb | mongodb
  type: sqlite

  sqlite:
    file: "serverdoctor.db"          # relative to the data folder, or absolute

  postgresql:
    host: "localhost"
    port: 5432
    database: "serverdoctor"
    username: "serverdoctor"
    password: "changeme"
    properties:                      # optional, appended to the JDBC URL as ?k=v
      sslmode: "disable"

  mariadb:
    host: "localhost"
    port: 3306
    database: "serverdoctor"
    username: "serverdoctor"
    password: "changeme"
    properties:
      useSSL: "false"
      allowPublicKeyRetrieval: "true"

  mongodb:
    connection-string: ""            # if set, takes precedence over the fields below
    host: "localhost"
    port: 27017
    database: "serverdoctor"
    username: "serverdoctor"
    password: "changeme"
    auth-database: "admin"

Details and guidance per backend: Storage Backends.

REST API

rest-api:
  enabled: false
  host: "127.0.0.1"     # use 0.0.0.0 to expose — then set a token
  port: 9173
  token: ""             # if set, every endpoint except /health requires Bearer auth

Full endpoint list and examples: REST API.

Webhooks

webhooks:
  enabled: false
  min-severity: HIGH    # INFO | LOW | MEDIUM | HIGH | CRITICAL
  targets:
    - type: discord     # discord | slack | teams
      name: "ops"
      url: ""
    - type: slack
      name: ""
      url: ""
    - type: teams
      name: ""
      url: ""

Behaviour and per-service notes: Webhooks.

Startup fallback

If the configured storage backend cannot be reached at startup, ServerDoctor logs a warning and falls back to SQLite, then to In-Memory, rather than blocking the server from starting. The active backend is printed to the log (Storage: POSTGRES, etc.). If config.yml is missing on Velocity, the REST API and webhooks simply default to disabled.

Notes

  • For MariaDB, indexed timestamp columns are stored as VARCHAR(64) (MariaDB cannot index TEXT without a prefix length). Handled automatically.
  • For MongoDB, credentials and auth-database are folded into the connection URI; a full connection-string (e.g. an Atlas SRV string) overrides the discrete fields.
  • Changing storage does not migrate existing data between backends — it starts fresh.

Clone this wiki locally