Better Databases
Better Databases v-A.1.0.0 adds MySQL/MariaDB, PostgreSQL, MongoDB, and Redis providers to Pterodactyl. Install the addon first, then configure only the engines you plan to offer.
If this panel never had the standalone build, install Ainx if needed:
npm i -g ainxThen install the addon package from the panel root:
ainx install /path/to/betterdatabases.ainxSkip ahead to the provider you want to configure.
What the installer changes
The installer adds the addon files, routes, views, configuration, frontend components, Composer dependencies, cache clearing, and database observer patch.
It does not install APT packages, PHP extensions, database clients, or local database daemons. Install only the services required by the providers you plan to offer.
DB Agent provider
DatabasesEverywhere can run on a separate database node and expose it to Better Databases as a DB Agent provider. Install the agent on that node:
sudo curl --fail --location \
"https://github.com/Tomaxikz/DatabasesEverywhere/releases/latest/download/dbev-x86_64-linux" \
-o /usr/local/bin/dbev
sudo chmod +x /usr/local/bin/dbevCreate the DB Agent node in Admin → AINX Addons → Better Databases, copy its generated configuration, and save it on the database node as:
/etc/databases-everywhere/config.ymlRun the agent setup and enable its service:
sudo dbev --setup
sudo systemctl enable --now databases-everywhereUse this path instead of installing local database daemons on the panel host when the providers live on another node.
For the complete node, configuration, API, backup, and monitoring instructions, continue with the DatabasesEverywhere overview.
System requirements
Better Databases expects the panel host to have the PHP extensions and client tools needed by the providers you enable. Replace 8.3 with the PHP version used by your panel:
sudo apt update
sudo apt install -y \
php8.3-bcmath php8.3-curl php8.3-mbstring php8.3-mongodb \
php8.3-mysql php8.3-pgsql php8.3-xml php8.3-zip \
postgresql-client mongodb-database-toolsFor providers hosted locally, install and enable only the services you need:
sudo apt install -y mariadb-server postgresql redis-server
sudo systemctl enable --now mariadb
sudo systemctl enable --now postgresql
sudo systemctl enable --now redis-serverMongoDB is not available in the default Debian repositories on every release. Add MongoDB's official repository first, then install mongodb-org; the MongoDB section below includes a complete example.
Optional translations
Better Databases works in English by default. Translation integration varies between panel themes and their frontend systems. Ask the theme developer where its translated addon catalogs belong.
The Better Databases installer deliberately does not modify theme translation files.
Security baseline
- Give each provider its own account. Never use
root, a database superuser, or Pterodactyl's application account. - Provider credentials can create tenant databases and users. Generate a long, unique password and rotate it if it leaks.
- Keep database ports on a private network where possible. Use TLS whenever traffic crosses an untrusted network.
MySQL or MariaDB
Install MariaDB, make it reachable from the panel host, and create a dedicated provisioning account.
1. Install MariaDB
sudo apt update
sudo apt install -y mariadb-server2. Listen on the network
Edit /etc/mysql/mariadb.conf.d/50-server.cnf:
[mysqld]
bind-address = 0.0.0.0Then restart MariaDB:
sudo systemctl restart mariadb3. Create the provider user
sudo mariadb -u root -p
CREATE USER 'ptero_provider'@'PANEL_PRIVATE_IP' IDENTIFIED BY 'CHANGE_ME_STRONG_PASSWORD';
GRANT ALL PRIVILEGES ON *.* TO 'ptero_provider'@'PANEL_PRIVATE_IP' WITH GRANT OPTION;
FLUSH PRIVILEGES;Better Databases creates a separate MySQL user for every tenant database. The provider account is only for provisioning—never give it to a customer or reuse Pterodactyl's own database account.
PostgreSQL
Install PostgreSQL, allow connections from the panel host, and create a provisioning role.
1. Install PostgreSQL
sudo apt update
sudo apt install -y postgresql2. Accept network connections
Edit /etc/postgresql/<version>/main/postgresql.conf:
listen_addresses = '*'Add this to /etc/postgresql/<version>/main/pg_hba.conf:
host all all 0.0.0.0/0 scram-sha-256Restart PostgreSQL:
sudo systemctl restart postgresql0.0.0.0/0accepts password attempts from every IPv4 address that can reach PostgreSQL. Restrict this CIDR when you know the client networks. If public access is unavoidable, enforce TLS and keep the built-inpostgresrole local-only.
3. Create the panel user
sudo -u postgres psql
CREATE USER ptero_provider WITH PASSWORD 'CHANGE_ME_STRONG_PASSWORD' CREATEDB CREATEROLE;Every tenant receives a restricted role that owns only its generated database. The provisioning role is not a tenant credential.
MongoDB
Install MongoDB from its repository. On a fresh server, create the provisioning user before turning authorization on so you do not lock yourself out.
1. Install MongoDB
sudo apt update
sudo apt install -y gnupg curl ca-certificates
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc \
| sudo gpg --dearmor -o /usr/share/keyrings/mongodb-server-8.0.gpg
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/debian bookworm/mongodb-org/8.0 main" \
| sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list
sudo apt update
sudo apt install -y mongodb-org
sudo systemctl enable --now mongod2. Create the provider user before enabling auth
mongosh
use admin
db.createUser({
user: "ptero_provider",
pwd: "CHANGE_ME_STRONG_PASSWORD",
roles: [
{ role: "userAdminAnyDatabase", db: "admin" },
{ role: "dbAdminAnyDatabase", db: "admin" },
{ role: "readWriteAnyDatabase", db: "admin" }
]
})
exitThis account can provision databases. Tenant accounts created by the addon receive readWrite only on their own database.
3. Enable auth and remote access
Edit /etc/mongod.conf:
net:
bindIp: 0.0.0.0
port: 27017
security:
authorization: enabledRestart MongoDB:
sudo systemctl restart mongod4. Test auth from the panel host
mongosh "mongodb://ptero_provider:CHANGE_ME_STRONG_PASSWORD@MONGO_PRIVATE_IP:27017/admin"Never expose the provider credentials to tenants. If MongoDB traffic leaves your private network, configure TLS before allowing remote clients.
Admin page fields
Open Admin → AINX Addons → Better Databases and select Add Provider. The native Admin → Databases page is for Pterodactyl's built-in database hosts, not these providers.
MySQL / MariaDB provider fields
Name: Any label, for example MySQL Provider
Engine: MySQL / MariaDB
Linked Node: Global, or a specific node if only that node should use it
Host: MySQL private IP or hostname, for example 127.0.0.1 or 10.0.0.20
Port: 3306
Username: ptero_provider
Password: CHANGE_ME_STRONG_PASSWORD
Use TLS: Enable only if your MySQL server is configured for TLS
Enabled: CheckedThe addon creates databases on this host when users request them, with names such as s1_example.
PostgreSQL provider fields
Name: Any label, for example PostgreSQL Provider
Engine: PostgreSQL
Linked Node: Global, or a specific node if only that node should use it
Host: PostgreSQL private IP or hostname, for example 127.0.0.1 or 10.0.0.30
Port: 5432
Username: ptero_provider
Password: CHANGE_ME_STRONG_PASSWORD
Use TLS: Enable only if your PostgreSQL server requires TLS
Revoke Public Connect: Optional, leave unchecked for normal PostgreSQL compatibility
Revoke Public Temporary Tables: Optional, leave unchecked for normal PostgreSQL compatibility
Enabled: CheckedYou do not need to create a database first. Provider tasks use PostgreSQL's default postgres database, and tenant databases are created on demand.
The revoke options affect newly created tenant databases only. Leave them off unless you deliberately want to block other roles from connecting or creating temporary tables.
MongoDB provider fields
Name: Any label, for example MongoDB Provider
Engine: MongoDB
Linked Node: Global, or a specific node if only that node should use it
Host: MongoDB private IP or hostname, for example 127.0.0.1 or 10.0.0.40
Port: 27017
Username: ptero_provider
Password: CHANGE_ME_STRONG_PASSWORD
Use TLS: Enable only if MongoDB TLS is configured
Auth Database: admin
Replica Set: Leave blank unless your MongoDB runs as a replica set
Enabled: CheckedUse admin as the auth database when you created the provider user with the commands above. Tenant users still authenticate against and access only their generated database.
Redis provider fields
Name: Any label, for example Redis Provider
Engine: Redis
Linked Node: Usually the node/panel host that will run the Redis processes
Host: 127.0.0.1 or another local interface on the panel queue-worker host
Port: 6379 for provider connection tests
Username: Leave blank unless your Redis setup requires ACL username
Password: Main Redis/provider password if required
Redis DB Index: Usually 0
Port Range: Dedicated tenant instance port range, for example 6380-6480
Max Instances: Must fit inside the port range
Memory MB: Required per tenant instance
Enable Redis allocation creation: Only after accepting the operational risk
Enabled: CheckedRedis allocations start dedicated Redis processes on the host running the panel queue worker. They do not provision a remote Redis cluster.