Skip to content

Configuration

shvquu edited this page Jun 15, 2026 · 4 revisions

Configuration

ServerDoctor uses two files in its data folder:

  • config.yml — storage backend selection and credentials
  • 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.

config.yml

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

  # ---- File-based (no credentials) ----
  sqlite:
    # Relative to the plugin data folder, or an absolute path.
    file: "serverdoctor.db"

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

  # ---- MariaDB / MySQL ----
  mariadb:
    host: "localhost"
    port: 3306
    database: "serverdoctor"
    username: "serverdoctor"
    password: "changeme"
    properties:
      useSSL: "false"
      allowPublicKeyRetrieval: "true"

  # ---- MongoDB ----
  mongodb:
    # If set, takes precedence over the discrete fields below.
    # e.g. "mongodb+srv://user:pass@cluster0.example.mongodb.net/serverdoctor"
    connection-string: ""
    host: "localhost"
    port: 27017
    database: "serverdoctor"
    username: "serverdoctor"
    password: "changeme"
    # Database the credentials authenticate against (often "admin").
    auth-database: "admin"

Choosing a backend

type Credentials? Best for
memory no testing; data lost on restart
sqlite no a single server/proxy with local disk
postgresql yes networks; a shared, robust SQL store
mariadb yes networks; MySQL/MariaDB shops
mongodb yes networks already running MongoDB

For per-backend details (schema, collections, driver notes, networking), see Storage Backends.

Startup fallback

If the configured 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.).

Notes

  • For MariaDB, indexed timestamp columns are stored as VARCHAR(64) (MariaDB cannot index TEXT without a prefix length). This is 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 in the new store.

Clone this wiki locally