Skip to content
FMFallout Multiplayer Scripting APIScripting guides and API
GuideMaintainer authored

Install and run a server

Go from nothing to standing in your own local FMP server running the default gamemode, then change it and reload.

This page takes you from an empty machine to a local server running the default gamemode, with you standing in it. It takes about ten minutes the first time.

What Why Needed to
Fallout 4 on Steam The client runs inside the game, and the launcher asks Steam where it is installed Join a server
An FMP release The launcher, the client and the dedicated server for Windows and Linux Run anything
Node.js 22 or newer, with npm Installs dependencies and runs the TypeScript compiler Build the default gamemode, or any TypeScript resource
An editor Visual Studio Code autocompletes the whole API in a TypeScript resource Writing code

A release is one archive. Unpack it anywhere, not inside the game folder:

FMP/
client/ FMPLauncher.exe, FMPClient.dll and the updater
server/ FMPServer.exe for Windows, with its own fmp-resources/
server-linux/ FMPServer for Linux, with its own fmp-resources/
fmp-resources/ the default gamemode on its own, to edit or upload
README.txt

Each server folder reads resources from the fmp-resources/ folder next to its binary. The top-level fmp-resources/ is a spare copy for hosting elsewhere; this guide uses the one inside server/.

  1. Install Node.js 22 or newer. The LTS installer is fine.
  2. Open a new terminal. node --version should print v22 or later, and npm --version should print a version number.

A release ships the gamemode as TypeScript source, so you can read it and change it. Until you build it, the server starts but answers no commands.

In server/fmp-resources/fmp-gamemode/
npm ci
npm run build

npm ci installs the locked compiler and the API declarations, @falloutmp/types at your release’s version. npm run build compiles src/server/ into dist/server/index.js, which is what the server runs.

The mafiahub block in package.json tells the server which files to run and which to send to players. Structure a larger resource takes it apart.

From the server/ folder:

Windows
.\FMPServer.exe
Linux (from server-linux/)
./FMPServer

The first start writes a server.json next to the binary with every setting and its default, so you can see what is configurable without reading any source. The server listens on UDP 27015 for the game and TCP 27016 for its HTTP API; a server on your own machine needs nothing opened.

server.json
{
"host": "0.0.0.0",
"port": 27015,
"apiport": 27016,
"maxplayers": 32,
"password": "",
"mod": {
"game_data_path": ""
}
}

A public image is published with every release, so you can host without a Windows machine:

Terminal window
docker run -d --name fmp \
-p 27015:27015/udp -p 27016:27016/tcp \
-v fmp-data:/home/container \
ghcr.io/fallout-mp/fmp-server:latest

Everything persistent lives in /home/container: server.json, fmp-resources/ and logs/. The first start seeds the default gamemode and never touches it again, so an edited or deleted gamemode stays that way. It still ships as TypeScript, so build it where it runs:

Terminal window
docker exec -w /home/container/fmp-resources/fmp-gamemode fmp sh -c 'npm ci && npm run build'

Ports come from the command line in the image, not the environment: pass --port and --apiport to override 27015 and 27016.

  1. Start Steam, with Fallout 4 installed.
  2. Run client/FMPLauncher.exe.

On the first run the launcher writes FMP_launcher.json next to itself with the resolved game path. Delete that file to have the game detected again. Logs are written to logs/ next to the launcher.

Open chat and type one of the default gamemode’s commands:

Type What happens
/tp Lists the named places, from Sanctuary to the Glowing Sea
/tp sanctuary Teleports you to that map marker
/give 1F66A 5 Gives you five of a form ID
/pa Puts you into a power armor frame
/time 21 Moves the shared clock to nine in the evening, for everyone
/weather default Clears a forced weather
/mines Lists every armed mine, with its owner and radius

Every one of them is plain TypeScript in src/server/commands.ts. Nothing is hard-coded in the server.

  1. Keep the compiler watching your changes:

    In server/fmp-resources/fmp-gamemode/
    npm run watch
  2. Edit src/server/index.ts, for example the welcome line in the playerReady handler.

  3. In the server console (the server’s own window, not game chat), reload the resource:

    Server console
    ensure fmp-gamemode

ensure starts a resource, or reloads it in place if it is already running, without dropping anyone who is connected. The compiler and ensure are separate steps: recompile first, then reload.

Command What it does
help Lists every command, with its options
status Server name, address, and players connected out of the maximum
ensure <resource> Start a resource, or reload it if it is running
start <resource> / stop <resource> Start or stop one resource
restart <resource> Reload a running resource’s code
refresh Re-scan the resources directory for new or changed manifests
refreshall Re-scan and reload every running resource
quit, or stop with no argument Stop the server

Anything the console does not recognise reaches your scripts as the consoleCommand event, so a resource can add operator-only commands of its own.

error TS2304: Cannot find name 'Player', and hundreds like it

The compiler cannot find the declarations. Run npm ci in the gamemode folder first, then build again.

The build fails on a few specific methods

Your declarations and your release are different versions. Check that @falloutmp/types in the gamemode’s package.json is your release’s version, then run npm ci again.

The server starts, but commands do nothing

With no compiled gamemode, nothing listens for commands, so /tp is silently ignored. Check that fmp-resources/fmp-gamemode/dist/server/index.js exists, and look for an fmp-gamemode line in the server log near startup: a missing file or a script error is reported there.

The launcher cannot find the game

Start Steam before the launcher, which asks Steam where Fallout 4 is installed. If the game moved, delete FMP_launcher.json next to the launcher and it will resolve the path again.