
Host a server
The server is a single program for Windows. It needs the .NET 10 runtime (x64) and the scripting folder next to the executable.
Start
- 1Run netmp-server.exe. A server.toml is created on first start; an older server.cfg is converted.
- 2For players on the internet, open port 6390/UDP in your router and firewall.
- 3Restart the server after changing the configuration.
server.toml
The keys follow the alt:V server configuration. As in alt:V, resources decide where players spawn, which model and weapons they get and when they respawn. The default port is 6390.
name = "My netMP server"
logo = "branding/logo.png"
banner = "branding/banner.jpg"
description = "Los Santos Roleplay"
port = 6390
players = 32
# password = "secret"
streamingDistance = 400
modules = ["js-module", "csharp-module"]
resources = ["freeroam", "chat"]
[voice]
range = 25
Logo and banner paths are relative to server.toml. Use PNG or JPEG up to 4096 × 4096 pixels. Logos can be up to 512 KiB and banners up to 2 MiB. Restart the server to display the logo in the list. Selecting a server loads its banner and description (up to 2048 UTF-8 bytes) over the game port.
| Key | Meaning |
|---|---|
| name, host, port, players | Server name, bind address, UDP port and player limit |
| password | Players type it in the launcher |
| announce, directory | Register with a server directory |
| streamingDistance | Metres, 400 by default; 0 sends everything in the dimension |
| connectionQueue | A script accepts or declines every connection |
| modules, resources | Languages and resources; folder/* loads all of a folder |
| [voice] | Enables voice chat; range in metres |
| logStreams, logsToKeep | Console and file logging |
Not supported, and reported at startup: master list token, CDN, early auth, DLC whitelist, resource name hashing, pools, profiler, threads, anti-cheat, module options and external voice servers.
Resources
resource.toml uses type, main, client-type, client-main, client-files and deps. Server code is C#, client code JavaScript. Two examples ship with the server: freeroam and chat.
type = "csharp"
main = "server/Hello.dll"
client-type = "js"
client-main = "client/index.js"
Security
- A password keeps strangers out, but there are no player accounts: names are not verified.
- Treat every client event as untrusted input and validate it on the server.
- Never place secrets in a resource client folder. Every player receives those files.