How to setup a factorio server VPS-dedicated server[Headless-Linux]

Factorio logo from

This is the best guide i could find to setup your server:

The default port is:34197

If you need old versions of the server go here:

You have to mkdir saves and mkdir mods if you’ll use them. Otherwise you’ll get errors in the console

If you don’t have a saves zip file, you’ll need to create it otherwise you’ll get something like this:

MultiplayerManager failed: "Opening zip failed: I/O error"

How to generate map:
sudo /opt/factorio/bin/x64/factorio –server-settings /opt/factorio/data/server-settings.json –create YourMapNameHere

It will generate a zip file on /opt/factorio/, just copy it to /opt/factorio/saves after generating the map.

In the guide linked above if you get stdin error just open it manually(instead of service)

Error InterruptibleStdioStream.cpp:53: Reading stdin failed

sudo /opt/factorio/bin/x64/factorio --server-settings /opt/factorio/data/server-settings.json --start-server-load-latest

You can add a screen so it runs on the background(instead of a systemctl service)

screen -S sudo /opt/factorio/bin/x64/factorio --server-settings /opt/factorio/data/server-settings.json --start-server-load-latest

This is the config file i used for a public server without user verification

"name": "Your servername QuartexNetworks",
"description": "Your server description",
"tags": ["game", "tags"],

"_comment_max_players": "Maximum number of players allowed, admins can join even a full server. 0 means unlimited.",
"max_players": 0,

"_comment_visibility": ["public: Game will be published on the official Factorio matching server",
"lan: Game will be broadcast on LAN"],
"public": false,
"lan": true

"_comment_credentials": "Your login credentials. Required for games with visibility public",
"username": "your-username-here",
"password": "",

"_comment_token": "Authentication token. May be used instead of 'password' above.",
"token": "",

"game_password": "",

"_comment_require_user_verification": "When set to true, the server will only allow clients that have a valid account",
"require_user_verification": false,

"_comment_max_upload_in_kilobytes_per_second" : "optional, default value is 0. 0 means unlimited.",
"max_upload_in_kilobytes_per_second": 0,

"_comment_max_upload_slots" : "optional, default value is 5. 0 means unlimited.",
"max_upload_slots": 10,

"_comment_minimum_latency_in_ticks": "optional one tick is 16ms in default speed, default value is 0. 0 means no minimum.",
"minimum_latency_in_ticks": 0,

"_comment_ignore_player_limit_for_returning_players": "Players that played on this map already can join even when the max player limit was reached.",
"ignore_player_limit_for_returning_players": false,

"_comment_allow_commands": "possible values are, true, false and admins-only",
"allow_commands": "admins-only",

"_comment_autosave_interval": "Autosave interval in minutes",
"autosave_interval": 10,

"_comment_autosave_slots": "server autosave slots, it is cycled through when the server autosaves.",
"autosave_slots": 10,

"_comment_afk_autokick_interval": "How many minutes until someone is kicked when doing nothing, 0 for never.",
"afk_autokick_interval": 0,

"_comment_auto_pause": "Whether should the server be paused when no players are present.",
"auto_pause": true,

"only_admins_can_pause_the_game": true,

"_comment_autosave_only_on_server": "Whether autosaves should be saved only on server or also on all connected clients. Default is true.",
"autosave_only_on_server": true,

"_comment_non_blocking_saving": "Highly experimental feature, enable only at your own risk of losing your saves. On UNIX systems, server will fork itself to create an autosave. Autosaving on connected Will",
"non_blocking_saving": false,

"_comment_segment_sizes": "Long network messages are split into segments that are sent over multiple ticks. Their size depends on the number of peers currently connected. Increasing the segment size will...",
"minimum_segment_size": 25,
"minimum_segment_size_peer_count": 20,
"maximum_segment_size": 100,
"maximum_segment_size_peer_count": 10


0 thoughts on “How to setup a factorio server VPS-dedicated server[Headless-Linux]

Leave a Reply