How to Set Up a Factorio Game Server
Factorio is a popular computer game in the automation simulation genre, where players build and manage complex production chains. The game's main goal is to create the most efficient production possible, starting with basic processes and gradually progressing to large-scale automation systems. Thanks to its intricate mechanics, numerous available modifications, and cooperative gameplay options, Factorio has gained a massive following among both beginners and experienced players.
One of Factorio’s key features is its multiplayer mode. It allows a group of players to collaborate or compete in building production lines, making the gameplay more engaging and challenging. Multiplayer requires a server to host player interactions. Having your own server offers many advantages:
- Control over Gameplay: The server administrator can set game parameters such as player limits, difficulty, mod usage, and even behavioral rules.
- Stability and Performance: A dedicated server eliminates the influence of local hardware on the game, ensuring a smooth experience even under heavy loads.
- Availability: The server runs 24/7, allowing players to connect anytime, regardless of the host's schedule or availability.
- Advanced Settings: Administrators can integrate mods, automate backups, and scale production capabilities by connecting additional servers.
Why Hostman is the Best Choice for Factorio Copy link
Hostman provides cloud servers that are perfect for hosting game servers, including Factorio. Here are some reasons to choose this solution:
- Ease of Use: You don’t need to be an expert in system administration to host a Factorio server. Hostman offers ready-to-use VDS solutions that allow you to set up a server with just a few clicks.
- High Performance: Hostman’s cloud servers ensure stable operation thanks to powerful processors, high-speed RAM, and fast SSD storage. This is especially important for Factorio, where a large number of objects and complex calculations can create a significant load.
- Scalability: You can increase server resources at any time to accommodate more players or handle a more complex game world.
- Global Accessibility: Thanks to Hostman’s distributed infrastructure and high network connectivity standards, players can connect to the server without delays.
- Support and Documentation: Hostman offers professional technical support to help resolve any issues related to server setup and operation. Additionally, the platform provides detailed guides and documentation for working with its solutions.
- Cost Efficiency: Using a cloud server helps avoid purchasing and maintaining physical equipment expenses. Clients only pay for the resources they actually use.
In today’s gaming industry, having your own server is not just convenient but often essential. Hostman offers a unique combination of simplicity, performance, and flexibility, making it the optimal choice for hosting a Factorio server.
Preparation for Installation Copy link
Before installing a Factorio game server, several preparatory steps are necessary. These include registering with the Hostman cloud service, selecting an appropriate server plan, and setting up the infrastructure. This process ensures a stable and efficient server platform for smooth gameplay.
Registering with Hostman and Accessing the Control Panel Copy link
The first step is creating an account on Hostman. This will provide access to the control panel to manage servers and configurations.
1. Open the official Hostman website and click the "Sign Up" button.

