bolt Valebyte VPS from $4/mo — NVMe, 60s deploy.

Get a VPS arrow_forward

Factorio Headless Server: Setup, Mods, and UPS Optimization

calendar_month September 05, 2026 schedule 19 min read visibility 15 views
person
Valebyte Team
Factorio Headless Server: Setup, Mods, and UPS Optimization
summarize

TL;DR

  • A Factorio headless server requires at least 2 vCPU, 4 GB RAM, and NVMe disk for stable UPS.
  • Host on a dedicated Linux VPS (Ubuntu 22.04 LTS/Debian 12) for 24/7 uptime & full control.
  • Headless servers on Linux are most efficient, saving resources by not requiring a graphical interface.
  • Dedicated servers ensure stable performance, mod support, and scalability for Factorio megabases.

To set up a Factorio headless server on a VPS for multiplayer with friends, especially for modded games and large factories, you'll need a minimum of 2 vCPU, 4 GB RAM, and an NVMe disk, ensuring stable UPS even in early stages and allowing your factory to scale significantly.

Factorio is not just a game; it's a complex engineering simulation that demands significant computing resources, especially as your factory expands into a megabase with thousands of entities and intricate logistics chains. Running a Factorio multiplayer server on your own VPS or dedicated server from Valebyte.com provides complete control over the environment, allowing you to optimize performance, install any mods, and ensure continuous 24/7 operation, regardless of whether the administrator is online.

In this article, we will detail how to set up a Factorio server on Linux, ensure stable UPS (Updates Per Second) even on the largest factories, manage mods, and perform all necessary operations for the most comfortable gameplay.

Why a Dedicated Server is the Best Choice for Factorio Hosting

Unlike local hosting or public servers, your own VPS or dedicated server offers several critical advantages for Factorio:

  • 24/7 Uptime: The server is always online, allowing players to connect at any time.
  • Stable Performance: Gameplay doesn't depend on the host's local resources, internet connection, or the need to keep a computer running.
  • Full Control: You can install any mods, change any settings, create backups, and manage the server exactly as you wish.
  • Scalability: As your factory grows, you can easily upgrade server resources (CPU, RAM, disk) without needing to migrate the game to a new machine.
  • Low Latency: Valebyte.com servers are located in modern data centers with high-speed connections, minimizing ping for most players.
  • Factorio Optimization: Dedicated resources allow you to configure the operating system and the Factorio server itself for maximum efficiency, which is critical for maintaining high UPS.

Choosing the right server is an investment in the stability and longevity of your factory. We recommend using a dedicated server on Linux, as Factorio is excellently optimized for this OS.

How to Set Up a Factorio Headless Server on Linux: A Step-by-Step Guide

Running a Factorio headless server on Linux is the standard and most efficient practice for dedicated servers. A headless server does not require a graphical interface, consuming fewer resources and ensuring maximum performance for gameplay.

Server Preparation: OS Selection and Dependency Installation

To begin, you will need a VPS or dedicated server with a Linux operating system installed. We recommend using Ubuntu Server 22.04 LTS or Debian 12 due to their stability and broad support. After your first SSH login, execute the following commands to update packages and install necessary dependencies:

sudo apt update
sudo apt upgrade -y
sudo apt install screen wget unzip -y
  • screen: Allows you to run the server in the background and detach from your SSH session without stopping the process.
  • wget: For downloading files from the internet.
  • unzip: For extracting archives.

Create a dedicated user for running the Factorio server to isolate it from system processes and enhance security:

sudo adduser factorio
sudo su - factorio

You are now logged in as the factorio user in their home directory (/home/factorio). All subsequent actions will be performed as this user.

Downloading and Installing the Factorio Server on Linux

Download the latest stable version of the Factorio headless server from the official website. You will need a download token, which you can obtain by logging into your account on factorio.com. Replace YOUR_USERNAME and YOUR_TOKEN with your actual credentials.

wget -O factorio_headless.tar.xz "https://factorio.com/get-download/stable/headless/linux64?username=YOUR_USERNAME&token=YOUR_TOKEN"
tar -xJf factorio_headless.tar.xz

