Installing Using Docker (Core on Linux)
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
Create a folder named DSServerDocker.
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.
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.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.0starts 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 5000documents the port from hostsettings.json.ENTRYPOINTstarts 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
Open a terminal in the DSServerDocker folder and build the image:
docker build 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.Start a container and map port 5000:
docker run 5000:5000 mydsserver dsserverOpen
http://localhost:5000in a browser and sign in with the default credentials, user nameadminand passwordadmin. 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 '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 5000:5000 dsserver-data:/data 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
ENVordocker run -e. See Configuration. - Fonts. The core/Fonts folder contains the fonts the Core build uses. See Configuration.
Next Steps
- HTTPS: serve the container over HTTPS with a certificate.
- Multiple Servers with Load Balancing: run several containers behind a load balancer.
- Upgrading: build the image for a new release.
- Linux: problems specific to DS Server on Linux.