2. Enter your email address or sign up using your Google or GitHub accounts.
The Hostman interface is intuitive even for beginners. The control panel provides access to server creation, parameter configuration, and monitoring tools.
Selecting a Plan and Setting Up the Infrastructure Copy link
After registering, you need to select an appropriate plan that meets the requirements of your game server.
1. Evaluate the Server Load. Before choosing a plan, assess the resources your server will need. This depends on:
- Number of Players: The more players connect simultaneously, the higher the load.
- Game World Complexity: More objects, production lines, and modifications require greater resources.
2. Choose a Plan. Hostman offers several pricing plans. Choose server specifications based on recommendations from Factorio's official resources. We will discuss performance requirements further in the next section.
Although Factorio is a lightweight game, its performance depends on the complexity of the world and player activity. Below are the minimum and recommended requirements:
- Operating System: Linux (preferably Ubuntu or Debian).
- Processor: Dual-core processor at 2 GHz or higher. For larger servers, a quad-core processor is recommended.
- RAM:
- Minimum: 2 GB for servers with a small number of players.
- Recommended: 4–8 GB for servers with mods and 10–20 players.
- Disk Space:
- 5–10 GB for the basic installation.
- Allocate 20 GB or more if using mods or maintaining backups.
- Network Connection:
- High bandwidth and low latency.
- A minimum of 10 Mbps for both inbound and outbound traffic.
Setting Up the Server on Hostman Copy link
Proper preparation is key to ensuring the stable and uninterrupted operation of the Factorio server. By completing registration, selecting the right plan, and configuring the server on Hostman, you will have an ideal platform for hosting a Factorio game world:
- Go to the "Cloud Servers" section in the control panel.
- Specify the operating system (e.g., Ubuntu), region, configuration, and network parameters based on the recommendations above.
- Click "Order" on the right menu.
Once the purchase is completed, the server setup process will begin automatically, which may take up to 10 minutes.
After deployment, a dashboard with connection information, hardware load statistics, and traffic graphs will appear. Now you're ready to proceed with installing Factorio.
Installing a Factorio Server Using Dockerfile Copy link
Using Docker to deploy a Factorio game server is a modern and flexible approach that automates the setup process and ensures server stability. Docker isolates the server software within a container, making the installation process more manageable and independent of the server's operating system. This method is similar to traditional setups but involves fully configuring Docker for the future Factorio server.
- Simplified Setup and Management: Docker simplifies server configuration, eliminating the need for manual dependency installations and complex configurations.
- Portability: Docker containers work consistently across different operating systems and server environments, enabling seamless server migration between machines.
- Isolation: All server components reside inside the container and are isolated from the host system, reducing the risk of software conflicts.
- Flexibility and Scalability: Easily run multiple Factorio servers on one host and configure them for various purposes, such as mod testing or cluster creation.
- Support and Updates: The
factoriotools/factorio-dockerrepository is actively maintained, ensuring timely updates and fixes.
Installing Docker Copy link
Docker is a containerization software that must be installed on your server before configuring Factorio.
-
Update system packages:
sudo apt update && sudo apt upgrade -y-
Install Docker:
sudo apt install docker.io -y-
Verify Docker installation:
docker --version-
Install Docker Compose (if not installed). Docker Compose is used to manage multi-container applications. Install it with:
sudo apt install docker-compose -yCloning the Repository Copy link
You need a repository with a ready-to-use Dockerfile and configuration templates.
-
Install Git (if not installed):
sudo apt install git -y-
Clone the repository:
git clone https://github.com/factoriotools/factorio-docker.git-
Navigate to the repository directory:
cd factorio-dockerServer Configuration via docker-compose.yml Copy link
The docker-compose.yml file defines server parameters. Configuring this file is crucial for personalizing your game server.
-
In the repository directory, create or edit the
docker-compose.ymlfile. Here’s a basic example:
version: '3.3'
services:
factorio:
image: factoriotools/factorio
ports:
- "34197:34197/udp"
volumes:
- ./data:/factorio
environment:
- FACTORIO_SERVER_SETTINGS=./data/server-settings.json
- TOKEN=FactorioToken
-
Configure the settings:
-
Server Port: Ensure port
34197is open on your system. -
Data Storage: The
./datadirectory stores server files, including saves and mods. -
Settings File: Update
server-settings.jsonto specify game parameters (e.g., server name, password, and player count). -
Token: Add a token obtained from Factorio's website.
Starting the Server Copy link
-
Start the server:
docker-compose up -d
-
Check the container status:
docker psConnecting to the Server Copy link
Connect to the server in the Factorio game using your server's IP address and port 34197.
Additional Tips Copy link
Updating the Server:
docker-compose pull
docker-compose up -d
Stopping the server:
docker-compose downViewing logs:
docker logs <container_id>Adding Mods:
Upload mods to the ./data/mods folder and restart the container.
Installing a Factorio server using Docker is a powerful solution that allows you to deploy a server quickly with minimal effort. This approach is ideal for users who value flexibility and want full control over the server while avoiding complex manual configurations.
Manual Installation of a Factorio Server on a Dedicated Server Copy link
Installing Factorio manually on a dedicated server is ideal for users who want full control over the server's setup and management. This approach requires basic command-line skills and an understanding of server infrastructure. It's particularly useful if you plan to customize the server with unique settings or integrate it into a complex environment.
Preparing the Dedicated Server Copy link
-
Choose the Operating System. Factorio Server officially supports Windows and Linux. A Linux distribution like Ubuntu or Debian is recommended for its stability, low resource consumption, and extensive automation capabilities.
-
Before starting the installation, update all packages:
sudo apt update && sudo apt upgrade -y-
Install the necessary utilities for server setup:
sudo apt install wget curl screen -y-
Create a separate user to run the server, for better security:
sudo adduser factorio
sudo su - factorio
Downloading and Installing Factorio Server Copy link
-
Visit the Factorio Headless Server page to get the latest Linux version link. Then execute:
wget https://factorio.com/get-download/stable/headless/linux64 -O factorio.tar.xz-
Extract the files:
tar -xf factorio.tar.xz-
Organize the file structure:
mkdir -p ~/factorio/saves ~/factorio/modsConfiguring server-settings.json Copy link
Create or edit the server settings file to define key parameters, such as server name, password, and player limits. Example configuration:
{
"name": "My Factorio Server",
"description": "A friendly server for everyone.",
"tags": ["game", "fun"],
"max_players": 10,
"visibility": {
"public": true,
"lan": true
},
"username": "your_username",
"password": "your_password",
"game_password": "game_password",
"require_user_verification": true,
"max_upload_in_kilobytes_per_second": 0,
"minimum_latency_in_ticks": 0
}
Important:
-
Enter your Factorio account username and password, available on the official website. Ensure your account has a valid game license.
-
Alternatively, if you prefer not to use login credentials, you can provide a token from your profile on the same site.
Save server-settings.json in the server's root folder (e.g., ~/factorio).
Additional Settings Copy link
- Mods: Download modifications from the Factorio Mod Portal and place them in the
~/factorio/modsfolder. - Save Files: Prepare a save file using the local game client and upload it to the
~/factorio/savesfolder.
Alternatively, generate it yourself using:
./bin/x64/factorio --create saves/new_game.zipStarting the Factorio Server Copy link
-
Navigate to the server directory and run:
./bin/x64/factorio --start-server ~/factorio/saves/new_game.zip --server-settings ~/factorio/server-settings.json-
Use screen to keep the server running after closing the terminal:
screen -S factorio_server
./bin/x64/factorio --start-server ~/factorio/saves/new_game.zip --server-settings ~/factorio/server-settings.json
To return to the session:screen -r factorio_server
After launching, check if the server is accessible by connecting via the Factorio client using the server's IP address and port (default: 34197).
New player connections will appear in the server logs.
Tips Copy link
-
Automating Server Startup: Create a systemd service to automatically start the server after system reboot:
sudo nano /etc/systemd/system/factorio.serviceExample content:
[Unit]
Description=Factorio Server
After=network.target
[Service]
Type=simple
User=factorio
WorkingDirectory=/home/factorio/factorio
ExecStart=/home/factorio/factorio/bin/x64/factorio --start-server /home/factorio/factorio/saves/savefile.zip --server-settings /home/factorio/factorio/server-settings.json
Restart=always
[Install]
WantedBy=multi-user.target
Save the file, then enable and start the service:
sudo systemctl enable factorio.service
sudo systemctl start factorio.service
-
Updating the Server: Download the new version and replace old files, preserving the saves and mods directories.
Manual installation of a Factorio server provides maximum flexibility in setup and management, making it a preferred choice for experienced users. Despite the required effort, this approach allows you to adapt the server to any game scenario and ensures its reliable operation.
Server Configuration Copy link
Configuring a Factorio game server is a crucial step that not only allows customization of the gameplay but also ensures stable operation under increasing loads. This section covers installing mods, setting up automatic saves and backups, and optimizing the server for higher loads.
Adding Mods Copy link
Mods enhance gameplay by adding new elements, mechanics, and scenarios. Factorio has official mod support, making installation and management straightforward.
-
Factorio Mod Portal: The official catalog for mods allows you to search by keywords or categories and review popularity and user feedback.
-
Manual Installation: After selecting a mod, download its archive (
.zip) and place it in the server's mods directory.
The path to this directory depends on the server structure: -
For a manually configured server:
<server_folder>/mods. -
For a Docker setup:
~/factorio-docker/data/mods. -
Automated Mod Download with API Token: You can automate mod downloads using an API token if your server has network access.
-
Go to your account settings on the Factorio website.
-
Copy the token.
-
Specify it in the
player-data.jsonfile located in the server directory.
Activating Mods Copy link
Enable the required mods by listing them in the mod-list.json file. Example configuration:
{
"mods": [
{"name": "base", "enabled": true},
{"name": "bobmods", "enabled": true},
{"name": "angelsmods", "enabled": true}
]
}
After adding or modifying mods, restart the server to apply the changes.
Configuring Automatic Saves and Backups Copy link
Automatic saving and data backups are critical processes that prevent progress loss in case of server failure or player error.
Automatic Saves Copy link
Specify the save frequency in the server-settings.json file:
{
"autosave_interval": 5,
"autosave_slots": 10
}
-
autosave_interval: The interval between saves, in minutes.
-
autosave_slots: The number of save slots (older saves will be overwritten).
Ensure the server is saving progress by checking for save files in the saves folder.
Backup Configuration Copy link
Set up a script to regularly copy save files to another server or cloud storage. Below is an example using a Bash script:
#!/bin/bash
SOURCE="/path/to/factorio/saves"
DEST="/path/to/backup/location"
TIMESTAMP=$(date +"%Y%m%d%H%M%S")
tar -czf "$DEST/factorio_backup_$TIMESTAMP.tar.gz" "$SOURCE"
Use cron to schedule regular script execution:
-
Open the cron editor:
crontab -e-
Add a line to run the script daily at 3:00 AM:
0 3 * * * /path/to/backup_script.shThis setup ensures secure data storage and prevents game progress loss.
Optimizing the Server for High Load Copy link
When the server has a large number of players or uses resource-intensive mods, it's essential to minimize lag and ensure stable performance.
Resource Allocation
Make sure the server meets the minimum and recommended requirements:
-
CPU: High clock speed (>3 GHz), preferably multi-core.
-
RAM: At least 2 GB for the base game, with an additional 1 GB for every 10 players.
-
Disk Subsystem: SSD for fast access to saves and mods.
Configuring Limits
In the server-settings.json file, limit the number of players to avoid overload:
{
"max_players": 20
}
Reducing Load
Choose mods optimized for multiplayer. Some mods can significantly increase CPU and network load.
Increase tick interval. Setting a higher value for minimum_latency_in_ticks helps reduce network load:
{
"minimum_latency_in_ticks": 2
}
Server Logs
Regularly check the logs for errors or warnings. Logs are located in the server folder (factorio-current.log).
Using Monitoring Tools
Set up monitoring tools like htop or Prometheus to track resource usage in real-time.
Game Updates
Ensure the server and clients are using the latest version of Factorio. Developers frequently release updates that improve performance.
Proper mod configuration, automation of saves and backups, and server resource optimization are the foundation for ensuring a stable and enjoyable gaming experience. These steps will help avoid technical issues and create an environment for the long-term operation of your Factorio server.
Server Testing Copy link
Testing the Factorio game server is the final stage of setup, ensuring its functionality and stability. At this point, it's essential to check connection, server performance under load, and address any potential issues.
After starting the server, ensure it is accessible for connections. Follow these steps:
-
Obtain the server IP address. For cloud solutions like Hostman, you can find the IP in the control panel.
-
Ensure the server's port (
34197) is open for external connections. If the port is closed, open it with:
sudo ufw allow 34197-
Start the game and connect:
-
Open Factorio and select "Multiplayer."
-
Click "Join Game."
-
Enter the server's IP address and port (default is
34197). Example:192.168.1.100:34197. -
Click "Connect."
Once connected successfully, verify the following:
-
World Interaction: Ensure you can interact with the world (mining resources, building).
-
Server-Client Synchronization: For example, the time of day should be the same for everyone.
Ask another player to connect to your server. Ensure the server is accessible via the external IP address.
If you've set the game_visibility parameter in the server's settings, your server will appear in the public server list of Factorio. Check if it's listed and available for connection.
Resolving Common Errors and Issues Copy link
In this section, we'll review some of the most common errors and issues that might arise and offer solutions to fix them.
Connection Issues Copy link
-
Error: "Couldn't establish network communication."
-
Cause: Server port is closed or inaccessible.
-
Solution: Make sure port
34197is open in the firewall and router. For NAT routers, set up port forwarding. -
Error: "Failed to connect to server."
-
Cause: Incorrect IP address or port.
-
Solution: Check that you're using the correct address and port. If using a domain name, verify it resolves correctly to the IP.
-
Error: "Server not responding."
-
Cause: The server is not running or has crashed.
-
Solution: Check if the server is running. Restart it if necessary.
Performance Issues Copy link
-
Error: Lag with many players.
-
Cause: The server can't handle the load.
-
Solution:
-
Reduce the number of players (
adjust the max_playerssetting inserver-settings.json). -
Upgrade server hardware.
-
Monitor CPU and memory usage with system tools like
htoportop. -
Error: Data transmission delays.
-
Cause: High network latency.
-
Solution:
-
Switch to a faster network connection.
-
Check the connection speed with tools like
pingoriperf.
Mod Issues Copy link
-
Error: "Mod mismatch."
-
Cause: Different mod versions between client and server.
-
Solution: Ensure all players are using the same mod versions as the server.
-
Error: "Missing mod dependencies."
-
Cause: Required mods are not installed.
-
Solution: Check mod requirements on the Factorio Mod Portal and install missing dependencies.
Save and Load Errors Copy link
-
Error: "Corrupted save file."
-
Cause: Save file is damaged due to a system crash.
-
Solution: Use the most recent backup. Regular backups help prevent data loss.
-
Error: "Cannot load map version."
-
Cause: The map version is incompatible with the current game version.
-
Solution: Update the server and client to the latest Factorio version.
General Server Failures Copy link
-
Error: "Out of memory."
-
Cause: Insufficient RAM to handle the game process.
-
Solution:
-
Increase the amount of RAM on the server.
-
Kill unnecessary processes.
-
Error: Unexpected server crash.
-
Cause: Configuration errors or mod conflicts.
-
Solution:
-
Check the server logs (
factorio-current.log). -
Disable recently added mods.
Game Server Testing is an essential process that helps identify and resolve potential issues before players start using the server. A careful approach at this stage ensures smooth operation and a comfortable gaming experience for all participants. Connection setup, mod management, and performance optimization are key steps to creating a quality Factorio server.
Conclusion Copy link
Setting up a Factorio game server can be accomplished in several ways, depending on the user’s experience and needs. In this article, we've detailed two installation and configuration approaches: Dockerfile and manual installation on a dedicated server. Each method has its features, advantages, and varying levels of technical expertise required.
-
Using Dockerfile: Docker is ideal for those familiar with containerization and seeking flexible server management. It provides high control, enabling easy updates, migrations, or scaling of the server. This approach is especially useful if hosting the server on a platform with limited resources or needing frequent configuration changes.
-
Manual Installation on a Dedicated Server: This method is preferred by experienced users who need full control over the server configuration and management. It allows fine-tuning the server for specific tasks and optimizing it for heavy loads. However, this approach requires server administration knowledge and more time for setup.
Hostman offers all the necessary tools to create and manage Factorio game servers. Regardless of your skill level, the platform enables quick server setup, customization, and a smooth gaming experience.