---
title: "How to host a Factorio server on a Linux VPS | StreetHosting"
description: "Run a Factorio headless server on a Linux VPS: requirements by base size, server settings, mods and Space Age, UDP port 34197, systemd and save backups."
url: "https://streethosting.com.br/en/guides/vps/host-factorio-server"
type: "page"
language: "en-US"
---

VPS · 9 min · Intermediate

Published on Sep 28, 2026 · Updated on Sep 28, 2026

# Factorio headless server on Linux, with mods and protected saves

The Factorio headless server is free, runs natively on Linux and fits on a small VPS while the base is modest. Here is how to install it, configure it, handle mods and Space Age and keep the factory saved.

By [Equipe StreetHosting](https://streethosting.com.br/en/autores#equipe-streethosting) · StreetHosting infrastructure and support team

[Linux administration](https://streethosting.com.br/en/guides/topics/linux) [Mods and modpacks](https://streethosting.com.br/en/guides/topics/mods) [Other games](https://streethosting.com.br/en/guides/topics/other-games)

Summarize with:

[](https://chat.openai.com/?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Fhost-factorio-server.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "ChatGPT") [](https://claude.ai/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Fhost-factorio-server.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Claude") [](https://www.google.com/search?udm=50&aep=11&q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Fhost-factorio-server.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Google AI Mode") [](https://x.com/i/grok?text=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Fhost-factorio-server.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Grok") [](https://www.perplexity.ai/search/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Fhost-factorio-server.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Perplexity")

Share:

[](https://x.com/intent/tweet?text=How%20to%20host%20a%20Factorio%20server%20on%20a%20Linux%20VPS&url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Fhost-factorio-server "Share on X") [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Fhost-factorio-server "Share on Facebook") [](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Fhost-factorio-server "Share on LinkedIn") [](https://wa.me/?text=How%20to%20host%20a%20Factorio%20server%20on%20a%20Linux%20VPS%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Fhost-factorio-server "Share on WhatsApp")

For agents: Copy as Markdown [.md](https://streethosting.com.br/en/guides/vps/host-factorio-server.md)

In this guide 8 sections

* [How much VPS Factorio needs](https://streethosting.com.br/en/guides/vps/host-factorio-server#requisitos)
* [Install the headless server](https://streethosting.com.br/en/guides/vps/host-factorio-server#instalar)
* [Configure the server](https://streethosting.com.br/en/guides/vps/host-factorio-server#configurar)
* [Mods, Space Age and map creation](https://streethosting.com.br/en/guides/vps/host-factorio-server#mods)
* [Port and firewall](https://streethosting.com.br/en/guides/vps/host-factorio-server#portas)
* [systemd service and updates](https://streethosting.com.br/en/guides/vps/host-factorio-server#systemd)
* [Automatic save backups](https://streethosting.com.br/en/guides/vps/host-factorio-server#backup)
* [Which VPS to pick](https://streethosting.com.br/en/guides/vps/host-factorio-server#qual-vps)

Quick answer

To **host a Factorio server**, download the headless build from the official site, create the map, edit the server settings file and run the binary as a systemd service. Open only UDP port 34197 in the firewall. For a small group with an early base, a VPS with 2 GB of RAM and 2 vCPUs is enough; megabases need a high-clock CPU.

## How much VPS Factorio needs[](https://streethosting.com.br/en/guides/vps/host-factorio-server#requisitos)

Factorio has a quirk that changes the math: the simulation is deterministic and every connected computer runs the entire world, in lockstep with the server. The server does not carry the weight of the factory alone; it sets the pace. If it cannot hold the game's 60 updates per second, everything slows down for everyone, and a player with a weak computer can fall behind even when the server has headroom to spare.

| Scenario                            | RAM          | vCPU   | Disk  | Suggested plan                      |
| ----------------------------------- | ------------ | ------ | ----- | ----------------------------------- |
| 2 to 4 players, early base, vanilla | 2 GB         | 2      | 10 GB | Xeon VPS R$ 26.00                   |
| 4 to 10 players, mid-size base      | 4 GB         | 2 to 3 | 20 GB | Xeon VPS R$ 43.00 or Ryzen R$ 66.00 |
| Space Age across several planets    | 4 to 6 GB    | 3      | 40 GB | Ryzen VPS R$ 66.00 to R$ 92.00      |
| Megabase or heavy modpack           | 8 GB or more | 4      | 60 GB | Ryzen VPS R$ 118.00                 |

World updates lean heavily on one main core and on memory speed. That is why, on a large base, a CPU with a high clock and DDR5 memory outperforms many slow cores, as explained in the guide on [single-thread vs multi-thread CPU](https://streethosting.com.br/en/guides/infrastructure/single-thread-vs-multi-thread-cpu). While the base is small, any plan can handle it and it pays to save money. Disk barely matters: saves range from a few MB to a few dozen MB on large bases, multiplied by the autosave slots and your backup.

## Install the headless server[](https://streethosting.com.br/en/guides/vps/host-factorio-server#instalar)

Factorio does not go through Steam on the server: the headless build is a package downloaded straight from the official site, with no GUI and no login. The commands apply to Ubuntu 24.04 and 22.04. Manage the VPS with a user that has sudo, as shown in the guide on [creating a sudo user](https://streethosting.com.br/en/guides/vps/create-sudo-user-linux-vps), and run the game under a separate user.

`sudo apt update sudo apt install wget xz-utils sudo useradd -m -s /bin/bash factorio sudo -iu factorio wget -O factorio_headless.tar.xz https://factorio.com/get-download/stable/headless/linux64 tar -xJf factorio_headless.tar.xz ls ~/factorio`

The package extracts to `~/factorio`, with the binary in bin/x64 and the game data in data. The URL with stable downloads the stable release; swapping it for latest gets the experimental one, useful only if the whole group plays on it too. Server and players must be on exactly the same version.

## Configure the server[](https://streethosting.com.br/en/guides/vps/host-factorio-server#configurar)

The package ships configuration templates in the data folder. Create the working folders and copy the server settings template into a folder of your own, so a game update never overwrites what you changed:

`cd ~/factorio mkdir -p saves config mods cp data/server-settings.example.json config/server-settings.json nano config/server-settings.json`

In `server-settings.json`, set these fields and leave the rest of the template as it is:

`"name": "Factorio Brasil", "description": "Servidor da comunidade", "max_players": 16, "visibility": { "public": false, "lan": false }, "username": "", "token": "", "game_password": "SenhaDoGrupo", "require_user_verification": true, "autosave_interval": 10, "autosave_slots": 5, "auto_pause": true, "only_admins_can_pause_the_game": true`

* **visibility and token:** to show up in the public server list, set public to true and fill in username and token with your factorio.com account details, found on your profile page. For a closed group, leave it false and hand out the IP.
* **game\_password:** the password to join. On a private server, always use one.
* **autosave\_interval and autosave\_slots:** a save every 10 minutes, keeping 5 rotating files.
* **auto\_pause:** pauses the game when nobody is connected. The factory only produces while someone is online, and the CPU gets a rest.

Also create the admin list, which the service in the systemd section loads, in the file `config/server-adminlist.json` with the Factorio usernames in square brackets, for example `["SeuNome"]`. The name is the Factorio account name, not the Steam one, and each player sees theirs in the game's profile menu. With the server up, admins use the chat console, opened with the backtick key:

* `/promote NOME` and `/demote NOME` grant and remove the admin role.
* `/kick NOME` and `/ban NOME` remove troublemakers; the ban is stored on the server.
* `/whitelist add NOME` and `/whitelist enable` restrict entry to a closed list, good for a group of friends.
* `/admins` and `/players` list who is an admin and who is connected.

Confirm the full list with the `/help` command in the game itself, because it changes between versions.

## Mods, Space Age and map creation[](https://streethosting.com.br/en/guides/vps/host-factorio-server#mods)

Mods live in `~/factorio/mods`, each as a zip file, and `mod-list.json` says which ones are enabled. The least laborious path is to build the list in your own game, test it in a local game, and then copy the zips, the `mod-list.json` and the `mod-settings.dat` from your computer's mods folder to the one on the VPS, using whatever transfer program you already use. When someone joins, the game offers to sync their mods with the server's, downloading whatever is missing.

In version 2.0, the Space Age expansion and the two modules that come with it, quality and elevated rails, show up as official mods already included in the headless package. If it is enabled, every player needs to own the expansion. For a game on the base game alone, create `mod-list.json` with all three disabled before generating the map:

`{ "mods": [ { "name": "base", "enabled": true }, { "name": "elevated-rails", "enabled": false }, { "name": "quality", "enabled": false }, { "name": "space-age", "enabled": false } ] }`

There are community reports of headless server versions that enable Space Age even when the mod list says otherwise. After creating the map, check the startup log to see which mods were loaded before inviting the group.

With the mod list settled, generate the world. The map is created with the mods enabled at that moment, and toggling Space Age later requires a new map:

`cd ~/factorio ./bin/x64/factorio --create saves/meumundo.zip`

To choose resources, biters and map size, first copy `map-gen-settings.example.json` from the data folder to config, edit it and add `--map-gen-settings config/map-gen-settings.json` to the create command. If you already have a save made on your computer, skip creation and copy the zip file into the saves folder: the server loads the most recent one.

## Port and firewall[](https://streethosting.com.br/en/guides/vps/host-factorio-server#portas)

| Port                   | Protocol | Purpose                           | Open it?                 |
| ---------------------- | -------- | --------------------------------- | ------------------------ |
| 34197                  | UDP      | Player connections                | Yes                      |
| Port you pick for RCON | TCP      | Remote administration, if enabled | Only for your IP         |
| 22                     | TCP      | SSH to manage the VPS             | Yes, before enabling UFW |

`sudo ufw allow OpenSSH sudo ufw allow 34197/udp sudo ufw enable`

The full rule breakdown, including IP restriction for RCON, is in the guide on [UFW firewall on an Ubuntu VPS](https://streethosting.com.br/en/guides/vps/ufw-firewall-ubuntu-vps). To run a second world on the same VPS, use another port with the `--port` option and open that port too.

If someone cannot join, the cause is usually one of these:

* **Version mismatch:** the game refuses the connection when client and server are not on exactly the same version. Update whichever side fell behind.
* **Missing expansion:** with Space Age enabled, anyone without the expansion cannot join. Settle this with the group before creating the map.
* **Closed port:** check with `sudo ufw status` that the UDP rule shows up. Opening only TCP is the most common mistake.
* **Name not on the list:** with the whitelist on, only players added by the exact Factorio account name get in.

## systemd service and updates[](https://streethosting.com.br/en/guides/vps/host-factorio-server#systemd)

On receiving the interrupt signal, the same one Ctrl+C sends, the server saves the map before exiting. The service below uses that signal and always loads the most recent save in the folder, autosaves included, which avoids losing progress after a crash. Log out of the game user and create `/etc/systemd/system/factorio.service`:

`[Unit] Description=Servidor Factorio After=network-online.target Wants=network-online.target [Service] User=factorio WorkingDirectory=/home/factorio/factorio ExecStart=/home/factorio/factorio/bin/x64/factorio --start-server-load-latest --server-settings /home/factorio/factorio/config/server-settings.json --server-adminlist /home/factorio/factorio/config/server-adminlist.json KillSignal=SIGINT TimeoutStopSec=90 Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target`

`sudo systemctl daemon-reload sudo systemctl enable --now factorio journalctl -u factorio -f`

To update, download the new package and extract it over the installation. The saves, mods and config folders are not part of the package and stay untouched:

`sudo systemctl stop factorio sudo -iu factorio wget -O factorio_headless.tar.xz https://factorio.com/get-download/stable/headless/linux64 tar -xJf factorio_headless.tar.xz exit sudo systemctl start factorio`

A save opened in a newer version does not go back to the older one. Before a major update, make a manual copy of the save and check that every mod already has a compatible version.

## Automatic save backups[](https://streethosting.com.br/en/guides/vps/host-factorio-server#backup)

The autosave slots only cover the last few minutes of play. For days of history, as the factorio user, create the script `/home/factorio/backup.sh`:

`#!/bin/bash DESTINO=/home/factorio/backups mkdir -p "$DESTINO" tar -czf "$DESTINO/factorio-$(date +%F-%H%M).tar.gz" -C /home/factorio/factorio saves config mods/mod-list.json find "$DESTINO" -name 'factorio-*.tar.gz' -mtime +14 -delete`

1. Permission: `chmod +x ~/backup.sh`
2. Scheduler: `crontab -e`
3. Every three hours: `0 */3 * * * /home/factorio/backup.sh`

Factorio saves are compact, so two weeks of history take little space. If your mod list is large, keep a copy of the entire mods folder whenever the list changes. To move the copies off the VPS, use the guide on [automated backups with restic and cron](https://streethosting.com.br/en/guides/vps/vps-backup-restic-cron).

## Which VPS to pick for Factorio[](https://streethosting.com.br/en/guides/vps/host-factorio-server#qual-vps)

Factorio is the case where the right plan changes with the stage of the game. Early on, the server barely works, and the [Xeon VPS](https://streethosting.com.br/en/vps/xeon) at R$ 26.00 per month, with 2 vCPUs, 2 GB and 20 GB NVMe, gets it done. The R$ 43.00 tier, with 3 vCPUs and 4 GB, leaves room for a mid-size base and a Discord bot on the side.

When the base grows, with trains across the whole map, thousands of machines or several planets in Space Age, what holds the 60 updates per second is clock speed. That is when it pays to move to the [Ryzen 9 9950X VPS](https://streethosting.com.br/en/vps/ryzen), with up to 5.7 GHz and DDR5: R$ 66.00 with 2 vCPUs and 4 GB, R$ 92.00 with 3 vCPUs and 6 GB, or R$ 118.00 with 4 vCPUs and 8 GB for megabases and heavy modpacks.

Everything sits in São Paulo, with Anti-DDoS included and activation within 60 seconds, and upgrading through the control panel charges only the prorated difference for the cycle. Compare the lines in the [VPS hub](https://streethosting.com.br/en/vps). If your community also plays Satisfactory, the [Satisfactory server](https://streethosting.com.br/en/guides/vps/host-satisfactory-server) guide shows how much more the 3D factory asks for, and for something even lighter, see the one on the [Terraria server](https://streethosting.com.br/en/guides/vps/host-terraria-server).

In this guide

* [How much VPS Factorio needs](https://streethosting.com.br/en/guides/vps/host-factorio-server#requisitos)
* [Install the headless server](https://streethosting.com.br/en/guides/vps/host-factorio-server#instalar)
* [Configure the server](https://streethosting.com.br/en/guides/vps/host-factorio-server#configurar)
* [Mods, Space Age and map creation](https://streethosting.com.br/en/guides/vps/host-factorio-server#mods)
* [Port and firewall](https://streethosting.com.br/en/guides/vps/host-factorio-server#portas)
* [systemd service and updates](https://streethosting.com.br/en/guides/vps/host-factorio-server#systemd)
* [Automatic save backups](https://streethosting.com.br/en/guides/vps/host-factorio-server#backup)
* [Which VPS to pick](https://streethosting.com.br/en/guides/vps/host-factorio-server#qual-vps)

## Frequently asked questions

Is the Factorio dedicated server paid?

No. The headless build, made for servers, is a free download from the official Factorio site, no login needed. Players who will connect need to own the game, plus the Space Age expansion if it is enabled on the server.

Which port does the Factorio server use?

The server uses port 34197 over UDP. It is the only one players need. If you enable RCON for remote administration, it uses a TCP port you choose and should stay closed to the internet.

How much RAM does a Factorio server need?

Little at first: 2 GB covers a small group with an early base. Mid-size bases and Space Age games across several planets do well between 4 and 6 GB, and megabases or large modpacks call for 8 GB or more. More important than RAM is CPU clock speed.

How do I add mods to a Factorio server?

The simplest way is to build the mod list in your own game and copy the zip files, along with the enabled mod list and the mod settings file, into the server's mods folder. On joining, each player gets the option to sync their mods with the server's.

Why does the game slow down for everyone when the base grows?

Factorio uses deterministic simulation: every connected computer runs the entire world, synchronized with the server. If the server cannot hold 60 updates per second, the game slows down for everyone, and a player with a weak computer can fall behind too.

Next step

See VPS plans

Root VPS in Brazil with NVMe and Anti-DDoS.

[See VPS plans](https://streethosting.com.br/en/vps)

[See Ryzen VPS Ryzen 9 9950X VPS in São Paulo with root access, NVMe and gamer Anti-DDoS.](https://streethosting.com.br/en/vps/ryzen) [See Xeon VPS Xeon VPS for steady workloads, automation and long-running projects.](https://streethosting.com.br/en/vps/xeon)

## Related guides

[VPS Intermediate How to host a Satisfactory dedicated server on a Linux VPS With a dedicated server, the group's factory stays available even when the host is offline. See how much hardware each stage of the game needs, how to install on Linux, claim the server and protect your saves. 9 min Read guide](https://streethosting.com.br/en/guides/vps/host-satisfactory-server) [VPS Beginner How to host a Terraria server on a Linux VPS Terraria is one of the lightest game servers around and runs fine even on the smallest VPS. Learn how to install the official server, configure the world, open the right port and decide when it is worth moving to TShock. 10 min Read guide](https://streethosting.com.br/en/guides/vps/host-terraria-server) [VPS Beginner UFW on Ubuntu VPS: firewall rules without losing SSH UFW makes the Ubuntu firewall simpler, but one rule in the wrong order locks you out of your VPS. Learn how to enable it without losing SSH, open only what you need, deal with Docker, and get back in through the console if something goes wrong. 10 min Read guide](https://streethosting.com.br/en/guides/vps/ufw-firewall-ubuntu-vps)

[← Back to the Guide Center](https://streethosting.com.br/en/guides)
