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:
Hostman provides cloud servers that are perfect for hosting game servers, including Factorio. Here are some reasons to choose this solution:
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.
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.
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.
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:
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:
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:
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.
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.
factoriotools/factorio-docker
repository is actively maintained, ensuring timely updates and fixes.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 -y
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-docker
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.yml
file. 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 34197
is open on your system.
Data Storage: The ./data
directory stores server files, including saves and mods.
Settings File: Update server-settings.json
to specify game parameters (e.g., server name, password, and player count).
Token: Add a token obtained from Factorio's website.
Start the server:
docker-compose up -d
Check the container status:
docker ps
Connect to the server in the Factorio game using your server's IP address and port 34197
.
Updating the Server:
docker-compose pull
docker-compose up -d
Stopping the server:
docker-compose down
Viewing 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.
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.
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
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/mods
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
).
~/factorio/mods
folder.~/factorio/saves
folder.Alternatively, generate it yourself using:
./bin/x64/factorio --create saves/new_game.zip
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.
Automating Server Startup: Create a systemd service to automatically start the server after system reboot:
sudo nano /etc/systemd/system/factorio.service
Example 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.
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.
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.json
file located in the server directory.
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.
Automatic saving and data backups are critical processes that prevent progress loss in case of server failure or player error.
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.
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.sh
This setup ensures secure data storage and prevents game progress loss.
When the server has a large number of players or uses resource-intensive mods, it's essential to minimize lag and ensure stable performance.
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.
In the server-settings.json
file, limit the number of players to avoid overload:
{
"max_players": 20
}
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
}
Regularly check the logs for errors or warnings. Logs are located in the server folder (factorio-current.log
).
Set up monitoring tools like htop
or Prometheus to track resource usage in real-time.
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.
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.
In this section, we'll review some of the most common errors and issues that might arise and offer solutions to fix them.
Error: "Couldn't establish network communication."
Cause: Server port is closed or inaccessible.
Solution: Make sure port 34197
is 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.
Error: Lag with many players.
Cause: The server can't handle the load.
Solution:
Reduce the number of players (adjust the max_players
setting in server-settings.json
).
Upgrade server hardware.
Monitor CPU and memory usage with system tools like htop
or top
.
Error: Data transmission delays.
Cause: High network latency.
Solution:
Switch to a faster network connection.
Check the connection speed with tools like ping
or iperf
.
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.
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.
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.
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.