You can deploy MDriven Server and MDriven Turnkey in Docker behind the Nginx configuration supplied with an MDriven production package; use this guide when you want Nginx to be the public entry point for a Linux-hosted production environment.
Choose the production package
Download the production configuration for your Linux architecture from Documentation:Deploying MDriven Server and Turnkey with Docker. The production packages include Nginx together with MDriven Server and Turnkey.
Choose the package that matches where application data will be stored:
| Choice | Use it when | What the package includes |
|---|---|---|
| Default (VistaDB) | You want to use the embedded VistaDB database. | The production configuration without a database-container choice. |
| Default (VistaDB) with an external database | PostgreSQL, MySQL, or MSSQL is hosted outside this deployment. | The production configuration; you configure MDriven Server to connect to the external database. |
| PostgreSQL, MySQL, or MSSQL package | You want the selected database to run as a container alongside MDriven Server and Turnkey. | The production configuration and the configuration directory for the selected database. |
For example, select the PostgreSQL package when PostgreSQL is to run on the same Docker host. Select Default when your organization already operates PostgreSQL on another host.
Understand the deployment folder
After extracting the downloaded archive, review its files before changing configuration:
| Path | Purpose |
|---|---|
compose.yaml
|
Defines the containers, configuration, volume bindings, and network for the deployment. |
settings/nginx-proxy.conf
|
Contains the prepared Nginx reverse-proxy configuration for MDriven. |
settings/mdriven-server/
|
Contains MDriven Server configuration files. |
settings/mdriven-turnkey/
|
Contains MDriven Turnkey configuration files. |
databases/mssql/
|
Contains MSSQL Server setup configuration when applicable. |
databases/mysql/
|
Contains MySQL Server setup configuration when applicable. |
databases/postgres/
|
Contains PostgreSQL setup configuration when applicable. |
Keep the folder structure intact. The paths in compose.yaml refer to these settings and database directories.
Deploy the package
- Transfer the downloaded archive to the Linux server by using your organizationâs approved file-transfer method, such as SCP or SFTP.
- Extract the archive on the server.
- Open
settings/nginx-proxy.conf. - Update the
server_namedirective with the domain that users will enter, such asapp.yourcompany.com. - Ensure that the DNS record for that domain points to the serverâs public IP address before making the application public.
- Review
compose.yaml. Confirm that the selected database option and the required settings directories are present. - Start the deployment by using the Docker Compose workflow defined for the downloaded package. See Documentation:Deploying MDriven Server and Turnkey with Docker for the Docker and Compose prerequisites and configuration overview.
- Verify that the containers are running, then open the configured domain in a browser.
The Nginx proxy should be the public entry point. Check compose.yaml rather than assuming a port mapping: the exposed ports and container bindings are defined by the package version you downloaded.
Configure database connectivity
When you use a PostgreSQL, MySQL, or MSSQL production package, its database container is launched with the MDriven containers. Configure the database connection in the MDriven Server interface so that MDriven Server uses that database.
When the database is external, use the Default package and configure the connection in MDriven Server for the external PostgreSQL, MySQL, or MSSQL instance.
For example, a deployment with a bundled MySQL container still requires a connection configuration in MDriven Server; starting the database container does not by itself connect an application model to it.
Set production configuration safely
Use compose.yaml and its bindings to control application versioning, container permissions, and password reset behavior. Follow Documentation:Advanced Docker Compose Configuration for MDriven for the supported settings.
Important configuration points:
- Set
PUID=1000andPGID=1000to run the application processes with lowered permissions. - Use
UPDATE_APPto select an application update version. A specific version uses theyyyymmddformat; for example,UPDATE_APP=20231024. - To reset the MDriven Server password for user
a, createPwdReset.txtwith the new password insettings/mdriven-serverand bind it to/pwdreset/PwdReset.txtin the container. - When resetting user
a, also update the password insettings/mdriven-turnkey/MDrivenServerOverride.xml. Turnkey uses this user to connect to MDriven Server. If the passwords differ, Turnkey attempts to connect with the old password, the account can be locked again, and Turnkey enters an error state.
Use one domain with subdirectory routing
The supplied configuration can route applications through one domain rather than separate subdomains. The intended routes are:
| Application | Route |
|---|---|
| MDriven Turnkey | /
|
| MDriven Server | /__MDrivenServer
|
| File Manager | /Scm
|
When MDriven Server is served below /__MDrivenServer, it must be told its application path through the CommandLineOverride file in the MDriven Server settings directory. Do not enable this routing until the required override syntax for your package version has been confirmed; an incomplete application-path setting causes generated URLs to resolve incorrectly.
For example, with Turnkey at https://app.yourcompany.com/, the MDriven Server route is https://app.yourcompany.com/__MDrivenServer, not the domain root.
Expose Nginx, not internal services
Allow the HTTP and HTTPS ports required by Nginx through the server firewall. Do not expose internal MDriven service ports publicly once Nginx is forwarding traffic correctly. This reduces the number of public entry points.
If you instead install and manage Nginx directly on the host, rather than using the Nginx configuration supplied with the Docker production package, use Documentation:Serving MDriven with Nginx Server as a Proxy. That guide documents host-Nginx configuration, local service checks, firewall rules, and HTTPS setup with Certbot.
Verify the deployment
- Open the configured domain over HTTP and confirm that Nginx forwards the request to the intended MDriven application.
- Verify the routes you configured. For a single-domain setup, test
/,/__MDrivenServer, and/Scm. - Confirm that MDriven Turnkey can connect to MDriven Server. If user
awas reset, verify that the password inMDrivenServerOverride.xmlmatchesPwdReset.txt. - If you use a bundled or external database, verify the connection configured in MDriven Server.
- Before enabling HTTPS, ensure that DNS resolves to the server and that ports 80 and 443 are reachable. For a host-managed Nginx deployment, follow the certificate and renewal verification steps in Documentation:Serving MDriven with Nginx Server as a Proxy.
Troubleshooting
| Symptom | Check |
|---|---|
| The public domain does not open | Confirm DNS points to the server, review server_name in settings/nginx-proxy.conf, and confirm that Nginx ports are allowed through the firewall.
|
| A route works directly but not through Nginx | Check the Nginx proxy configuration and the port bindings in compose.yaml. Do not assume ports from another installation or from a host-Nginx guide.
|
Links are wrong when MDriven Server uses /__MDrivenServer
|
Verify the required application-path setting in CommandLineOverride for the downloaded package version.
|
| Turnkey is in an error state after a password reset | Ensure PwdReset.txt, its container binding, and the password in settings/mdriven-turnkey/MDrivenServerOverride.xml use the same new password.
|
| The database container is running but the application has no data connection | Configure and verify the database connection in the MDriven Server interface. |
