How to Configure MU Online Server on Linux with Wine/Mono
Complete technical guide to running a MuServer Season 6 on Linux using Wine, with SQL Server configuration via FreeTDS and network tuning.
Why Run MuServer on Linux?
Linux servers offer real advantages in production environments: lower licensing costs, better long-uptime stability, and easy access to monitoring tools like htop, netstat, and journald. The challenge is that MuServer is a native Win32 binary — the entire ecosystem was built for Windows. This guide covers the most viable approach: Wine for the server executables + SQL Server for Linux (or a remote instance) for the database.
Prerequisites
- VPS or dedicated server running Ubuntu 22.04 LTS / Debian 12
- Minimum: 4 vCPUs, 8 GB RAM, 40 GB disk
- Root or sudo access
- MuServer Season 6 files already obtained and extracted
- SQL Server instance (remote on Windows, or SQL Server 2019 for Linux)
Part 1 — Installing Wine
Step 1: Enable the Wine repository
sudo dpkg --add-architecture i386
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key \
https://dl.winehq.org/wine-builds/winehq.key
sudo wget -NP /etc/apt/sources.list.d/ \
https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
sudo apt update
Step 2: Install stable Wine and Winetricks
sudo apt install --install-recommends winehq-stable
sudo apt install cabextract # required by winetricks
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks && sudo mv winetricks /usr/local/bin/
Step 3: Create a 32-bit Wine prefix for MuServer
MuServer Season 6 is a pure Win32 binary. A dedicated prefix isolates its DLLs from other applications.
export WINEPREFIX=/opt/muserver/wine32
export WINEARCH=win32
wine wineboot --init
Step 4: Install runtime dependencies via Winetricks
WINEPREFIX=/opt/muserver/wine32 WINEARCH=win32 winetricks vcrun2005
WINEPREFIX=/opt/muserver/wine32 WINEARCH=win32 winetricks vcrun2008
WINEPREFIX=/opt/muserver/wine32 WINEARCH=win32 winetricks vcrun2010
WINEPREFIX=/opt/muserver/wine32 WINEARCH=win32 winetricks dotnet20
winetricks dotnet20 fails with a download error, use winetricks --force dotnet20 or manually copy dotnetfx20.exe from Microsoft into ~/.cache/winetricks/dotnet20/.Part 2 — Configuring SQL Server
Option A: SQL Server 2019 for Linux (same machine)
# Import Microsoft key and repository
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc \
| sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
curl https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2019.list \
| sudo tee /etc/apt/sources.list.d/mssql-server-2019.list
sudo apt update
sudo apt install mssql-server
# Initial setup (set SA password and choose Express edition)
sudo /opt/mssql/bin/mssql-conf setup
Option B: Remote SQL Server instance on Windows
In this case, only configure FreeTDS to point to the Windows Server IP:
# /etc/freetds/freetds.conf
[MUSERVER_DB]
host = 192.168.1.100
port = 1433
tds version = 7.4
database = MuOnline
Step 5: Create the MuOnline database
Connect to SQL Server with sqlcmd and run:
-- Create the database and a dedicated login
CREATE DATABASE MuOnline
COLLATE Latin1_General_CI_AS;
GO
USE MuOnline;
GO
CREATE LOGIN muserver_user WITH PASSWORD = 'YourStrongPass123!',
CHECK_POLICY = OFF;
GO
CREATE USER muserver_user FOR LOGIN muserver_user;
GO
EXEC sp_addrolemember 'db_owner', 'muserver_user';
GO
sa account directly in MuServer configuration files in production. Create a dedicated login with privileges limited to the MuOnline database only.Then restore your database backup (.bak file or .sql scripts included with MuServer):
sqlcmd -S localhost -U sa -P 'YourAdminPass' \
-Q "RESTORE DATABASE MuOnline FROM DISK='/opt/muserver/backup/MuOnline.bak'"
Part 3 — File Structure and Configuration
Step 6: Copy server files
# Expected structure after copying
/opt/muserver/
├── ConnectServer/
│ ├── ConnectServer.exe
│ └── Config/
│ └── ConnectServer.ini
├── DataServer/
│ ├── DataServer.exe
│ └── DataServer.ini
├── GameServer/
│ ├── GameServer.exe
│ ├── Config/
│ │ ├── GameServerInfo.ini
│ │ └── GatePort.ini
│ └── Data/
│ ├── Events/
│ └── Maps/
└── EventServer/
└── EventServer.exe
# Set correct permissions
chmod -R 755 /opt/muserver/
chmod -R 644 /opt/muserver/GameServer/Data/
Step 7: Edit database connection strings
Each component has its own database configuration file. Edit all of them:
# GameServer/Config/GameServerInfo.ini
[DB_CONNECT]
DBHost=127.0.0.1
DBPort=1433
DBName=MuOnline
DBUser=muserver_user
DBPass=YourStrongPass123!
# DataServer/DataServer.ini
[DATABASE]
ServerAddress=127.0.0.1
DatabasePort=1433
DatabaseName=MuOnline
DatabaseUID=muserver_user
DatabasePWD=YourStrongPass123!
Step 8: Configure ports in ConnectServer
# ConnectServer/Config/ConnectServer.ini
[CONNECT_SERVER]
ClientPort=44405
ServerPort=55901
MaxClientCount=10000
sudo ufw allow 44405/tcp && sudo ufw allow 55901/tcp.Part 4 — Startup Scripts
Step 9: Create start/stop scripts
# /opt/muserver/start_all.sh
#!/bin/bash
export WINEPREFIX=/opt/muserver/wine32
export WINEARCH=win32
export DISPLAY=:0
LOG_DIR="/opt/muserver/logs"
mkdir -p "$LOG_DIR"
echo "[$(date)] Starting DataServer..."
cd /opt/muserver/DataServer
wine DataServer.exe >> "$LOG_DIR/dataserver.log" 2>&1 &
sleep 5
echo "[$(date)] Starting ConnectServer..."
cd /opt/muserver/ConnectServer
wine ConnectServer.exe >> "$LOG_DIR/connectserver.log" 2>&1 &
sleep 3
echo "[$(date)] Starting GameServer..."
cd /opt/muserver/GameServer
wine GameServer.exe >> "$LOG_DIR/gameserver.log" 2>&1 &
echo "[$(date)] All components started."
chmod +x /opt/muserver/start_all.sh
sudo apt install xvfb and start it with Xvfb :0 -screen 0 1024x768x16 & before launching the Wine processes.Step 10: Create a systemd service
# /etc/systemd/system/muserver.service
[Unit]
Description=MU Online Private Server
After=network.target mssql-server.service
[Service]
Type=forking
User=muserver
WorkingDirectory=/opt/muserver
ExecStart=/opt/muserver/start_all.sh
ExecStop=/usr/bin/pkill -f "wine.*Server.exe"
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable muserver
sudo systemctl start muserver
Part 5 — Verification and Troubleshooting
Monitor logs in real time
tail -f /opt/muserver/logs/gameserver.log
tail -f /opt/muserver/logs/connectserver.log
Check active network connections
ss -tlnp | grep -E '44405|55901|55906'
Test database connectivity
sqlcmd -S 127.0.0.1 -U muserver_user -P 'YourStrongPass123!' \
-Q "SELECT TOP 1 Name FROM MuOnline..Character"
Common error: "err:module: load_builtin_dll failed"
This error means a DLL is missing from the prefix. Identify the missing DLL in the log and install it:
WINEPREFIX=/opt/muserver/wine32 winetricks <package_name>
# Examples: vcrun2012, vcrun2015, d3dx9, directx9
WINE_CPU_TOPOLOGY=4:1 to the service environment variables to limit CPU affinity.SQL Server Performance Tuning for Linux
Once the server is running, optimize the most frequently executed queries that MuServer issues:
-- Index on character table (reduces login query time)
USE MuOnline;
GO
CREATE NONCLUSTERED INDEX IX_Character_AccountID
ON dbo.Character (AccountID)
INCLUDE (Name, cLevel, MapNumber);
GO
-- Index on warehouse table
CREATE NONCLUSTERED INDEX IX_Warehouse_AccountID
ON dbo.Warehouse (AccountID);
GO
With this setup, your MU Online Season 6 private server will run stably on Linux, taking full advantage of the operating system's capabilities for extended uptime and advanced monitoring.
Perguntas frequentes
Does Wine support all versions of MuServer?
The most tested and stable versions are Season 6 (MuServer S6EP3)-based builds. Older versions (S1-S3) tend to work better because they rely on fewer modern Windows libraries. S12+ servers use heavy .NET components that require Mono or Wine with specific 64-bit prefixes.
How do I connect MuServer to a SQL Server running on another host?
In ConnectServer/Config/ConnectServer.ini and in each component's DBServer.ini file, set the DBHost field to the IP or hostname of the SQL Server. Configure FreeTDS in /etc/freetds/freetds.conf pointing to the correct instance, and make sure port 1433 is open in the SQL host's firewall.
The GameServer freezes while loading maps. What should I check?
Confirm that map files in GameServer/Data/Maps/ have read permissions (chmod 644). Check the log at GameServer/Logs/GameServer.log for file access errors. A common cause is missing MSVCP100.dll and MSVCR100.dll in the Wine prefix — install them with: winetricks vcrun2010.
Can I use MariaDB instead of SQL Server?
Technically yes, using an ODBC wrapper, but MuServer was built for T-SQL and uses stored procedures and syntax specific to SQL Server. The most stable approach is running SQL Server 2012/2014 Express in a separate Windows VM, or using SQL Server for Linux (available from SQL Server 2017 onward).