For the complete documentation index, see llms.txt. This page is also available as Markdown.

Deploy Devolutions Server and SQL Server with Docker Compose on Windows

This article shows how to deploy Devolutions Server on a Windows machine with Docker Compose. Two deployment options are covered:

  • All-in-one: Devolutions Server and SQL Server both run in containers on the same Docker network. Best suited for evaluations, labs, and test environments.

  • Hybrid: Devolutions Server runs in a container and connects to an existing SQL Server installed on the host or on another server. Best suited for organizations that already manage their own SQL Server.

Both options use the same container names. Use only one option per host.

To deploy Devolutions Server with individual docker run commands instead, see Deploy Devolutions Server with Docker. For the full list of environment variables, see Advanced Docker configuration for Devolutions Server.

For the sake of simplicity, Devolutions Server's Docker image version is written 20XX.X in the code blocks of this article. Change this variable to the version you wish to use.

Prerequisites

  • Docker Desktop for Windows with the WSL 2 back end, running in Linux containers mode. The Devolutions Server and SQL Server images are Linux images.

  • Docker Compose v2 or later (included with Docker Desktop). Run docker compose version to confirm it is available.

  • At least 4 GB of memory allocated to Docker. SQL Server needs at least 2 GB to start.

  • The minimum system requirements to run Devolutions Server.

  • For the hybrid option only: an existing SQL Server instance prepared as described in Prepare an existing SQL Server.

Choose an image tag

The devolutions/devolutions-server image does not publish a latest tag. Use one of the following tag formats, available on Docker Hub:

Tag format
Example
Use

release-<year>.<minor>

release-20XX.X

Follows the newest patch of a release. Convenient for testing.

<year>.<minor>.<patch>.<build>

20XX.X.X.X

Fixed version. Recommended for production.

All-in-one deployment

Create the configuration files

  1. Create an empty folder for the deployment, for example C:\dvls, then restrict its access to the current user, SYSTEM, and the Administrators group. Run the following commands in PowerShell:

  2. In that folder, create a file named .env with the following content, and replace every value between angle brackets:

    • MSSQL_SA_PASSWORD must contain at least 8 characters and at least three of the following: uppercase letters, lowercase letters, digits, and symbols. Otherwise, SQL Server refuses to start.

    • MSSQL_PID selects the SQL Server edition. Express is free but limited to 10 GB per database. Developer is free but cannot be used in production. Standard and Enterprise require a SQL Server license.

    • SQL_HOST_PORT is the port used to reach the SQL Server container from the host, for example with SQL Server Management Studio. Port 1434 avoids a conflict with a SQL Server already installed on the host.

  1. In the same folder, create a file named docker-compose.yml with the following content:

The dvlsdata volume is shared by the dvls-init and dvls services. It stores the encryption configuration that the initialization generates, so the runtime container can decrypt the data in the database. The mssqldata volume stores the SQL Server databases.

Start the deployment

  1. Open PowerShell and go to the deployment folder:

  2. Confirm that Docker Compose reads the .env file correctly. Both image names must include a tag:

  3. Download the images, including the initialization image:

  4. Initialize the database and create the administrator account. This step is only needed for the first deployment:

  5. If the command does not return after Initialization completed successfully. is displayed, press Ctrl+C. The initialization container is removed automatically.

  1. Start Devolutions Server and SQL Server:

  2. Follow the Devolutions Server log. SQL Server can take up to two minutes on its first start. Devolutions Server is usually ready a few seconds later, since the initialization already applied the database migrations. Press Ctrl+C to stop following the log:

  3. Open http://localhost:5000 in a browser (or the port set in DVLS_HOST_PORT), then log in with the DVLS_ADMIN_USERNAME and DVLS_ADMIN_PASSWORD values from the .env file.

  4. Back up the encryption configuration. It is required to restore or redeploy Devolutions Server with the same database:

  5. Move encryption.config to a secure location outside the deployment folder.

This example serves Devolutions Server over HTTP to keep the setup simple. Before giving users access, configure HTTPS with a TLS certificate or a reverse proxy, as described in Advanced Docker configuration for Devolutions Server.

