Self-hosting Apidog
  1. Configurations
Self-hosting Apidog
  • Overview
  • Introduction
    • Obtaining Apidog On-Premises License
    • System Requirements
    • Data Privacy & Compliance
  • Deployment
    • Running Apidog on Docker
    • Running Apidog on Kubernetes
    • Running Apidog Multi-Container Deployment without Kubernetes
  • Post Deployment
    • Accessing Apidog Admin Panel
    • Accessing Apidog Web Interface
    • Installing Apidog On-Premises Client
  • Configurations
    • Environment Variables
    • Database Configuration
    • Storage Services Configuration
    • Git Connection Configuration
    • Authentication Providers
      • Using LDAP for Authentication
      • Using OKTA for Authentication
      • Using OAuth2.0 for Authentication
  • Maintenance & Upgrades
    • Updating Apidog
    • Backing up Apidog
    • License Renewal
    • System Design Flow
  • Troubleshooting
    • Troubleshooting
    • FAQ
  • Apidog API (coming soon)
  1. Configurations

Database Configuration

The database is essential for storing critical data such as users, teams, projects, APIs, and other information required for the proper functioning of the application. By default, the application does not come with any pre-configured database settings.

MySQL#

The minimum recommended version for MySQL is 8.0.17, and the utf8mb4 character set is required to ensure full support for Unicode characters. You can provide the connection details to MySQL by configuring the appropriate environment variables as shown below:
Apidog does not automatically create the database for you. You will need to manually create the database using the following SQL statement:
Note: There is no need to manually create any tables. Apidog will automatically create the necessary tables on startup. However, keep in mind that Apidog will be connecting to the database from within your Docker container.
To ensure a successful connection, make sure that the MYSQL_HOST is configured correctly:
Option (a): Use a fully qualified hostname.
Option (b): Ensure there is a proper entry in your container's /etc/hosts file.
By providing the MySQL connection details as mentioned above, Apidog will be able to connect to and locate the application database.

Redis#

The minimum recommended versions for Redis 6.0.5. You can provide the Redis connection details by configuring the following environment variables:
Apidog will be connnecting to Redis from within your Docker container. To ensure scuccessful connection, make sure that REDIS_HOST is configured correctly:
Option (a): Use the fully qualified hostname.
Option (b): Ensure tere is a proper entry for Redis in your container's /etc/hosts file.

PostgreSQL#

The minimum recommended version for PostgreSQL is 15.0. You can provide the PostgreSQL connection details by configuring the following environment variables:
Apidog does not automatically create the database for you. You will need to manually create the database and the default schema (app). Below are the ways to do this:

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-12-08 05:03:55
Previous
Environment Variables
Next
Storage Services Configuration
Built with