This guide covers deploying MDriven Server and Turnkey behind an Nginx reverse proxy. This is the recommended configuration for public-facing servers as it provides security, standard web ports (80/443), and a single entry point.
1. Download the Production Package
Our production setups come pre-configured with Nginx and your choice of database backend. Select Default (Vista DB) if you want to use the default embedded database (Vista DB), or if you are connecting to an external database like PostgreSQL, MySQL or MSSQL hosted elsewhere.
| Distribution | Architecture | Default (Vista DB) | PostgreSQL | MySQL | MSSQL |
|---|---|---|---|---|---|
| Ubuntu | AMD64 | Download (AMD64) | Download (AMD64) | Download (AMD64) | Download (AMD64) |
| ARM64 | Download (ARM64) | Download (ARM64) | Download (ARM64) | Download (ARM64) | |
| Debian | AMD64 | Download (AMD64) | Download (AMD64) | Download (AMD64) | Download (AMD64) |
| ARM64 | Download (ARM64) | Download (ARM64) | Download (ARM64) | Download (ARM64) | |
| Alpine | AMD64 | Download (Musl) | Download (Musl) | Download (Musl) | Download (Musl) |
2. What's Included?
Your download includes a ready-to-deploy folder structure:
compose.yaml: The orchestration file.settings/nginx-proxy.conf: A pre-configured Nginx setup for MDriven.settings/mdriven-server/: Server configuration files.settings/mdriven-turnkey/: Turnkey configuration files.databases/mssql/: MSSQL Server Setup configuration files.databases/mysql/: MySQL Server Setup configuration files.databases/postgres/: PostgreSQL Server Setup configuration files.
3. Deployment Steps
- Upload: Transfer the zip file to your server (using scp or sftp).
- Extract:
unzip deploy-prod-amd64.zip -d my-app cd my-app
- Configure Nginx (Optional but Recommended):
- Open settings/nginx-proxy.conf.
- Update the server_name directive to match your actual domain (e.g., app.yourcompany.com).
- Launch:
docker compose up -d
4. Connecting Your Database
If you downloaded one of the packages containing PostgreSQL, MySQL, or MSSQL, your database container is automatically launched alongside your server.
You will need to configure the connection string inside the MDriven Server interface to link them together.
> Read the guide: Configuring Production Databases PostgreSQL MySQL MSSQL
5. Configuration Settings
You can easily customize your production setupâsuch as updating the app versions, lowering container permissions, or resetting the administrator passwordâby adjusting environment variables and bindings within your compose.yaml file.
Please refer to the Docker Compose Configuration Settings section on the Docker Overview Page for detailed instructions on using UPDATE_APP, PUID/PGID, and the PwdReset.txt file.
6. Subdirectory Routing (Single Domain)
If you are using a single domain and prefer to route traffic using subdirectories instead of subdomains, you can configure Nginx to serve the applications like this:
- MDriven Turnkey: Located at the root index (/).
- MDriven Server: Located at the subdirectory /__MDrivenServer.
For the MDriven Server to correctly resolve URLs when placed behind a subdirectory, you must explicitly set its application path in the configuration:
- Navigate to the
mdriven-server-settingsdirectory within your deployment folder. - Locate the
CommandLineOverridefile. - Set the following argument inside the file:(You can view an example of this specific configuration setup on GitHub here).
<arg>pathtoapp=/__MDrivenServer</arg>