Hybrid deployment

In this option, only Devolutions Server runs in a container. It connects to an existing SQL Server, for example SQL Server Express installed on the same Windows host.

Prepare an existing SQL Server (hybrid option)

Using SQL Server Configuration Manager and SQL Server Management Studio, make sure that the SQL Server instance has:

  1. The TCP/IP protocol enabled. SQL Server Express ships with TCP/IP disabled.

  2. A static TCP port configured (for example, 1433). A container cannot use a named instance such as HOST\SQLEXPRESS; it must connect to a host and port.

  3. SQL Server and Windows Authentication mode (mixed mode) enabled.

  4. A dedicated SQL login for Devolutions Server. Do not use sa. Either create the database first and make the login its db_owner (recommended), or give the login the dbcreator server role and let the initialization create the database.

  5. An inbound Windows Firewall rule allowing the SQL Server port.

The following script creates the login and the database, and makes the login the database owner. Replace <StrongPassword> before running it:

The SQL_DATABASE value in the .env file must match this database name.

Create the hybrid configuration files

  1. Create an empty folder for the deployment, for example C:dvls, then restrict its access to the current user, SYSTEM, and the Administrators group. Run the following commands in PowerShell:

  2. In that folder, create a .env file with the following content, and replace every value between angle brackets:

    host.docker.internal lets the container reach a SQL Server installed on the Docker host. If SQL Server runs on another server, replace it with that server's name or IP address.

  3. In the same folder, create a docker-compose.yml file with the following content:

DATABASE_TRUST_SERVER_CERTIFICATE=true accepts the SQL Server certificate without validating it. If your SQL Server presents a certificate issued by a trusted authority, remove this variable. See Encrypted database connection (TLS).

Start the hybrid deployment

Run the same commands as for the all-in-one deployment, from the deployment folder:

If the initialization command does not return after Initialization completed successfully. is displayed, press Ctrl+C before running docker compose up -d.

Then log in to Devolutions Server, back up encryption.config with the same docker compose cp command as for the all-in-one deployment, and move the file to a secure location outside the deployment folder.

Deploy on another server

To reproduce the deployment on another Windows server, follow the steps below. They create a new, empty deployment: the data and the encryption configuration of the first server are not copied.

  1. Install Docker Desktop on the target server (see Prerequisites).

  2. Create a folder and copy the docker-compose.yml and .env files into it. Change the passwords in .env if needed.

  3. Run Get-ChildItem in the folder and make sure the files are named exactly .env and docker-compose.yml. Notepad can add a hidden .txt extension.

  4. Run the commands from Start the deployment.

  5. To reach Devolutions Server from other computers, set DVLS_HOSTNAME to the server's fully qualified domain name and allow the DVLS_HOST_PORT port in Windows Firewall.

Verify the deployment

Run the following commands from the deployment folder. The container names match the examples above.

Check
Command

Containers are running and SQL is healthy

docker compose ps

SQL Server health status

docker inspect --format '{{.State.Health.Status}}' dvls-sqlserver (expected: healthy)

Devolutions Server resolves the SQL service

docker exec dvls-app sh -c "getent hosts sqlserver"

Devolutions Server reaches SQL on port 1433

docker exec dvls-app bash -c "(echo > /dev/tcp/sqlserver/1433) 2>&1 && echo OPEN || echo BLOCKED" (expected: OPEN)

Devolutions Server started correctly

docker exec dvls-app sh -c "grep -h -E 'Now listening|Scheduler initialized' /opt/devolutions/dvls/App_Data/DPS_Main*.log | tail -n 2"

The web interface answers

curl.exe -s -o NUL -w "%{http_code}" http://localhost:5000/ (expected: 200)

For the hybrid deployment, replace sqlserver with the value of SQL_HOST and 1433 with the value of SQL_PORT. The two SQL Server health rows do not apply, since there is no SQL Server container.

If you changed DVLS_HOST_PORT, replace 5000 with its value in the last row.

