1
Install MariaDB
- Ubuntu / Debian
- Docker
- Windows
2
Create the database and user
Connect to MariaDB as root and create the database:
The default database name (
xidb), user (xiadmin), and host (127.0.0.1) match settings/default/network.lua. You can change them, but must update the settings file or environment variables to match.3
Configure database credentials
The server reads credentials from To override without editing the file, set environment variables:
settings/network.lua (or environment variables). The defaults are:4
Install Python dependencies for dbtool
dbtool.py manages all database imports and migrations. Install its dependencies:5
Run the initial database import
Import all SQL files and run any pending migrations:On first run against an empty database,
dbtool.py will:- Detect that the database is empty.
- Import all
sql/*.sqlfiles in sorted order (ending withtriggers.sql). - Check and run all pending migrations from
tools/migrations/. - Write the current git commit hash to
tools/config.yamlasdb_ver.
6
(Optional) Configure dbtool via config.yaml
tools/config.yaml controls dbtool behavior between runs. It is created automatically on first run. Key options: