Factorio Field guide

Running Custom Scenarios on a Factorio Headless Server: Scenario Loading, Save Creation, and Progress Persistence

Running custom multiplayer scenarios on a Factorio headless server: deploying to scenarios/, compiling a persistent world via --create-save, and launching daemon instances without progress resets.

Running Custom Scenarios on a Factorio Headless Server: Scenario Loading, Save Creation, and Progress Persistence

Dedicated Factorio headless servers typically launch standard infinite procedural maps. However, hosting competitive tournaments, team-versus-team matches (PvP, Team Production), wave defense survival gauntlets, or community challenge maps requires loading structured Scenarios.

In this practical guide, we examine the internal structure of Factorio scenarios, avoid the progress-loss pitfall of raw --start-server-load-scenario execution, and initialize scenarios into persistent, auto-saving game archives.

How Factorio Scenarios Differ from Standard Save Files#

A routine Factorio world is stored as a single compressed ZIP archive inside saves/, encapsulating factory entities, research trees, and player inventories.

A scenario, by contrast, is a template directory or package placed inside scenarios/. It contains:

  • control.lua — custom game mode logic (win conditions, enemy wave timers, custom GUIs).
  • description.json — metadata and localized scenario information.
  • blueprint.dat or map.dat — predefined spatial layouts and starting assets.

The critical trap: launching a headless instance with --start-server-load-scenario <ScenarioName> resets the world to tick zero every time the service restarts. For persistent multiplayer play, the scenario must be converted into a persistent save file before hosting.

Deploying Scenario Files into the Server Directory#

Create a scenarios directory inside the Factorio installation root and stage your scenario package:

bash
mkdir -p /opt/factorio/scenarios
ls -la /opt/factorio/scenarios/

Confirm that the scenario folder (such as /opt/factorio/scenarios/wave-defense/) contains valid control.lua and data files. Enforce proper file ownership:

bash
sudo chown -R factorio:factorio /opt/factorio/scenarios

Initializing Persistent Game Saves via --create-save#

To transform the static scenario template into a persistent world supporting automated saving, generate an initial save archive using the --create-save flag under the factorio user:

bash
sudo -u factorio /opt/factorio/bin/x64/factorio \
  --create-save "saves/wave_defense_active.zip" \
  --load-scenario "wave-defense"

The binary compiles control.lua rules, generates the starting layout, and packages a ready-to-run world at saves/wave_defense_active.zip.

Launching the Service and Verifying Scenario Execution#

Configure your server service or launch script to target the newly initialized save file:

bash
sudo -u factorio /opt/factorio/bin/x64/factorio \
  --start-server "saves/wave_defense_active.zip" \
  --server-settings "data/server-settings.json"

Inspect the startup log to verify that the scenario logic executed cleanly:

bash
tail -n 40 /opt/factorio/factorio-current.log | grep -E "Loading map|Script|Hosting"

Log entries confirming Script @__wave-defense__/control.lua loaded verify that the scenario is operational and accepting player connections. All subsequent autosave routines will persist factory expansion directly into wave_defense_active.zip.

If you want to host high-performance Factorio Space Age servers with out-of-the-box scenario support, one-click mod synchronization, and scheduled cloud snapshots, professional Factorio server hosting delivers instant setup on enterprise NVMe hardware.

References#