Configuring the application database
The application database is responsible for storing crucial information such as users, teams, projects, APIs, and other necessary data required for the application to function. By default, there are no embedded database settings.The minimum recommended versions are MySQL 8.0.17, and the utf8mb4 character set is required. You can provide the connection details to MySQL by using environment variables as shown below:Please note that Apidog does not create the database for you. You can use the following SQL statement to create the database:No need to add any tables. Apidog will create those on startup. Keep in mind that Apidog will be connecting from within your Docker container, so make sure that MYSQL_HOST either: a) you're using a fully qualified hostname, or b) that you've set a proper entry in your container's /etc/hosts file.By providing the MySQL connection details mentioned above, Apidog will be able to locate the application database.The minimum recommended versions are Redis 6.0.5. You can provide the connection details to Redis by using environment variables as shown below:Keep in mind that Apidog will be connecting from within your Docker container, so make sure that REDIS_HOST either: a) you're using a fully qualified hostname, or b) that you've set a proper entry in your container's /etc/hosts file.The minimum recommended version is PostgreSQL 15.0. You can provide the connection details to PostgreSQL by using environment variables as shown below:Please note that Apidog does not create the database for you. You can use the following ways to create the database and default schema app:This is the most common way. You create the database, then reconnect to it. psql has a special meta-command \c or \connect for this.1.
Connect to the default postgres database: 2.
Run your commands, using \c to switch databases: The workflow is more manual but follows the same principle.1.
Connect your GUI tool to the PostgreSQL server (this usually establishes a default connection to the postgres database).
2.
Open a query window and run only the CREATE DATABASE command. 3.
Refresh your database list in the GUI's sidebar. You will see apidog appear.
4.
Open a new connection/query panel specifically for the apidog database. Most GUIs let you right-click the new database and select "New Query Console" or "SQL Editor".
5.
In that new panel, run your CREATE SCHEMA command. No need to add any tables. Apidog will create those on startup. Modified at 2025-06-26 05:42:55