Skip to main content

Creating and updating servers

Create a server​

nwm server create <name> [flags]

nwm prepares SteamCMD, installs the nanos world dedicated server (Steam app 1936830) and registers the server. Names may contain letters, digits, - and _.

FlagEffect
-d, --dir <path>Install into this folder instead of ~/.nwm/servers/<name>
-b, --branch <branch>public (default) or bleeding-edge
--port <port>, --query-port <port>Set discover.port and discover.query_port
--display-name <name>Set discover.name, the name in the server list
--max-players <n>Set general.max_players
--game-mode <package>, --map <package>Set game.game_mode and game.map
--nanossharpInstall NanosSharp afterwards
-r, --recipe <source>Set the server up from a recipe
--forceInstall into a folder that is not empty

When --recipe is given, the recipe's Steam branch is used unless you pass --branch, and the recipe flags --var, --secret, --no-services, --no-hooks, --yes and --refresh are available. See Applying recipes.

nwm server create dev
nwm server create staging --branch bleeding-edge --port 7787 --nanossharp
nwm server create rp --recipe @dasdarki/roleplay --var port=7790

Import an existing installation​

Already have a server folder? Register it without reinstalling:

nwm server import <name> <directory> [--branch public]

nwm checks that the folder contains NanosWorldServer.sh (Linux) or NanosWorldServer.exe (Windows).

Update a server​

nwm server update [name] [flags]

Runs SteamCMD again and installs the newest build of the server's branch. The server has to be stopped.

FlagEffect
-b, --branch <branch>Switch to public or bleeding-edge and remember the choice
--no-validateSkip SteamCMD's file validation (faster)

If NanosSharp is installed, nwm reminds you to run nwm nanossharp update in case the server version changed.

List and inspect servers​

nwm server list
nwm server info [name]

list shows every server with its state (🟢 running with process id, or ⚫ stopped), branch, whether NanosSharp is installed and its folder. info adds the display name, ports, game mode, map, the number of installed packages and asset packs and the log file.

Remove a server​

nwm server remove <name> [--delete-files]

Unregisters the server and removes its service containers. With --delete-files nwm also deletes the server folder, the service volumes and the server's secrets. Without it the files stay where they are.