A Factorio server on a VPS: core speed, UPS and map size
Factorio works differently from most online games. The server doesn't command the clients, it keeps them in sync: every computer in the game, the server included, simulates the entire factory, and only the players' actions travel over the network. Two things follow from this, and both affect your choice of VPS right away. The server needs very little memory and bandwidth, but it does need a very fast core. And a powerful server won't help a player with a weak laptop, because that laptop still has to simulate the same factory on its own.
UPS: the one number worth watching
The game is built for 60 world updates per second, and that is what UPS means. As long as the server holds 60, everything runs at normal speed. Once the factory grows and the core can't keep up, game time slows down for everyone: trains move slower, assemblers work slower, and you can see it on the UPS counter in the debug overlay. Factorio simulates the world almost entirely in one thread, so clock speed decides more than the number of cores. Two fast cores beat eight slow ones.
- A normal playthrough with friends. 2 cores at 3.5 GHz or more and 2 GB of memory. A vanilla factory up to the rocket launch holds 60 UPS on a plan like this.
- Big mod packs or a long game. 4 GB of memory, and 6–8 GB for the heaviest packs. Mods add recipes, buildings and entities, and the save grows.
- A megabase producing thousands of items a minute. Look for the highest clock speed in the high-frequency VPS selection. Extra memory won't help here; frequency will.
The server itself with a vanilla map takes a few hundred megabytes of memory, so 2 GB is plenty even with the operating system.
What breaks on a weak server
Besides the general slowdown, there are less obvious problems. On a big map every autosave pauses the game for everyone for a few seconds while the server writes the file to disk. Every new player downloads the whole map on joining, and with a save of tens of megabytes on a slow link that takes a noticeable while. The server doesn't wait for anyone who falls behind: a player with a slow computer lags behind the rest and sees the game in jerks, and after three desyncs the client leaves the game by itself. In that case a bigger plan won't help, because the problem is on the player's side.
Installing the headless server on Linux
There is a separate headless build for servers with no graphics, and it runs on Linux only. You download it as an archive for free from the official factorio.com site; Steam isn't needed. Any Ubuntu VPS or Debian will do. First create a map with ./bin/x64/factorio --create ./saves/world.zip, then start the server: ./bin/x64/factorio --start-server ./saves/world.zip --server-settings ./data/server-settings.json. The server won't start without a save file. You can also bring your own save from your computer: just put the zip file into the saves folder.
The game needs one port, 34197/UDP. TCP isn't used at all, and if you only open TCP nobody will be able to connect. The settings live in server-settings.json, with an example in the data folder. That is where you set the name, password, player count and visibility. For the server to appear in the public list, the file needs the username and token of a factorio.com account. The file is stored in plain text, so don't let strangers near it.
Every player needs the same game version and the same mod set as the server. On connecting, the game offers to download missing mods from the official portal, so you don't have to pass archives around by hand. If the world was created with the Space Age expansion, only owners of the expansion can play on it.
Autosaves and backups
Autosave frequency is set by the autosave_interval parameter in minutes and by autosave_slots, the number of recent copies to keep. On Linux there is also non_blocking_saving: the server saves the world in the background without freezing the game. It is marked as experimental and needs extra memory while saving, so only turn it on if you have headroom. Copy the saves folder off the VPS once a day, and especially before a game update: after big releases old mods often stop working.
Ping and where to put the server
Every player action reaches the others through the server, so high ping feels like a delay between pressing a key and seeing the result. The game partly hides it, but at 150 ms and above building gets noticeably awkward. For a group in Europe, Germany or the Netherlands is the usual choice; for North America, pick a location on the coast where most of you live. If your group mixes European players with friends in Russia or the CIS, Finland sits comfortably between them. You can compare locations on the VPS in Europe and VPS in the USA pages. Attacks on Factorio servers are rare, but for an open public server listed with its address, choose a plan with DDoS protection.