Installing MyChat server and clients on a terminal server

A terminal server (Windows Server + RDS, RDP sessions) is a special case: the client is installed on the machine once, while dozens of users work in it at the same time, each in their own session. This guide shows where to put the server, how to install the client for all users at once, how to set up self-registration and autostart, how much hardware to plan for, and how to update such an installation.

If you plan to keep the MyChat Server on Linux, see installing MyChat Server on a Linux host. The terminal-server part of this guide does not depend on the server platform.


1 The layout: what goes where

MyChat has two independent parts, and on a terminal server they are usually kept apart:

ComponentWhere it lives
MyChat ServerA separate machine or VM (Windows service or Linux/Docker). It may run on the terminal server itself, but then it competes for resources with the user sessions.
MyChat ClientA single copy in Program Files of the terminal server. Every RDP session launches that same mcclient.exe.
User dataIn each user's profile: %LOCALAPPDATA%\MyChat Client\ — settings, history, cache. Created automatically on first launch.

The client is a native Win32 application — no .NET, no per-user service. One session means one mcclient.exe process with its own profile.

Do not install the client into a user profile. The install directory must be shared (C:\Program Files (x86)\MyChat Client), otherwise every profile gets its own copy of the program and each has to be updated separately.

2 Installing the server

The server is installed the usual way — there is nothing terminal-specific about it. On a terminal server, though, it must run as a Windows system service rather than as an application inside an administrator's RDP session: otherwise the server depends on that session.

  1. run the server installer on the chosen machine;
  2. if the server already runs as a regular application — turn its autostart off in the settings and close it;
  3. install and start the service (as administrator):
    "C:\Program Files (x86)\MyChat Server\SystemService\service_install.cmd"
    "C:\Program Files (x86)\MyChat Server\SystemService\service_start.cmd"
  4. in the service properties set the startup type to "Automatic (Delayed Start)";
  5. open the web admin panel at http://<server-IP> and set the administrator, domain and HTTPS.

Ports that must be reachable from the terminal server:

PortPurpose
2004 TCPclient connections — required
80 / 443 TCPweb chat, web admin and all file transfer. The port is set by the administrator, 80 by default
UDP 49000–50000, 8888TURN — audio/video calls and conferences
The server runs either as an application or as a service — never both. And do not put MyChat Server into the startup of other terminal server users.
Already running a server on the network? Skip this step — the terminal server simply becomes one more place clients connect from.

3 Installing the client on the terminal server

Install under an administrator account, once for the whole machine:

  1. switch the server into application install mode:
    change user /install
  2. run the client installer and keep the default directory C:\Program Files (x86)\MyChat Client;
  3. switch back to the normal mode:
    change user /execute

Put the shortcut into the shared folders so that every user gets it:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\      # Start menu for all users
C:\Users\Public\Desktop\                                   # desktop for all users

On first launch the client creates the data folder of the current user by itself:

C:\Users\<USER>\AppData\Local\MyChat Client\
There is no need to prepare profiles in advance — nothing has to be copied by hand. Users do not need write access to the program directory.

4 Autostart and user self-registration

To avoid creating accounts by hand and handing out passwords, start the client with the self-registration parameters. Add this line to the session startup:

"C:\Program Files (x86)\MyChat Client\mcclient.exe" /auto -server:"192.168.1.50" -randompassword

Parameter values are given after a colon; the parameters themselves are separated by spaces.

ParameterWhat it does
/autoregisters the user under their Windows account name and connects to the server right away
-server:"IP"MyChat server address — a required parameter
-port:2004server TCP port; needed only if it is non-standard (1024 minimum)
-randompasswordgenerates a random 16-character password — the user never sees or types it
-servpass:"x123"server access password, if one is enabled

Where to put the line — your choice:

  • a shortcut with these parameters in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\ — the simplest way;
  • a group policy: User Configuration → Policies → Windows Settings → Scripts → Logon.

For /auto to work, the server must allow registration of new users.

/auto and Active Directory pass-through authentication are mutually exclusive. If the users are imported from AD and the server details are pushed through the registry/GPO, launch the client with no keys at all: "C:\Program Files (x86)\MyChat Client\mcclient.exe".
One person — one MyChat account. Never share a single login between several people: history, statuses and message delivery assume personal accounts.

5 Uniform settings for all sessions

On a terminal server all clients should behave the same way — file receiving above all. This is configured on the server, not in each session:

  1. in the server admin panel open Tools → Client settings templates;
  2. create a template for terminal users: file receiving mode, download folder, sounds, autostart, appearance;
  3. assign the template to a user group (for example, Guests).

The template applies both to existing members of the group and to every new one — no need to tune each session separately.

Sessions will not collide over files: clients open no ports of their own — every file goes through the MyChat web server.
Keep the download folder inside the user profile. One shared folder for everyone means other people's files in plain sight and name collisions.

6 How much hardware to plan for

MyChat Client is a native Win32 app without .NET and idles at about 40 MB of RAM per session. That is noticeably less than Skype or Viber, so the client lives well on memory-constrained terminal servers.

Concurrent sessionsRAM for clients onlyNote
10≈ 0.4 GBa rough figure, excluding the OS and other software
25≈ 1 GB
50≈ 2 GB
100≈ 4 GBbetter move the MyChat Server to a separate machine

The figure grows with heavy image-rich chatting and open history windows — plan a 30–50% headroom.

7 Web chat instead of the application

You may skip installing the client altogether: MyChat ships a full-featured web chat. The user opens

http://<server-IP>

in a browser and works in the same chat — groups, files, channels and conferences included.

OptionProsCons
Applicationnotifications, hotkeys, screenshots, full OS integrationRAM per session, manual updates
Web chatnothing to install, updated together with the serverworks only while the browser tab is open
A mix works too: the application for permanent staff, the web chat for temporary and occasional sessions.

8 Updating

An update runs in two stages, in this order:

  1. Server. Stop the server service, install the new version over the old one, start it again.
  2. Client. On the terminal server a single copy of the program is updated — as administrator, over the existing installation.

Before updating the client, close every running mcclient.exe — the program file stays locked while at least one session holds it:

change user /install
taskkill /IM mcclient.exe /F      # close the clients in all sessions
... install the new version ...
change user /execute

The RDP sessions themselves are not terminated — only the chat closes. After the install it comes back from startup at the next logon, or is launched manually from the shortcut.

Turn the client auto-update off on a terminal server: a user without administrator rights cannot write to Program Files, so every session would only keep asking about updates for nothing.

9 Common RDP pitfalls

SymptomCause and fix
Clipboard does not work, screenshots do not pasteclipboard redirection is disabled in the RDP connection. Enable it in the RDP client or in the RDS policy.
No notification soundsaudio playback is not redirected into the session: RDP → Local Resources → Play on this computer.
Microphone does not work in callsaudio recording redirection into the RDP session is required. Without it, audio/video calls from a terminal session are impossible.
A second logon "kicks out" the first oneseveral people share one MyChat account. Create personal accounts (see step 4).
Files disappear after logoffthe session runs on a temporary profile. Fix it at the RDS level, not in the chat.
Mass audio/video conferences from terminal sessions are a bad idea: all the audio and video is encoded on a single CPU. For calls, prefer a local client or the mobile app.

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