Migrating MyChat Server from Windows to Linux (Docker)


This guide shows how to move a live MyChat Server installation from Windows to the ready-made Linux Docker image, keeping the database, files and certificates. If the server's IP address changes, the last step covers pointing clients to the new address.

If the Linux image isn't installed yet, do the Installation first — this guide continues from it.


1 What to move, and what not to

From the Windows server you move only user data. Everything else — paths, configs, binaries — comes from the image itself.

MoveDon't move
db/ — the system database (via the admin backup archive)options.json — the image's Linux defaults are used
files/ — user filesturn/mixer configs — the server regenerates them on every launch
cert/ — certificates (as-is, no reissue)any Windows paths and binaries
Certificates transfer as-is. The server loads the key and cert as separate files and normalizes the encoding itself — nothing to reissue or convert.

2 Step 1. Back up on Windows

  1. In the old server's web admin: Settings → Backup → “Make backup now” — create and download the database archive.
  2. Note where the data lives. By default the whole profile sits in C:\ProgramData\MyChat Server\ — most installations use the standard path, so that's the easiest place to look. Inside it:
    • database: C:\ProgramData\MyChat Server\db\
    • files: admin → Settings → Folders (the real paths are listed there)
    • certificates: C:\ProgramData\MyChat Server\cert\
    • logs: C:\ProgramData\MyChat Server\logs\ (move if needed)
The folder name under ProgramData matches the install folder name under Program Files (x86).

3 Step 2. Empty start on Linux

First bring the server up on an empty profile — on first start it deploys the correct structure itself, into which the next step drops the data from the old server.

Via the launcher (recommended):

wget https://nsoft-s.com/files/doker/deploy.tar.gz
tar -xzf deploy.tar.gz
cd deploy
./mc-launcher.sh

The wizard walks you through everything:

  • picks the interface language;
  • checks Docker and reports what's missing;
  • downloads and installs the image (docker load) — the “Download Docker image from site” and “Attach Docker image” menu items;
  • creates the profile directory (/srv/mychatserver);
  • starts the container with all the required parameters — the “Start server” item.

Or manually (your own orchestrator, automation, a host with no TUI):

wget https://nsoft-s.com/files/doker/mychatserver-slim.tar.gz
docker load -i mychatserver-slim.tar.gz

mkdir -p /srv/mychatserver
docker run -d --name mychatserver --network host \
    -v /srv/mychatserver:/var/lib/mychatserver \
    --stop-timeout 30 \
    mychatserver:slim

Wait for it to start — the admin opens at http://<server-IP>:8080.

--network host and --stop-timeout 30 are required: without host networking TURN won't work, and without the timeout the database may close incorrectly. The launcher sets them for you.

4 Step 3. Stop and load the data

Stop the server — the “Stop MyChat server” item in the launcher, or:

./mc-stop.sh             # or manually: docker stop -t 30 mychatserver

Into the profile directory on the host (/srv/mychatserver) drop the data from the old server:

  1. Database. Extract the backup archive into /srv/mychatserver/db/, replacing the empty database the image created. Copy all files from the db\ folder (the archive contains them all, not just mcserv.db).
  2. Files. Copy the contents of the Windows files/ into /srv/mychatserver/files/.
  3. Certificates. Copy cert/ from the old server into /srv/mychatserver/cert/.
  4. Logs (optional). If you want to keep the log history, copy the contents of the Windows logs/ into /srv/mychatserver/logs/.
The image runs as root — profile files on the host are owned by root; editing them needs sudo.

5 Step 4. Restart and verify

Start the server again — the “Start server” item in the launcher, or ./mc-start.sh. On start the server sees the existing database and picks it up (migrating the schema to the image version if needed).

Check:

./mc-status.sh           # container, ports, TURN relay address, disk
./mc-logs.sh             # live logs (all service logs are in /srv/mychatserver/logs/)

Log into the admin and confirm the history, users and files from the old server are all there.

6 Step 5. Clients when the IP changes

If the new server got the same IP address, you can skip this step — clients reconnect on their own.

Server side. Admin → Tools → “Server moving”: set the new IP address, ports, and the primary and backup server addresses.

Clients (all desktop clients behave the same):

Connection typeAction
DNS nameRemap the old DNS name to the new IP. Clients pick it up: on a LAN instantly, over the internet within ~72 h.
Direct IPSet the new server address in each client manually.
Active DirectoryUpdate the REG file with the connection settings and push it via GPO — clients apply it at next login.

7 Backup, rollback and troubleshooting

  • Ongoing backup / migration. One volume (/srv/mychatserver) = the full installation state. Stop the container (./mc-stop.sh) and copy the directory. Moving to another host — deploy the launcher there and drop in the same profile directory.
  • Startup error “directory is non-empty but mcserv.db not found” — most likely a wrong -v path or the database didn't land in db/. Make sure mcserv.db sits exactly in <profile>/db/.
  • Don't rush to remove the old Windows server — shut it down only after fully verifying the new one.

Служба поддержки