Overview#
This guide details the process of deploying the Apidog Enterprise On-Premises using a Standalone Docker Architecture. In this configuration, the entire technology stack is containerized and hosted within a single environment. The Apidog application runs alongside its required dependencies i.e., MySQL database and Redis on the same host machine. This setup ensures a self-sufficient ecosystem without reliance on external cloud-managed services.In this guide we will cover two deployment approaches. Before deployment, we need to authenticate and pull the image from Docker Hub.Requirements & Prerequisites#
System Requirements#
Docker Version 20.10.0 or higher is required. We recommend the latest stable release (e.g., 26.x).Verify version: docker --version
Hardware & Software: For hardware and software requirement, please refer to the System Requirements documentation. External Dependencies#
Docker Registry Access: Ensure you have the Access Token (received via email) to pull the private image.
Preparation: Image Pull#
Authenticate with Docker Hub using the credentials provided by the Apidog support team to access the private enterprise image.1.
Log in to Docker Hub manually to verify credentials
2.
Pull the Image
Enter your Access Token (password) when prompted for the password and pull the specific image tag:
Deployment Approach 1: Docker Run (CLI)#
This approach involves manually executing Docker commands to create the network and launch each container individually.Step 1: Network Configuration#
Create a dedicated bridge network. This allows the standalone containers to communicate securely by name (e.g., the app can reach the database at mysql-container-name).Step 2: Deploy Dependencies (MySQL/PostgreSQL & Redis)#
This guide utilizes a MySQL database. If you are using PostgreSQL, please refer to the PostgreSQL Guidelines The minimum recommended version of MySQL is 8.0.17. To deploy MySQL, run the following command (replace <mysql-container-name> with your desired container name)Apidog does not automatically create the required database. You must manually create the database after the MySQL container is running.Access the MySQL Container:
Enter the password defined in your setup (e.g., <mysql_password>)Execute Initialization SQL:
Inside the MySQL prompt, run the following command to create the database:
The minimum recommended version of Redis is 6.0.5. Redis will be used by Apidog for caching and other functionalities. To deploy Redis, run the following command (be sure to replace <redis-container-name> with your preferred container name):Note: Replace <image_tag> with the specific image tag you wish to use.Step 3: Deploy Apidog Application#
To deploy the Apidog application, you can use the following Docker command. This example includes all the necessary environment variables for connecting to your MySQL and Redis containers, as well as other configurations required for the application to function properly.Make sure to replace all placeholder values (e.g., <mysql-container-name>, <mysql_username>, <mysql_password>, <redis-container-name>, <JWT secret>, <Apaidog On-Premises License>, <Your BASE_URL>, <image_tag> etc.) with your actual configuration details.For more information on the environment variables and how to configure them, please refer to the Configuration Guide 1.
If you prefer to use PostgreSQL instead of MySQL, you can set up a PostgreSQL instance and update the relevant environment variables accordingly: 2.
The s3 storage configuration is required for Kubernetes deployments and is also recommended for Docker based deployment
For non-AWS S3-compatible storage solutions (e.g., MinIO), additional environment variables may be required. These include: Deployment Approach 2: Docker Compose#
Running Apidog with Docker Compose is an alternative to using the docker run command. This approach automates the Standalone deployment using a single configuration file (compose.yml), which defines the services, networks, and volumes in one place. This method requires that docker compose is installed on the host machine.Deploying via the docker compose approach, you do not need to create the database for Apidog, as the compose.yaml file is already configured to create the database.
Install Docker Compose (If Necessary):#
If the docker-compose --version command yields a 'command not found' error, it indicates that the Docker Compose executable is not present or properlty linked. Please refer to the official Docker Compose Installation Guide.Step 1: Prepare the configuration#
Save the following configuration file as compose.yaml, and modify the environment variables in the compose.yaml file match your specific configuration (License Key, Base URL, SMTP settings, etc.).Step 2: Execute Deployment#
Run the following command in the directory containing your compose.yaml file. This will automatically create the network, database and start all defined services in the correct order.Restart Commands#
Verify System Health Check#
Verify that the application components are successfully connected within the standalone environment using Apidog's built-in diagnostic tool.The application has started successfully if the output includes lines similar to the following:...
[WARN] This Redis server's `default` user does not require a password, but a password was supplied
connect succeeded! value is null
Executing (default): SELECT 1+1 AS result
...
Connecting to 127.0.0.1:3000 (127.0.0.1:3000)
remote file exists
Connecting to 127.0.0.1 (127.0.0.1:80)
remote file exists
Connecting to 127.0.0.1 (127.0.0.1:80)
remote file exists
Checking BASE_URL: https://your-base-url.com
API base URL matches expected BASE_URL
If the output differs from the above, the application has either not started successfully or is still in the process of starting. A typical graceful startup time is around 30 seconds, though this may vary depending on hardware performance.
Run the application#
To run the application, refer to the documentations:Other Resources#