Setup assistant
The first time the server starts, it runs its setup assistant in the console. It asks for your server's ID and token, finds its public address, opens the port on your router, tests the port from the internet and offers to install the server as a service. It then writes Config/server-config.yaml and starts the server.
The assistant also runs when ServerId, ServerToken or PublicAddress is empty in the file.
The steps
- Server ID and token. Copy them from My servers on app.nodeworldvr.com (register the server) and paste them. The token does not show while you paste it. The server checks both with NodeWorld; if NodeWorld refuses them, it asks again.
- Public address. NodeWorld tells the server which address it sees it coming from, and the assistant offers it: press
Enterto keep it, or type a domain name that points to your machine (better if your IP address changes). - Port on the router. The assistant asks your internet box to forward the port (
25252, UDP and TCP) to this machine, with UPnP. If the box refuses or has UPnP turned off, forward the port yourself (ports and firewall). A machine that has the public address itself, like a rented server, has no router: the step is skipped. - Port test. NodeWorld tries to reach the port from the internet, in UDP and in TCP, and the assistant shows the result. If the port is not reachable, it lists what to check.
- Service. The assistant offers to install the server as a service: it then starts with the computer, restarts after each update, and keeps running when you close the console (run as a service).
At the end, the assistant writes the values into server-config.yaml and starts the server, or leaves it to the service.
A question that ends with [Y/n] takes y or n; Enter gives the capital letter. Ctrl+C quits without writing anything.
Run it again
To change the ID, the token, the address or the port, stop the server, then:
./NodeWorld.Server --setupOn Windows: .\NodeWorld.Server.exe --setup. The current values show between brackets: Enter keeps them.
Skip or force a step
Each step has a setting in the Setup part of server-config.yaml, and a launch option of the same name. The option wins over the file.
| Step | In the file | Launch option |
|---|---|---|
| Check the ID and token | VerifyCredentials | --verify-credentials |
| Detect the public address | DetectAddress | --detect-address |
| Open the port on the router (UPnP) | OpenPort | --open-port |
| Test the port from the internet | TestPort | --test-port |
| Install as a service | InstallService | --install-service |
Each takes one of three values:
Ask(optionask): asked in the console. Without a console, the step is done, except the service, which is never installed unless you say so; and an ID or token NodeWorld refuses stops the setup.Yes(optionyes): done without asking, and the setup goes on whatever the result: an ID and token kept even if NodeWorld refuses them, the router asked again at each start even if it refused.No(optionno): skipped.
Setup:
VerifyCredentials: Ask
DetectAddress: Ask
OpenPort: Ask
TestPort: Ask
InstallService: AskWithout a console
A script, a remote shell or the start-up of a cloud machine gives everything as options:
./NodeWorld.Server --non-interactive \
--server-id 0b5e9f3a-1c2d-4e5f-8a9b-0c1d2e3f4a5b \
--server-token "paste the token here" \
--install-service yes| Option | What it does |
|---|---|
--setup | Runs the assistant even when the file is complete. |
--non-interactive | Asks nothing. The server also asks nothing when its input is not a console. |
--server-id <id> | Sets ServerId. |
--server-token <token> | Sets ServerToken. Other users of the machine can see the options of a running program: on a shared machine, paste the token in the console or the file instead. |
--public-address <address> | Sets PublicAddress, without detection. |
--port <port> | Sets GamePort, and PublicPort too unless --public-port is given. |
--public-port <port> | Sets PublicPort: the outside port your router forwards to GamePort. |
Without a console, a missing ID or token, or one NodeWorld refuses, stops the server with SETUP REQUIRED and exit code 2.