After extraction, you will have a factorio folder in your current directory. You can now create a new world or load an existing one.

Creating a New World and Starting the Factorio Server

To create a new world, use the command:

/home/factorio/factorio/bin/x64/factorio --create /home/factorio/saves/my_server_world.zip

You can add parameters for world generation, for example:

/home/factorio/factorio/bin/x64/factorio --create /home/factorio/saves/my_server_world.zip --map-gen-settings /home/factorio/factorio/data/map-gen-settings.json

To start the server, use screen so it continues to run after you close your SSH session:

screen -S factorio_server
/home/factorio/factorio/bin/x64/factorio --start-server /home/factorio/saves/my_server_world.zip --port 34197 --bind 0.0.0.0
  • -S factorio_server: Creates a new screen session named factorio_server.
  • --start-server: Specifies the path to the world save file.
  • --port 34197: The standard Factorio port. Ensure it's open in your firewall.
  • --bind 0.0.0.0: Allows the server to accept connections from all network interfaces.

To detach from the screen session, press Ctrl+A, then D. To reattach: screen -r factorio_server.

Configuring Lobby, Whitelist, and Autosaves

Factorio server configuration is managed via the server-settings.json file. Create it in the /home/factorio/factorio/data directory or copy it from /home/factorio/factorio/data/server-settings.example.json and edit it.

cp /home/factorio/factorio/data/server-settings.example.json /home/factorio/factorio/data/server-settings.json
nano /home/factorio/factorio/data/server-settings.json

Example settings for server-settings.json:

{
  "name": "Моя Фабрика Valebyte",
  "description": "Сервер Factorio от Valebyte.com",
  "tags": ["Factorio", "Valebyte", "Multiplayer"],
  "max_players": 10,
  "visibility": {
    "public": true,
    "lan": false
  },
  "username": "YOUR_USERNAME",
  "token": "YOUR_TOKEN",
  "game_password": "my_secure_password",
  "require_user_verification": true,
  "allow_commands": "admins-only",
  "autosave_interval": 5,
  "autosave_slots": 5,
  "afk_auto_kick_interval": 3600,
  "whitelist": [],
  "banlist": [],
  "adminlist": ["player_name_1", "player_name_2"]
}
  • name, description, tags: Information about your server.
  • max_players: Maximum number of players.
  • game_password: Password for joining the server.
  • require_user_verification: Recommended true to combat cheaters.
  • autosave_interval and autosave_slots: Configure autosave frequency (in minutes) and number of slots.
  • whitelist: List of players allowed to join. If the list is empty, everyone is allowed. To activate, add player usernames to the array, for example: "whitelist": ["Player1", "Player2"].
  • adminlist: List of server administrators.

After editing the file, restart the server for the changes to take effect.

Looking for a reliable server for your projects?

VPS from $10/month and dedicated servers from $9/month with NVMe, DDoS protection, and 24/7 support.

View offers →

Factorio Mod Server: Synchronization and Updates

Mods are an integral part of Factorio, significantly expanding gameplay. Running a modded server requires them to be installed on both the server and client machines.

Installing Mods on the Server

Factorio mods are typically ZIP archives. You need to upload them to the /home/factorio/factorio/mods directory on the server. The simplest method is to manually download mods from the Factorio Mod Portal (mod.factorio.com) and then transfer them to the server via SFTP (e.g., using WinSCP or FileZilla).

# Пример загрузки мода через wget (если известна прямая ссылка)
cd /home/factorio/factorio/mods
wget https://mods.factorio.com/api/downloads/mod/mod_name/version.zip

# Или вручную загрузить и перенести через SFTP

After uploading the mods, ensure they are activated in the mod-list.json file. This file is located in the world save directory (e.g., /home/factorio/saves/my_server_world/mod-list.json). It is automatically generated the first time the server runs with mods or when a world is created with mods. If the file doesn't exist, create it:

nano /home/factorio/saves/my_server_world/mod-list.json

Example content for mod-list.json:

{
  "mods": [
    {
      "name": "base",
      "enabled": true
    },
    {
      "name": "SpaceExploration",
      "enabled": true
    },
    {
      "name": "Krastorio2",
      "enabled": true
    }
  ]
}

Each mod must have an entry with "name": "MOD_NAME" and "enabled": true. After making changes, restart the server.

Synchronizing Mods Between Server and Clients

When players attempt to connect to a modded server, the Factorio client automatically checks for the presence and versions of mods. If a player is missing required mods or their versions don't match, the client will offer to download them from the Factorio Mod Portal. This significantly simplifies the synchronization process.

Important: All players must use the exact same mod versions as on the server. When a mod is updated on the server, players will also need to update it locally.

Updating the Server and Mods Without Losing Saves

Updating Factorio or its mods requires caution to avoid losing progress. It is always recommended to create a backup of your save before any major changes.

  1. Stop the server: Ctrl+C in the screen session or via the command systemctl stop factorio if you've configured autostart.
  2. Create a backup: Copy the world save file (.zip) and the mods folder.
    cp /home/factorio/saves/my_server_world.zip /home/factorio/saves/my_server_world_backup_$(date +%F_%H-%M).zip
    cp -r /home/factorio/factorio/mods /home/factorio/factorio/mods_backup_$(date +%F_%H-%M)
            
  3. Update Factorio (if required): Download the new headless server version, unpack it into a new folder (e.g., factorio-new), then copy the saves folder and mod-list.json from the old installation. Alternatively, simply delete the old binaries and unpack the new ones into the same folder if you are confident in compatibility.
    # Пример обновления бинарников
    rm -rf /home/factorio/factorio/bin
    # ... загрузить и распаковать новую версию в /home/factorio/factorio/
            
  4. Update mods: Replace the old mod versions with new ones in the /home/factorio/factorio/mods folder.
  5. Start the server: After updating, start the server with the updated save.
    screen -r factorio_server # если сессия была отсоединена
    /home/factorio/factorio/bin/x64/factorio --start-server /home/factorio/saves/my_server_world.zip --port 34197 --bind 0.0.0.0
            

When updating mods, compatibility issues can sometimes arise. In such cases, it's best to first test the new mod versions on a local copy of the world.

Quick pick
Need a dedicated server?
Bare metal with NVMe in 70+ locations — configure and order in minutes.
Browse servers

Factorio UPS Drops: Why it Happens and How to Optimize Performance

UPS (Updates Per Second) is a key performance indicator in Factorio. It shows how many times per second the game processes all internal operations (item movement, production, combat, etc.). The ideal value is 60 UPS. When Factorio UPS drops, the game starts to slow down.

Factorio Architecture and Causes of UPS Drops

Factorio is a highly optimized game, but it has fundamental limitations related to its architecture:

  • Single-Core Performance: Despite some multi-threading optimizations, Factorio's game engine still heavily relies on single-core CPU performance. This means a server with 16 cores at 2.5 GHz might perform worse than a server with 4 cores at 4.0 GHz if those 4 cores have high single-thread performance.
  • CPU Cache: The size and speed of the cache (especially L3) are critically important. A large factory generates an enormous amount of data that must be quickly accessible to the CPU. A good cache minimizes latency when accessing RAM.
  • Memory (RAM): While Factorio doesn't consume excessive RAM in early stages, very large factories can use several tens of gigabytes. Memory speed also plays a role.
  • Disk (SSD/NVMe): Disk speed is crucial for fast world loading and saving. NVMe drives provide significantly better performance compared to traditional SSDs or HDDs.

Primary causes of UPS drops:

  • Belts: Thousands of entities moving on belts require constant collision checks and position updates. Long, overloaded belts are one of the main enemies of UPS.
  • Fluids: Calculating fluid flows in pipes, pumps, and tanks is very resource-intensive. Large oil refineries and nuclear power plants with complex cooling systems can heavily load the CPU.
  • Circuit Network: Complex systems of combinators and wires, especially those constantly recalculating, can significantly reduce UPS.
  • Turrets and Combat: A large number of turrets and active enemies, particularly swarms of biters, also demand significant computation.

Measuring and Diagnosing UPS Issues

Factorio provides built-in tools for performance diagnostics:

