Declarative MuOnline 0.97k Server on Linux
Run MuOnline private servers without Windows. Configure once, deploy anywhere.
| Traditional Setup | Bifrost |
|---|---|
| Windows Server license | Linux (free) |
| Edit .ini files manually | services.bifrost.rates.exp = 200; |
| Manual backups | git push (everything is code) |
| "Works on my machine" | Same config = same server |
| Reinstall everything on crash | podman-compose up -d |
- Zero Windows - Runs via Wine on Linux
- Declarative - NixOS module configures everything
- Reproducible - Same flake = identical server anywhere
- Isolated - Podman container, clean system
- Versioned - Git tracks all configuration
git clone https://github.com/your-user/bifrost
cd bifrost/containers
# Configure
cp .env.example .env
vim .env # Set your passwords
# Add your MuServer files
cp -r /path/to/MuServer ../blueprint/
# Run
podman-compose up -d# flake.nix
{
inputs.bifrost.url = "github:your-user/bifrost";
outputs = { nixpkgs, bifrost, ... }: {
nixosConfigurations.my-server = nixpkgs.lib.nixosSystem {
modules = [
bifrost.nixosModules.default
{
services.bifrost = {
enable = true;
serverFiles = ./MuServer;
database.passwordFile = "/run/secrets/db-pass";
rates = {
experience = 100;
drop = 50;
zen = 100;
};
ports = {
connectServer = 44405;
gameServer = 55901;
};
};
}
];
};
};
}Then deploy:
nixos-rebuild switch --flake .#my-serverWhen you enable Bifrost, NixOS automatically sets up:
- Firewall - Opens required ports (44405, 55901, 55990, 55980, 55601/udp)
- MariaDB - Database with MuOnline schema
- System User - Dedicated
bifrostuser - Wine Prefix - Configured with vcrun2015 and required DLLs
- Systemd Services - All 4 servers with proper startup order
MariaDB → DataServer → JoinServer → ConnectServer → GameServer
services.bifrost = {
enable = true;
# Server files location
serverFiles = ./MuServer;
# Server identity
serverName = "My Server";
# Game rates
rates = {
experience = 100; # 1x
drop = 50;
zen = 100;
};
# Network
network.bindAddress = "0.0.0.0";
ports = {
connectServer = 44405;
connectServerUdp = 55601;
joinServer = 55990;
dataServer = 55980;
gameServer = 55901;
};
# Database
database = {
host = "127.0.0.1";
port = 3306;
name = "MuOnline97";
user = "muonline";
passwordFile = "/run/secrets/db-password";
};
};| Service | Port | Protocol | Description |
|---|---|---|---|
| ConnectServer | 44405 | TCP | Client connection |
| ConnectServer | 55601 | UDP | Inter-server |
| JoinServer | 55990 | TCP | Authentication |
| DataServer | 55980 | TCP | Database proxy |
| GameServer | 55901 | TCP | Game logic |
bifrost/
├── flake.nix # Entry point
├── modules/
│ ├── bifrost.nix # Main NixOS module
│ └── database.nix # MariaDB initialization
├── configs/templates/ # .ini templates
├── scripts/
│ └── init-wineprefix.sh # Wine setup
├── containers/
│ ├── compose.yml # Podman compose
│ └── Containerfile # NixOS container
└── blueprint/ # MuServer files (gitignored)
- MuEmu 0.97k files - Server executables (not included)
- NixOS or Podman - For deployment
- x86_64 Linux - Wine requirement
# Enter dev shell
nix develop
# Initialize Wine
./scripts/init-wineprefix.sh $PWD/.wine
# Test servers manually
cd blueprint/MuServer/ConnectServer
wine ConnectServer.exe- Cost - No Windows Server license needed
- Stability - Linux servers have better uptime
- Resources - Lower memory/CPU footprint
- Automation - Better tooling for DevOps
- Declarative - Entire server defined in one file
- Reproducible - Same config = same result, always
- Rollback - Broken update? Revert instantly
- Atomic - Updates either complete fully or not at all
Minimal impact. MuEmu servers are not graphically intensive - they're essentially network services. Wine overhead is negligible for this use case.
Yes. Define additional ports in your config:
services.bifrost.ports.gameServer = 55901; # First server
# Add more via systemd service overridesBifrost provides the infrastructure, not the game files. You need:
- MuEmu 0.97k executables (kayito fork recommended)
- Client files configured to connect to your server
Currently tested with 0.97k. Other versions may work but are not officially supported. PRs welcome!
# Podman
cd containers && podman-compose pull && podman-compose up -d
# NixOS
nix flake update
nixos-rebuild switch --flake .#my-serverCheck logs:
# Podman
podman logs bifrost-servers
# NixOS
journalctl -u bifrost-dataserver -fCommon causes:
- Database not ready - wait for MariaDB health check
- Port already in use - check with
ss -tlnp | grep 44405 - Missing MuServer files - verify
blueprint/MuServer/exists
# Test connection
mysql -h 127.0.0.1 -u muonline -p MuOnline97
# Check MariaDB status
systemctl status mysql # NixOS
podman logs bifrost-db # PodmanFixes:
- Verify password in
.envorpasswordFile - Ensure MariaDB started before Wine servers
- Check if schema was initialized (tables exist)
"wine: could not load kernel32.dll"
# Reinitialize Wine prefix
rm -rf /var/lib/bifrost/.wine
./scripts/init-wineprefix.sh /var/lib/bifrost/.wineDLL not found:
# Verify DLL overrides
wine reg query 'HKEY_CURRENT_USER\Software\Wine\DllOverrides'-
Check firewall:
# NixOS - should be automatic iptables -L -n | grep 44405 # Manual open iptables -A INPUT -p tcp --dport 44405 -j ACCEPT
-
Verify server is listening:
ss -tlnp | grep -E '44405|55901'
-
Check client configuration:
Main.exemust point to server IP- Port must match ConnectServer (44405)
"nix develop" hangs:
# Clear Nix cache
nix-collect-garbage -d
# Rebuild with verbose
podman build --no-cache -t bifrost-servers .Out of disk space:
# Clean Podman
podman system prune -a
# Clean Nix
nix-collect-garbage -dCheck Wine compatibility:
# Test individual server
cd blueprint/MuServer/ConnectServer
WINEDEBUG=+all wine ConnectServer.exe 2>&1 | head -100Verify vcrun2015:
winetricks list-installed | grep vcrun
# Should show: vcrun2015# Podman - nuclear option
podman-compose down -v
podman system prune -a
podman-compose up -d --build
# NixOS
systemctl stop bifrost.target
rm -rf /var/lib/bifrost
nixos-rebuild switch --flake .#my-server- MuEmu 0.97k (kayito fork) - Server emulator
- Wine - Windows compatibility layer
- NixOS - Declarative Linux distribution
Contributions welcome! This is a community project.
- Fork the repository
- Create your feature branch
- Submit a pull request
MIT
Bifrost - The bridge between Windows servers and Linux freedom