Skip to content

Starting a Server

Oarcinae edited this page Sep 25, 2024 · 2 revisions

Instructions for starting a server

THIS PAGE IS OUT OF DATE! NEEDS TO BE UPDATED FOR NEW MOD VERSION

STEP 1

Download the zip.

Place it in your Factorio/scenarios/... folder.

It should look something like this (for my windows steam install location):

C:\Users\user\AppData\Roaming\Factorio\scenarios\FactorioScenarioMultiplayerSpawn\control.lua

STEP 2

Rename "example-config.lua" to config.lua. This will make sure that the next time you update, it won't overwrite your own config file.

Go into config.lua and edit the strings to add your own server messages.

Rename the "FactorioScenarioMultiplayerSpawn" folder to something shorter and more convenient (optional).

If you have a previous config file already, you just need to check through for any updates.

STEP 3

OPTION 1 (Client Hosted)

Start a multiplayer game on your client like normal. Using this method will mean you are stuck with the game's map/terrain config options. Railworld is your best option here.

OPTION 2 (Headless)

Generate a new map like in OPTION 1, save the game and use that save file to host. This uses the "--start-server save_file.zip" cmd line option. Example: ./factorio --start-server save_file.zip --server-settings your-server-settings.json

OPTION 3 (Headless - No zip save BS)

Place the scenario code in the game's scenario folder, typically something like "..\Factorio\scenarios\FactorioScenarioMultiplayerSpawn\.."

Start a new game (generates a random map based on the config in your map-gen-settings.json file) from the command line: ./factorio --start-server-load-scenario FactorioScenarioMultiplayerSpawn --map-gen-settings your-map-gen-settings.json --map-settings your-map-settings.json --server-settings my-server-settings.json

If you want to RESUME from this method, use something like this: ./factorio --start-server-load-latest --server-settings my-server-settings.json

This is an example of my bash script that I use to start my game:
#!/bin/bash

settings_files="--server-settings oarc-server-settings.json --server-banlist banlist.json"
admin_list="--server-adminlist server-adminlist.json"
map_gen_settings="--map-gen-settings map-gen-oarc.json"
map_settings="--map-settings map-settings-oarc.json"
log_file="--console-log oarc-server.log"
start_scenario_cmd="--start-server-load-scenario FactorioScenarioMultiplayerSpawn"

/factorio/bin/x64/factorio $start_scenario_cmd $settings_files $log_file $admin_list $map_gen_settings $map_settings