Hosting a server
Take a fresh Windows or Linux machine to a public server running Foundations, then keep it running and updated.
An ArcaneMP server is one executable plus a server.json configuration file and a resources/ directory. The release ships the runtime only, with no game mode. Public servers run Foundations, a complete resource pack that adds characters, inventory, banking, jobs, shops, administration and other common systems on top of a MySQL or MariaDB database.
This guide takes a fresh machine to a server players can join, then covers keeping it running and updating it. It is for server owners. Players only need the player guide and their own PC copy of Hogwarts Legacy, from Steam or the Epic Games Store. A PC Game Pass copy also works, but its support is experimental.
What you need
Section titled “What you need”| Why | |
|---|---|
| A Windows x64 or Linux x86-64 host | The dedicated server is native on both. Linux needs glibc 2.38 or newer: Ubuntu 24.04+ or Debian 13+. |
The release ZIP from the official #releases channel in the ArcaneMP Discord |
It must be the same release your players run. A mismatched client is rejected before it loads in. |
| MySQL 8.x or MariaDB 10.6+ | Foundations stores its data there. A bare server with no resources needs no database. |
| An Foundations release | The supported starting point for a public server. Its compatibility matrix names the ArcaneMP release it pairs with. |
| Control of the host firewall, and of the router on a home connection | Players reach the server on port 27015 over both UDP and TCP. |
Running in Docker or under Pterodactyl or Pelican? The server’s public image packages this same runtime. Read on for configuration, Foundations and the masterlist, then follow that page for the container itself.
1. Get the release
Section titled “1. Get the release”Download the complete ZIP from #releases and extract it. It is arranged like this:
ArcaneMP-<version>/├── client/ # your own client copy├── server/ # Windows dedicated server└── server-linux/ # Linux dedicated serverDo not send the archive or its client/ directory to players, and do not mirror or modify it. Every player downloads their own copy from #releases, and the launcher keeps it updated after that. Do not combine a server directory from one archive with a client from another.
2. Install the server
Section titled “2. Install the server”Windows
Section titled “Windows”- Create a permanent directory such as
C:\ArcaneMPServer. - Copy everything inside the release’s
serverdirectory into it. - Create empty
resources,logsanddatadirectories next toArcaneMPServer.exe.
An ordinary user account can run the server, provided it can write to that directory. Do not run it elevated; nothing in the server requires administrator rights.
Install the runtime libraries the server links against. These are the packages the official container image installs on Ubuntu 24.04, plus unzip for extracting Foundations:
sudo apt-get updatesudo apt-get install -y ca-certificates libcurl4t64 libssh2-1 libssl3t64 libstdc++6 zlib1g unzipCreate an unprivileged system account to own and run the server. This is a local account on the host, not a cloud provider’s IAM service account:
sudo useradd --system --home-dir /opt/arcanemp --shell /usr/sbin/nologin arcanempThen install the runtime from the directory where you extracted the archive:
sudo install -d -o arcanemp -g arcanemp /opt/arcanempsudo cp -a ArcaneMP-*/server-linux/. /opt/arcanemp/sudo install -d /opt/arcanemp/resources /opt/arcanemp/logs /opt/arcanemp/datasudo chown -R arcanemp:arcanemp /opt/arcanempsudo chmod +x /opt/arcanemp/ArcaneMPServer /opt/arcanemp/crashpad_handlerThe chmod matters: an extracted archive does not always keep the executable bit. Keep ArcaneMPServer, crashpad_handler and libnode.so.141 together. The last one is the bundled Node.js runtime that executes server resources, and a libnode from another release will not work.
Never run the server as root.
3. Create server.json
Section titled “3. Create server.json”The server reads server.json from its working directory. Create it next to the executable:
{ "host": "0.0.0.0", "port": 27015, "maxplayers": 32, "server-token": "", "mod": { "curseforge": { "mods": [] } }}That is enough for a first start. The server also writes a complete default file on its first start if none exists, listing every key the build understands. Leave server-token empty until you list the server.
Every key, the join password, the command-line overrides and the required-mod list are covered in Server configuration.
4. Install Foundations
Section titled “4. Install Foundations”Foundations is installed separately from the server and versioned as one unit: install every hmp-* resource from a single release, and never mix resource versions. Its own installation guide is authoritative. In short:
- Create an empty
hogwartsmpdatabase and a non-root account scoped to it, following the database guide. Do not import a schema; Foundations creates and migrates its own tables. - Copy every
hmp-*directory from the release’sresourcesdirectory into your server’sresources/. They must sit directly under it, with no extrahmp-foundations/level in between. - Copy the release’s example
data/hmp-*.jsonfiles into your server’sdata/and replace everyCHANGE_MEvalue.data/hmp-mysql.jsonholds the database connection. - Remove any older resources the installation guide lists as overlapping. Two stacks loaded side by side give duplicate commands and UI.
Secrets such as the admin bootstrap secret are read from the server process’s environment. Foundations does not load .env files on its own:
HMP_ADMIN_BOOTSTRAP_SECRET=REPLACE_WITH_A_LONG_RANDOM_SECRETHMP_ADMIN_REQUIRE_VERIFIED=trueHMP_ADMIN_UNSAFE_ASSERTED_BANS=falseThe database, data/ and these secrets are server data. They are never sent to clients.
5. Open the ports
Section titled “5. Open the ports”| Port | Protocol | Expose it? | Purpose |
|---|---|---|---|
27015 |
UDP | Yes, to the internet | Game traffic. Forward it through the router when hosting at home. |
27015 |
TCP | Yes, to the internet | Resource downloads, so players cannot join without it. It also answers the server information HTTP API at /. Forward it too. |
3306 |
TCP | Never | MySQL or MariaDB. Restrict it to the server host or a private network. |
On Linux with ufw:
sudo ufw allow 27015/udpsudo ufw allow 27015/tcpOn Windows, allow the program when Windows Defender Firewall asks on first start, or add the rule from an elevated PowerShell. The rule needs administrator rights; the server does not:
New-NetFirewallRule -DisplayName "ArcaneMP UDP" -Direction Inbound -Protocol UDP -LocalPort 27015 -Action AllowNew-NetFirewallRule -DisplayName "ArcaneMP TCP" -Direction Inbound -Protocol TCP -LocalPort 27015 -Action AllowOn a cloud host, open the same port over UDP and TCP in the provider’s firewall or security group as well. Test from a machine outside your network: connecting from the host itself proves nothing about the public path, and TCP port checkers cannot test a UDP port.
Upgrading from before 1.11.0: the separate HTTP port is gone. The server ignores
apiport,apihost,--apiportand--apihost, so open TCP on the game port and move anything that read the old port to the game port. You can then close the old port.
6. Start it
Section titled “6. Start it”Start MySQL or MariaDB first, then the server, with the server directory as the working directory.
On Windows:
Set-Location C:\ArcaneMPServer.\ArcaneMPServer.exeOn Linux:
cd /opt/arcanempsudo -u arcanemp ./ArcaneMPServerThe server finds server.json, resources, data and logs relative to the directory it runs in, so always start it from its own directory. A shortcut, scheduled task or service that only points at the executable starts in the wrong directory and finds no configuration or resources. Set its Start in or working directory too.
A healthy first boot logs lines like these:
HogwartsMP Server successfully started[hmp-mysql] connected to 127.0.0.1:3306/hogwartsmp[hmp-core] Accounts, characters, groups and metadata are readyfollowed by ready messages from the rest of the hmp-* resources. Server will not be announced to masterlist is expected while server-token is empty. Do not admit players if any resource logs Startup failed. The full log is written to logs/hogwarts-mp.log.
The console accepts status (address and player count), help, and stop or quit to shut down cleanly. In a release build, restart the server after changing resources or server.json.
7. Join it
Section titled “7. Join it”Start ArcaneMP through the launcher, open Play, and enter the server’s address, or pick it from the list once it is listed. The client assumes port 27015, so add :port only if you changed it. Fill Password only if the server sets one.
You can also hand players a link. The launcher registers the arcanemp:// scheme each time it runs, so once a player has started it once, opening a link connects straight to your server:
arcanemp://play.example.comarcanemp://203.0.113.10:28015Link a player to a passworded server with ?password=… appended. Anyone holding that link can join, so do not post it publicly.
Run your first join with a disposable test account and walk through Foundations’ first-player checks: create and select a character, reconnect, open the inventory, and confirm /admin is denied to a normal player.
8. List it publicly
Section titled “8. List it publicly”An unlisted server is still reachable by address. To appear in the server list, register it with the MafiaHub masterlist:
- Sign in at mafiahub.dev and open your servers.
- Click Add a server. This registers the listing and gives you its server key.
- Put the key in
server.jsonasserver-token, and restart.
No heartbeat script is needed: while running, the server announces its name, address, port and player count to https://masterlist.mafiahub.dev, and it appears within a minute or so. That address is built into the server, but the host must allow outbound HTTPS to it. The key also pairs the listing with the exact build players need.
The key is a secret. Anyone with it can announce a server as yours, so keep it out of screenshots, support logs, source control and Discord.
Keep it running
Section titled “Keep it running”A server started from a terminal stops when the terminal closes, does not come back after a crash, and does not return after a reboot.
Linux: systemd
Section titled “Linux: systemd”Skip this if a game panel manages the process; its daemon already supervises the server. Otherwise create /etc/systemd/system/arcanemp.service:
[Unit]Description=ArcaneMP dedicated serverAfter=network-online.target mysql.serviceWants=network-online.targetRequires=mysql.service
[Service]Type=simpleUser=arcanempGroup=arcanempWorkingDirectory=/opt/arcanempEnvironmentFile=/etc/arcanemp.envExecStart=/opt/arcanemp/ArcaneMPServerRestart=on-failureRestartSec=5StandardInput=nullStandardOutput=journalStandardError=journal
[Install]WantedBy=multi-user.targetFive lines carry the weight:
WorkingDirectoryresolvesresources,data,logsandserver.json.Requires=andAfter=mysql.servicehold the server back until the database is up. Without them a reboot races Foundations against MySQL and every resource that depends onhmp-corefails. On MariaDB the unit is usuallymariadb.service. Drop both when the database runs on another machine, or when there is none.EnvironmentFilesupplies Foundations’ secrets. The unit file is world-readable, so secrets do not belong in it.Restart=on-failurebrings the server back after a crash.WantedBy=multi-user.targetstarts it on boot once the unit is enabled.
Create the private environment file, fill it with KEY=value lines, and enable the unit:
sudo install -m 600 /dev/null /etc/arcanemp.envsudoedit /etc/arcanemp.envsudo systemctl daemon-reloadsudo systemctl enable --now arcanempDay to day:
systemctl status arcanemp # running? since when? last exit?sudo systemctl restart arcanemp # after editing server.json or resourcesjournalctl -u arcanemp -f # live log; add -b for this boot onlyStandardInput=null disables the server console; systemctl stop and systemctl status replace it. Reboot the host once and confirm the server comes back by itself before opening it to players. That is the only real test that the unit is enabled and ordered after the database.
Windows: a service wrapper
Section titled “Windows: a service wrapper”Use a Windows service wrapper or process manager that restarts the server on exit and starts it at boot. Whichever you choose, set its working directory to the server directory and give it the Foundations environment variables.
Update to a new release
Section titled “Update to a new release”The launcher updates players’ clients automatically. It never updates a dedicated server, so every release means:
- Announce maintenance and stop admitting players.
- Stop the server cleanly.
- Back up
server.json,data/, any custom resources, the runtime you are about to replace, and the Foundations database. Foundations documents the dump command under backups and upgrades. - Replace the runtime from the new release, and replace the whole Foundations pack as one unit with the release its compatibility matrix names. On Linux the runtime is
ArcaneMPServer,crashpad_handlerandlibnode.so.141; runchmod +xon the first two again afterwards. - Read the release notes and example configs for new keys.
- Start the database, then the server, and wait for every resource’s ready message.
- Join once with a client from the same release and test character selection, inventory and your main gameplay loop.
Keep the previous runtime and the matching database backup until the new build has passed a real connection test. Foundations migrations can be forward-only, so rolling back the server may also mean restoring that backup.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Check |
|---|---|
| Exits immediately | Read the first error in the log. Confirm the working directory, a writable logs/, complete runtime files, and valid JSON. |
JSON config could not be applied: … type must be … |
A server.json key has the wrong JSON type, such as "port": "27015" or null. The message names the type, not the key. See Server configuration. |
Linux: version 'GLIBC_2.38' not found |
The distribution is too old. Use Ubuntu 24.04+ or Debian 13+, directly or as a container base. |
Linux: libnode.so.141: cannot open shared object file |
Keep the complete Linux bundle together, or start it with LD_LIBRARY_PATH=/opt/arcanemp. Do not substitute a libnode from another release. |
Linux: exits on a VPS with Tracy Profiler initialization failure: CPU doesn't support invariant TSC |
The virtual CPU hides a feature the built-in profiler checks for. Start the server with TRACY_NO_INVARIANT_CHECK=1 in its environment (Environment=TRACY_NO_INVARIANT_CHECK=1 in the unit). |
| Stops when the terminal closes, or is gone after a reboot | It was started from a shell. Run it under systemd or a Windows service manager. |
| Every Foundations resource fails after a reboot, but a manual start works | The server raced the database. Add Requires= and After=mysql.service to the unit. |
| Players cannot connect | Confirm UDP reachability from outside, router forwarding, the address and the port. A TCP port test does not validate UDP. |
| Players connect but cannot download resources | The game port is not reachable over TCP. Open and forward TCP as well as UDP. |
| Players connect and are rejected immediately | Client and server come from different releases. Update the server, or have players relaunch so the launcher updates them. |
| Foundations says MySQL is not configured | Install data/hmp-mysql.json, or set the HMP_MYSQL_* variables in the server’s environment. |
Foundations reports ECONNREFUSED |
Start MySQL and check its host and port. Inside a container, 127.0.0.1 is the container itself. |
| Foreign-key or migration error | Stop the server and read the earliest Foundations schema error. Do not edit migration history to silence it. |
| A resource depends on a missing resource | The resource set is incomplete or mixes releases. Restore one matching set. |
| Duplicate commands or UI | Overlapping legacy and Foundations resources are both loaded. Keep one owner per system. |
| Not in the server list | Confirm server-token, outbound HTTPS, the registration, and the masterlist line in the log. Direct connect keeps working either way. |
When asking for help, include the release, the operating system, a sanitized server.json, the resource list, and the first relevant error from logs/hogwarts-mp.log. Remove tokens, passwords, database URLs, player addresses and identity information first.
Related
Section titled “Related”- Server configuration: every
server.jsonkey, command-line overrides, passwords and required mods. - Docker and game panels: the public server image, Compose, and the Pterodactyl and Pelican egg.
- Player guide: the page to send your players, from installing the client to reporting a bug.
- Your first resource: writing your own resources on top of the server.