/perf-gui

This command in the game console (on the server via RCON or from a connected client's chat) opens the performance GUI. Pay attention to the "Game updates" and "Entity update times" tabs.

Useful commands for analysis:

  • /debug show-active-chunks: Shows active chunks where calculations are occurring. Too many active chunks indicate excessive factory sprawl.
  • /debug show-entity-time-usage: Shows which entity types consume the most CPU time. This helps identify specific bottlenecks (e.g., "belt transport", "fluid system").

Recommendations for Optimizing Your Factorio Factory for High UPS

To maintain stable UPS on large factories, follow these principles:

  1. Minimize Belt Usage: Prefer trains and logistic bots for transporting large volumes of resources over long distances. While bots require computation, they are often more efficient than miles of overloaded belts.
  2. Optimize Fluids: Use short pipes and avoid complex branching. Design systems so that fluids do not sit stagnant in pipes. If possible, use barrels to transport fluids by train.
  3. Simplify Circuit Networks: If combinatorial logic isn't constantly needed, use it only where critically important. Avoid cycles and redundant calculations.
  4. Utilize Productivity Modules: In the late game, productivity modules in assemblers and furnaces significantly reduce the number of buildings required, thereby lowering the load on UPS.
  5. Limit Logistic Network Range: Large logistic networks with thousands of bots require more computation. Divide your factory into logical blocks.
  6. Reduce Enemy Density: If fighting biters severely drops UPS, consider reducing enemy spawn frequency or disabling their expansion in world settings.
  7. Use Blueprints and Standardized Blocks: Uniform, compact, and efficient blocks copied via blueprints are generally more performant than "spaghetti" designs.

Factorio VPS/Dedicated Server Selection by Factory Scale

For 50 concurrent players and a megabase producing thousands of SPM, 4 vCPU, 16 GB RAM, and a 100 GB NVMe disk are sufficient.

Factory Scale / Players vCPU (cores) RAM (GB) Disk Network Port Price (approx., $/month)
Small (1-5 players) / Up to 100 SPM 2 (2.5+ GHz) 4 40 GB NVMe 1 Gbps $10-20
Medium (5-15 players) / Up to 500 SPM 2-4 (3.0+ GHz) 8 80 GB NVMe 1 Gbps $20-40
Large (15-30 players) / Up to 1K SPM 4 (3.5+ GHz) 16 100 GB NVMe 1 Gbps $40-80
Megabase (30-50+ players) / 1K+ SPM 4-6 (4.0+ GHz, high single-thread performance) 16-32 200 GB NVMe 1 Gbps $80-150+

Note: Prices are approximate for Valebyte.com plans at the time of publication (June 2024) and may vary depending on specific configuration and promotions. The key factor for Factorio is not so much the number of cores, but their clock speed and cache size, as well as the disk type (NVMe).

Factorio Server Autostart and Save Backups

To ensure reliable Factorio server operation, it's important to configure it for automatic startup on system boot and regular save backups.

Configuring Autostart with systemd

Create a systemd service file for Factorio. This will allow you to manage the server like a regular Linux service.

sudo nano /etc/systemd/system/factorio.service

Add the following content:

[Unit]
Description=Factorio Server
After=network.target

[Service]
ExecStart=/home/factorio/factorio/bin/x64/factorio --start-server /home/factorio/saves/my_server_world.zip --port 34197 --bind 0.0.0.0 --server-settings /home/factorio/factorio/data/server-settings.json
WorkingDirectory=/home/factorio/factorio
User=factorio
Group=factorio
Restart=always
RestartSec=5s

[Install]
WantedBy=multi-user.target

Save the file and close the editor. Then execute the commands:

sudo systemctl daemon-reload
sudo systemctl enable factorio
sudo systemctl start factorio

Your Factorio server will now automatically start on system boot. You can manage it using these commands:

  • sudo systemctl status factorio: Check the server status.
  • sudo systemctl stop factorio: Stop the server.
  • sudo systemctl restart factorio: Restart the server.
  • sudo journalctl -u factorio -f: View server logs.

Automatic Save Backups

Regular backups are critically important. Use cron to automate the process.

sudo crontab -e -u factorio

Add the following line to create a backup every hour:

0 * * * * cp /home/factorio/saves/my_server_world.zip /home/factorio/saves/backups/my_server_world_$(date +\%F_\%H-\%M).zip

Create the directory for backups:

mkdir -p /home/factorio/saves/backups

You can also add a command to delete old backups to prevent filling up your disk:

0 * * * * find /home/factorio/saves/backups -type f -name "*.zip" -mtime +7 -delete

This command will delete backups older than 7 days.

Quick pick
Need a dedicated server?
Bare metal with NVMe in 70+ locations — configure and order in minutes.
Browse servers

Migrating a Factorio Game from Local PC to a VPS Server

Migrating an existing game save from your local computer to a Factorio server on a VPS is quite straightforward.

  1. Locate the save file: On your computer, Factorio saves are typically found in %appdata%\Factorio\saves (Windows) or ~/.factorio/saves (Linux/macOS). Find your world's .zip file.
  2. Transfer the file to the server: Use an SFTP client (e.g., WinSCP for Windows, FileZilla for all platforms) to connect to your server via SSH (port 22) with the factorio login and password. Transfer the save file (e.g., my_local_world.zip) to the /home/factorio/saves/ directory on the server.
  3. Stop the current server (if running): If your server is already running with a different world, stop it:
    sudo systemctl stop factorio
            
  4. Update the server configuration: Edit the systemd service file (/etc/systemd/system/factorio.service) or the startup command in screen to point to the new save file:
    ExecStart=/home/factorio/factorio/bin/x64/factorio --start-server /home/factorio/saves/my_local_world.zip --port 34197 --bind 0.0.0.0 --server-settings /home/factorio/factorio/data/server-settings.json
            

    If you are using screen, simply run the new command with the new world name.

  5. Start the server:
    sudo systemctl daemon-reload # Если меняли service-файл
    sudo systemctl start factorio
            

Your factory will now be accessible on the dedicated server.

Frequently Asked Questions

What is the best CPU for a Factorio server?

For a Factorio server, high single-thread CPU performance and a large L3 cache are critically important. Instead of a large number of cores (e.g., 16-24), it is preferable to choose a CPU with fewer cores but with a clock speed of 3.5 GHz or higher. For example, Intel Xeon E-23xx or AMD Ryzen 5/7 with appropriate frequencies will perform better than high-core count but low-frequency server CPUs.

How much RAM is needed for a Factorio server?

For a small Factorio server (up to 10 players, medium factory), 4-8 GB RAM is sufficient. However, for large factories and megabases, especially with many mods, 16-32 GB RAM is recommended. While the game itself doesn't always use the entire amount, the operating system and other background processes can consume significant resources, and a large amount of memory helps avoid swapping.

Can mods be used on a Factorio headless server?

Yes, the Factorio headless server fully supports mods. To install them, you need to upload the mod ZIP archives to the /home/factorio/factorio/mods directory on the server and ensure they are activated in the mod-list.json file in the world save directory. Player clients will automatically synchronize mods when connecting to the server.

How to ensure stable UPS on a large Factorio factory?

To maintain stable UPS on a large Factorio factory, you need to optimize its design. Minimize the use of long and overloaded belts, preferring trains and bots. Optimize fluid systems, avoiding complex branching. Utilize productivity modules and simplify circuit networks. Regularly use in-game commands like /perf-gui and /debug show-entity-time-usage to identify bottlenecks.

Conclusion

Hosting Factorio on a dedicated server or a powerful VPS from Valebyte.com is the optimal solution for stable, scalable, and fully controlled gameplay, especially with active mod usage and megabase development. Choose a plan with a high CPU clock speed and an NVMe disk to ensure maximum UPS, and follow the factory optimization recommendations for long-term performance.

SSD NVMe
Ready to launch your VPS?

NVMe VPS with 60-second activation: full root access, 20+ locations, pay with card or crypto.

Choose a plan
support_agent
Valebyte Support
Usually replies within minutes
Hi there!
Send us a message and we'll reply as soon as possible.