Troubleshooting

Symptom
Solution

failed to resolve reference "docker.io/devolutions/devolutions-server:latest": not found

The latest tag does not exist. Use a release-20XX.X or 20XX.X.X.X tag (see Choose an image tag).

The "DVLS_IMAGE_TAG" variable is not set or invalid reference format

The .env file is missing DVLS_IMAGE_TAG, or is not named exactly .env. Add the line and make sure the file has no .txt extension.

DATABASE_HOST or AZURE_SQL_HOST is required.

The compose file uses environment variables from an older image version. Use the DATABASE_* variables shown in this article, map the host port to container port 5000, and run the dvls-init service before the first start.

The SQL Server container never becomes healthy and the log shows Password validation failed

MSSQL_SA_PASSWORD does not meet the SQL Server password policy. Use at least 8 characters with uppercase letters, lowercase letters, digits, and symbols.

The SQL Server container stays unhealthy and the log repeats Login failed for user 'sa'

MSSQL_SA_PASSWORD is only applied the first time the mssqldata volume is created. If the volume already existed, SQL Server kept the previous password. Restore the previous password in .env, or remove the volumes as described in Remove the deployment if the data can be discarded.

dependency sqlserver failed to start, or the health status alternates between starting and unhealthy

The first SQL Server start can take up to two minutes on slower disks. Keep retries: 30 and start_period: 120s in the health check, or increase them.

The SQL Server container stops right after it starts (out of memory)

Increase the memory available to Docker to at least 4 GB in Docker Desktop (Settings – Resources).

The web interface returns an error for the first minutes after docker compose up -d

This is expected while SQL Server completes its first start. Wait, and follow the Devolutions Server log with docker compose exec dvls sh -c "tail -n 50 -f /opt/devolutions/dvls/App_Data/DPS_Main*.log".

Bind for 0.0.0.0:5000 failed: port is already allocated

Another program uses port 5000 on the host. Set another value for DVLS_HOST_PORT in .env. To see which program uses the port, run Get-NetTCPConnection -LocalPort 5000 -State Listen.

The dvls-init command does not return after Initialization completed successfully.

Press Ctrl+C, then continue with the next step.

Unhandled exception. System.InvalidOperationException at CreateAdministrator from dvls-init

The deployment is already initialized. Skip the initialization step. Nothing is changed: the encryption configuration and the administrator password stay the same.

Login failed for user '<login>' (error 18456) from dvls-init

Check the SQL_LOGIN and SQL_PASSWORD values in .env, that the login exists, and that SQL Server and Windows Authentication mode (mixed mode) is enabled.

The login page shows Unable to find the encryption file. Please contact your administrator.

The runtime container does not have the encryption configuration created at initialization. Make sure both dvls-init and dvls mount the same dvlsdata volume at /opt/devolutions/dvls/App_Data. If the database already contains data encrypted with a lost key, that data cannot be recovered and the deployment must be initialized again.

The container cannot reach an existing SQL Server (hybrid option)

Verify that TCP/IP is enabled, that a static port is configured, that the Windows Firewall allows the port, and that the extra_hosts entry is present when SQL_HOST is host.docker.internal.

docker is not recognized in PowerShell

Start Docker Desktop, then open a new PowerShell window so the updated PATH is loaded.

Update Devolutions Server

Back up the database and encryption.config before updating.

  1. Add the following dvls-update service under services: in docker-compose.yml, and add dvlsbackup: under volumes:. The example uses the all-in-one values:

    For the hybrid deployment, use the same DATABASE_* values as the dvls service, and replace depends_on with the extra_hosts entry of the dvls service.

  2. Stop Devolutions Server:

  3. Change DVLS_IMAGE_TAG in the .env file.

  4. Download the new images and update the database:

  5. Wait for Database update completed successfully., then start Devolutions Server with the new version:

For the update mode variables, see Advanced Docker configuration for Devolutions Server.

Remove the deployment

Stop and remove the containers while keeping the database and the Devolutions Server data:

See also

Last updated

Was this helpful?