Hosting Guides

Automating Factorio Headless Updates via LinuxGSM

8 min readUbuntu 24.04LinuxGSMCustom
Once your server is online, jump to the Factorio command and config reference.

Factorio is the sysadmin's game, and it deserves a sysadmin's deployment. Wube ships the headless server outside of Steam, which means LinuxGSM's fctrserver wrapper has to fetch tarballs directly from the official update mirror. This guide stands up the server on Ubuntu 24.04, automates pulls of the latest experimental build, manages server-settings.json for matchmaking visibility, and tunes UPS for megabase scale factories.

Prerequisites

  • Ubuntu 24.04 LTS with at least 8 GB RAM and a fast modern CPU. Single thread performance matters more than core count.
  • A non root user with sudo access.
  • UDP 34197 open at the firewall.
  • A factorio.com account for matchmaking authentication tokens.

Step 1: Install LinuxGSM and the Server

user@host
sudo adduser --disabled-password --gecos "" fctr
sudo machinectl shell fctr@
cd ~
wget -O linuxgsm.sh https://linuxgsm.sh
chmod +x linuxgsm.sh
bash linuxgsm.sh fctrserver
./fctrserver install

Step 2: Switch to the Experimental Branch

LinuxGSM defaults to the stable channel. To follow experimental, set branch in the per instance config.

~/lgsm/config-lgsm/fctrserver/fctrserver.cfg
# Track the latest experimental build
branch="latest"
# (use "stable" for the stable channel)
# Optional Discord notifier
discordalert="on"
discordwebhook="https://discord.com/api/webhooks/REPLACE/ME"
user@host
./fctrserver update

Step 3: Server Settings

~/serverfiles/data/server-settings.json
{
"name": "Megabase Sandbox",
"description": "Long running headless world, biters disabled",
"tags": ["sandbox","peaceful","experimental"],
"max_players": 16,
"visibility": { "public": false, "lan": true },
"username": "your-factorio-account",
"token": "REPLACE_WITH_FACTORIO_TOKEN",
"game_password": "REPLACE_LONG_PASSWORD",
"require_user_verification": true,
"max_upload_in_kilobytes_per_second": 0,
"max_upload_slots": 5,
"minimum_latency_in_ticks": 0,
"ignore_player_limit_for_returning_players": true,
"allow_commands": "admins-only",
"autosave_interval": 5,
"autosave_slots": 10,
"afk_autokick_interval": 0,
"auto_pause": true,
"only_admins_can_pause_the_game": true
}

Step 4: Automate Updates

LinuxGSM exposes a one shot update command. Schedule it daily with a pre check that only restarts if a new build is actually staged.

user@host
crontab -e
# Daily check for a new experimental headless build at 06:00
0 6 * * * /home/fctr/fctrserver update-lgsm > /dev/null 2>&1
15 6 * * * /home/fctr/fctrserver update

Step 5: Generate the World

user@host
./fctrserver generate-map
# Then start it
./fctrserver start

Performance and Tuning

  • Pin auto_pause: true for sandbox servers. UPS is wasted when no one is logged in.
  • Disable biters in the world generator for true megabases. Once you exceed 100k entities, biter pathing dominates the tick budget.
  • Use autosave_interval: 5 minutes. The pause during a save scales with world size, so frequent small saves are cheaper than rare huge ones.
  • For LAN parties, raise max_upload_slots; for public servers, leave it at 5.

Conclusion

Factorio's headless server is famously stable, and LinuxGSM makes it trivial to follow the experimental branch without manually downloading tarballs. Schedule the update job, version server-settings.json, and the factory really does just keep running.