DS Server

Installing Using Docker (Core on Linux)

Topic

Building your own Linux image of DS Server takes a short Dockerfile: the ASP.NET Core runtime image of Microsoft plus the core folder of the DS Server archive. Build it yourself when you need a release that the official image doesn't have yet, such as 5.0.2, or when your image should contain your own configuration, certificates or plugins.

The steps below build and run the image on any machine with Docker and Linux containers, including Docker Desktop on Windows and macOS.

Prerequisites

  • Docker, running Linux containers.
  • The DS Server archive DS Server 5.0.2.zip. Licensed customers download it from their Text Control account; for an evaluation, download the trial version from the DS Server download page.
  • A serial number to register the server after it starts. See Licensing Overview.

Prepare the Folder

  1. Create a folder named DSServerDocker.

  2. Extract the archive. It contains two folders, core with the cross-platform build and classic with the Windows build. Copy the core folder into DSServerDocker.

  3. Open core/hostsettings.json and remove the HTTPS address, so that the file contains:

    {
      "urls": "http://*:5000"
    }
    

    The default file also lists https://*:5001. Without a certificate, DS Server ends at startup with the message "Unable to configure HTTPS endpoint. No server certificate was specified". HTTPS shows how to serve HTTPS with a certificate instead.

  4. Create a file named Dockerfile, without an extension, in DSServerDocker. The folder now looks like this:

    DSServerDocker/
        Dockerfile
        core/
            TXTextControl.DocumentServices.dll
            appsettings.json
            hostsettings.json
            ...
    

Write the Dockerfile

Paste the following content into the Dockerfile:

# ASP.NET Core Runtime 10.0 on Ubuntu 24.04
FROM mcr.microsoft.com/dotnet/aspnet:10.0

WORKDIR /app

# The Core build of DS Server
COPY ./core/ .

EXPOSE 5000

ENTRYPOINT ["dotnet", "TXTextControl.DocumentServices.dll"]

The Dockerfile works as follows:

  • FROM mcr.microsoft.com/dotnet/aspnet:10.0 starts from Microsoft's ASP.NET Core Runtime 10.0 image, which contains everything the Core build needs. DS Server 5.0 is built with .NET 10, so the .NET 8 images that version 4.x used don't work.
  • COPY ./core/ . copies the files of the Core build into /app, the working directory. DS Server writes its admin database Admin.db and the logs folder there.
  • EXPOSE 5000 documents the port from hostsettings.json.
  • ENTRYPOINT starts DS Server with Kestrel, the web server of ASP.NET Core.

The official image txtextcontrol/dsserver-core is built from the same instructions.

Build and Run the Image

  1. Open a terminal in the DSServerDocker folder and build the image:

    docker build -t dsserver .
    

    On a machine with an ARM64 processor, such as a Mac with Apple silicon, build with docker build --platform linux/amd64 -t dsserver .. The base image exists for several processors, and Docker picks the one of the machine, but the native libraries of the Core build exist for x64 only.

  2. Start a container and map port 5000:

    docker run -d -p 5000:5000 --name mydsserver dsserver
    
  3. Open http://localhost:5000 in a browser and sign in with the default credentials, user name admin and password admin. The admin portal shows its welcome page.

The console of the container shows only two lines about plugins. The messages of the web server, such as "Now listening on: http://[::]:5000", go to the log file in /app/logs. Read it with:

docker exec mydsserver sh -c 'cat /app/logs/*.log'

Change the admin password, register your serial number and create a security profile, as described in Installing with Official Image from Docker Hub.

Keep Data Outside the Container

Admin.db holds the admin password, the security profiles and the OAuth setting, and it is lost with the container. Keep it in a volume by setting its path, and the path of the logs, with environment variables. Add them to the Dockerfile:

ENV LiteDbOptions__DatabaseFileName=/data/Admin.db
ENV Logging__DSServerFile__Options__FolderPath=/data/logs

Then mount a volume at /data when you start the container:

docker run -d -p 5000:5000 -v dsserver-data:/data --name mydsserver dsserver

Add Plugins and Configuration

Files you copy into the image become part of the installation:

  • Plugins. Copy each plugin into its own subfolder of core/Plugins before you build. DS Server loads them at startup. See Plugins.
  • Settings. Change core/appsettings.json before you build, or set individual settings as environment variables with ENV or docker run -e. See Configuration.
  • Fonts. The core/Fonts folder contains the fonts the Core build uses. See Configuration.

Next Steps