Server configuration
Every server.json key and command-line flag, passwords, required CurseForge mods, respawning, and the information API.
The server takes its settings from server.json in its working directory, and command-line flags can override some of them. This page lists every key and flag. To install a server first, see Hosting a server.
server.json
Section titled “server.json”On first start, if server.json is missing and the directory is writable, the server writes one with every key the build understands, set to its default. That generated file is the authoritative list for your release, so edit it rather than writing one from scratch.
A complete file, with a password:
{ "host": "0.0.0.0", "port": 27015, "map": "", "maxplayers": 32, "server-token": "", "password": "castle-gate", "package-secret": "", "download-url": "", "mod": { "curseforge": { "mods": [] }, "autoRespawn": true }}Every key is optional: one you leave out takes its default. Restart the server after editing the file.
Framework keys
Section titled “Framework keys”| Key | Default | Meaning |
|---|---|---|
host |
0.0.0.0 |
Interface the server binds to. 0.0.0.0 accepts players on every interface. |
port |
27015 |
Game port. Players connect here over UDP and download resources over TCP. The information API is on it too. |
map |
"" |
Reserved. ArcaneMP ignores it; leave it empty. |
maxplayers |
32 |
Connection cap. This build allows at most 128; a higher value logs a warning and runs with 128. |
server-token |
"" |
Masterlist key from the MafiaHub dashboard. Empty keeps the server unlisted. See List it publicly. |
password |
"" |
Password players must enter to join. Empty lets anyone in. See Passwords. |
package-secret |
"" |
Secret the resource package key is derived from. Empty uses server-token. With both empty, the key follows from the mod name alone and anyone can work it out. Changing it makes every player download your resources again. |
download-url |
"" |
A web address players download resources from before your server, such as a CDN. See Serve downloads from a CDN. |
Mod keys
Section titled “Mod keys”ArcaneMP’s own settings live under the mod object, so they can never collide with framework keys added later.
| Key | Default | Meaning |
|---|---|---|
curseforge.mods |
[] |
CurseForge project IDs every connecting player must activate. See Required CurseForge mods. |
autoRespawn |
true |
Whether a dead player respawns on their own after a few seconds. See Respawning. |
broomUpgradeTier |
0 |
The broom upgrades, from 0 to 3, every player starts with. Scripts change it per player with player.setBroomUpgradeTier. |
broomSpeedMultiplier |
1 |
How fast every player’s broom flies, from 0.25 to 3, on top of its upgrades. Values outside the range are clamped. |
gearStatMultiplier |
1 |
How much of their worn gear’s Offense, Defense and Cooldown every player gets, from 0 to 1; 0 makes gear cosmetic. Values outside the range are clamped. Scripts change it per player with player.setGearStatMultiplier. |
gearTraits |
true |
Whether the traits on every player’s worn gear apply. Scripts change it per player with player.setGearTraits. |
Validation
Section titled “Validation”The file is checked at boot, so a mistake stops the server with a reason instead of surfacing at the first connect:
- Invalid JSON stops it with
JSON config load has failed:and the parser’s error. - A framework key with the wrong type, such as
"port": "27015"ornull, stops it withJSON config could not be applied: … type must be number, but is string. That message names the type, not the key, so compare each value against the table above. - A
modkey with the wrong type stops it with a message that names the key, such as'mod.autoRespawn' must be a …. - An unknown
modkey is kept, with a warning that the build does not understand it. A config written for a newer release still loads on an older one. - Unknown top-level keys are ignored, so documentation keys such as
"_comment"are harmless.
The server also rejects a port outside 1–65535, a download-url that does not start with http:// or https://, a maxplayers of zero or less, and a password over 255 bytes.
Command-line flags
Section titled “Command-line flags”Flags override the matching server.json keys for that run. A flag you do not pass never overrides the file.
| Flag | Overrides | Purpose |
|---|---|---|
-h, --host |
host |
Bind address |
-p, --port |
port |
Game port (UDP and TCP) |
-t, --server-token |
server-token |
Masterlist key |
--password |
password |
Join password |
--package-secret |
package-secret |
Secret the resource package key is derived from |
--download-url |
download-url |
Web address players download resources from first |
-c, --config |
Read a different configuration file instead of server.json |
|
--help |
Print the flags and exit |
For example, to run a second server from another directory on another port:
./ArcaneMPServer --port 28015maxplayers, map and the mod keys have no flags; set them in the file. Game panels use flags to inject the port and token they manage. That is why the Pterodactyl egg overrides whatever server.json says for those keys.
On a shared machine, other users can read a process’s command line. Prefer
server.jsonforserver-tokenandpasswordthere, and keep that file readable only by the server’s account.
Passwords
Section titled “Passwords”Set password (or pass --password) to make players enter it before they are admitted. Players type it into the Password field on the Play screen, next to the address. You can also send it in a arcanemp:// join link as ?password=….
Keep it to 64 plain ASCII characters or fewer, with no spaces at either end. The server accepts up to 255 bytes, but the Play screen trims spaces from both ends and sends at most 64 bytes. A password that breaks either rule can never be typed correctly.
The server reports that a password is required to the masterlist and in its information API. It never reports the password itself.
Required CurseForge mods
Section titled “Required CurseForge mods”mod.curseforge.mods lists CurseForge projects every client must activate before entering your server. The list is sent during the connection handshake, and supported clients set up that server’s mod set before the world loads.
The list starts empty, and it should stay empty until you have chosen and tested a mod. An accidental entry affects every player who connects. To require one, add its numeric project ID as a string:
"mod": { "curseforge": { "mods": ["YOUR_CURSEFORGE_PROJECT_ID"] }}That is a fragment of server.json, not a complete file, and the placeholder has to be replaced. Several projects are separate strings in the same array. Do not use a URL, project name, slug or file ID, or an ID copied from another server without knowing what it installs. Set the array back to [] to require nothing.
What a join does
Section titled “What a join does”Every join checks the required mods with CurseForge. The player’s game installs the ones it is missing and updates the rest to each project’s latest file. You cannot pin a version: a file an author publishes reaches your players at their next join. The join screen shows how much has downloaded and how fast, both for your resources’ files and for the mods.
The game only changes its mods when it starts. When a join installs a mod, replaces an outdated copy or turns off a mod your server does not require, the game restarts and joins your server again by itself. Turned-off mods stay installed. While your server requires mods, any mod a player copied into the game’s Phoenix/Mods folder by hand is moved to Phoenix/ArcaneMP-ParkedMods beside it. A server that requires none leaves those mods in place.
Rejected joins
Section titled “Rejected joins”A required mod that cannot be checked, installed or updated turns the player away before the world loads. The message lists the failed mods first, each with its cause, and shows only its first few lines. The player’s client log holds every line.
| Cause | What helps |
|---|---|
| CurseForge did not answer within a minute | Try again later. |
| No download progress for a minute | Check the player’s connection, and try again. |
| Not enough disk space | Free space on the drive that holds the folder the message names. |
| The game cannot use its mods folder | Windows Controlled Folder Access or antivirus folder protection may be blocking ArcaneMPLauncher.exe, so allow it there. If Documents is on OneDrive, OneDrive must be running. |
| CurseForge lists the project as deleted, rejected, under review or needing changes | The game does not install such a project, so a player who does not have it yet cannot join. Remove it from the list. Inactive and abandoned projects still install. |
| The game could not remove or move a mod folder when it started | Quit the game, close whatever holds the folder or move it out of Phoenix/Mods by hand, and start again. |
An install that is broken, or whose last attempt failed, is installed again at the next join, so players do not need to reinstall a mod by hand.
Respawning
Section titled “Respawning”With mod.autoRespawn at its default of true, a dead player stands back up on their own a few seconds after dying. Set it to false and a dead player stays where they fell, still watching the world, until a script respawns them with player.respawn(). Game modes with revives, spectating or round-based play use this.
Scripts can override it for one player with player.setAutoRespawn(on). Passing null restores the server.json value. See the Server API reference.
Serve downloads from a CDN
Section titled “Serve downloads from a CDN”Players normally download your resources from your server on its game port, over TCP. If your server’s upload speed holds joins back, set download-url so players try another web address first, such as a CDN or your own web server. This build takes one address.
{ "download-url": "https://cdn.example.com/my-server"}-
Set
download-urlinserver.json, or pass--download-urlwhen you start the server. The address must start withhttp://orhttps://. -
Start the server. The log names the files to upload and the folder they are in, normally
.packages/:Clients download from https://cdn.example.com/my-server first; mirror these files from '<folder>' there: <file names> -
Upload each named file directly under the address, for example
https://cdn.example.com/my-server/<file name>. Upload only these files, not the whole.packages/folder. -
After you change a resource or the package key, upload the new files as well. Players get anything you have not uploaded yet from your server.
Players send no login or token to this address, so anyone who has a file’s address can download it, even if your server has a password. The host should also support range requests. Without them, a download that gets cut off starts that file again instead of resuming.
The game checks each file’s SHA-256 hash before using it. If the address fails or serves the wrong file, the game gets that file from your server instead, so keep the game port reachable over TCP.
Information API
Section titled “Information API”The server answers GET / over TCP on the game port with a JSON summary: mod_name, mod_slug, mod_version, framework_version, host, port, password_required, max_players and mod_config. It is handy for a quick health check from the host itself:
curl http://127.0.0.1:27015/The masterlist does not read it: the server announces itself. It shares the game port’s TCP side with resource downloads, which players need in order to join, so it cannot be firewalled or bound separately.
Changing ports
Section titled “Changing ports”Moving the game port means changing three things together: port (or --port), the firewall or router rules for UDP and TCP, and any container port mappings. Then tell players the new port, because the client assumes 27015 unless the address carries :port. When you run several servers on one machine, give each its own directory and its own port, and open that port over both UDP and TCP.