Self-hosting Apidog
  1. Configuration
Self-hosting Apidog
  • Introduction
    • Installation Overview
    • System Requirements
  • Licensing
    • Obtaining Apidog On-premises License
  • Deployment
    • Running Apidog on Docker
    • Running Apidog on Kubernetes
    • Running Apidog Multi-Container Deployment without Kubernetes
    • Privacy
  • Initial Setup
    • Admin Panel
    • Installing Apidog Client
    • Access Apidog Web
  • Configuration
    • Environment Variables
    • Configuring the application database
    • Configuring the application storage service
    • Authentication Providers
      • Using LDAP for authentication
      • Using OKTA for authentication
      • Using OAuth2.0 for authentication
  • Maintenance & Upgrades
    • Backing up Apidog
    • License Renewal
    • Updating Apidog
  • Troubleshooting
    • Troubleshooting
    • FAQ
  • Apidog API (coming soon)
  1. Configuration

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.

MySQL#

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.

Redis#

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.

PostgreSQL#

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:

Solution 1: Using psql (The Command-Line Tool)#

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:

Solution 2: Using a GUI Tool (DBeaver, pgAdmin, DataGrip)#

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
Previous
Environment Variables
Next
Configuring the application storage service
Built with