Server configuration

The server reads Config/server-config.yaml, next to the program (or the file given with --config). It creates it the first time it starts, with each setting at its default value (the value the server also uses for a line that is missing), and its setup assistant fills in the ID, the token, the address and the ports. The file is YAML: one Setting: value per line, the worlds as a list. Change it while the server is stopped, then start it again.

yaml
CentralApiBaseUrl: https://api.nodeworldvr.com
ServerId: "0b5e9f3a-1c2d-4e5f-8a9b-0c1d2e3f4a5b"
ServerToken: "paste the token here"

# Game (UDP) and world files (TCP) share this port.
GamePort: 25252
PublicAddress: "play.example.com"
PublicPort: 25252
MaxPlayers: 100
WorldsDataPath: Worlds

Upnp: true
AutoUpdate: true

DefaultRoomGraceSeconds: 120
TickRate: 40
FluxScriptsPath: Scripts
FluxWatchdogSeconds: 10

Setup:
  VerifyCredentials: Ask
  DetectAddress: Ask
  OpenPort: Ask
  TestPort: Ask
  InstallService: Ask

Worlds:
  - WorldId: Tavern
    Capacity: 20
    GraceSeconds: 120
    HomeWorld: false
    MaxInstances: 0

The server

SettingWhat it is
ServerIdThe Server ID from the website (register the server). Required.
ServerTokenThe Server token from the website. Required. Keep it secret: whoever has it can pretend to be your server.
PublicAddressThe address players' games connect to: your public IP address or a domain name pointing to it. Required.
GamePortThe port the server listens on, UDP for the game and TCP for the world files. 25252 by default.
PublicPortThe port players connect to, when your router forwards another outside port to GamePort. Same as GamePort otherwise. 25252 by default.
MaxPlayersPlayers on the whole server at once, 1 to 65535. 100 by default.
CentralApiBaseUrlNodeWorld's central services. Leave https://api.nodeworldvr.com.

Router and updates

SettingWhat it is
Upnptrue: at each start, and every 30 minutes while it runs, the server asks your router to forward PublicPort to GamePort, UDP and TCP, with UPnP (ports and firewall). The setup assistant sets it. false by default.
AutoUpdatetrue: the server installs new versions by itself, when no one is on it (updates). false: it only says in its log that a new version is out. true by default.
SetupHow the setup assistant runs each of its steps: Ask, Yes or No (skip or force a step). Ask for each step by default.

Instances

SettingWhat it is
DefaultRoomGraceSecondsHow long an empty instance stays open before it closes, in seconds, for worlds that do not set GraceSeconds. 0 closes it as soon as the last player leaves. 120 by default.
TickRateLogic ticks per second (instance timers, portal expiry, FL# scripts of the worlds), 1 to 240. Network messages are handled as they arrive, whatever this value. 40 by default.
FluxWatchdogSecondsHow long a world's FL# scripts may run in one call, in seconds (the server's own work during the call does not count), before the server stops that world's scripts: a script stuck in a loop does not hold the instance, which goes on without them. While the scripts start, as the instance opens, the limit is 60 s. 0 turns this watchdog off. 10 by default.

Worlds

SettingWhat it is
WorldsDataPathThe folder of the worlds, relative to this file. Worlds by default, that is Config/Worlds.
WorldsThe worlds the server runs, at least one. See worlds.

Each world of the list:

SettingWhat it is
WorldIdThe world's ID: the name of its folder in WorldsDataPath. Each ID once.
CapacityPlayers in one instance of this world. An instance holds 50 players at most. 20 by default.
GraceSecondsHow long an empty instance of this world stays open, in seconds. Without the line: DefaultRoomGraceSeconds.
HomeWorldtrue: this world can be players' home world on your server (with Allow home hosting on the website). false by default.
MaxInstancesHow many instances of this world may run at once; 0 for no limit. 0 by default.

Scripts of the host

SettingWhat it is
FluxScriptsPathThe folder of your own FL# scripts, rules for your whole server, relative to this file. Scripts by default. Host scripts do not run yet: leave it as it is.

When the file is wrong

When ServerId, ServerToken or PublicAddress is empty, the server runs its setup assistant. For anything else, it stops with SETUP REQUIRED and says what is wrong, for example ServerId is required., PublicAddress is required., At least one world must be configured. or Duplicate world id 'Tavern' in server config. Fix that line and start it again.