Docs / Game Servers / Factorio Headless Server on Ubuntu

Factorio Headless Server on Ubuntu

By Admin · Feb 22, 2026 · Updated Apr 23, 2026 · 5 views · 4 min read

Getting factorio right from the start saves hours of debugging later. In this comprehensive guide, we'll cover everything from initial setup to production-ready configuration, including headless and ubuntu considerations.

Prerequisites

  • Sufficient RAM for the game server (check requirements)
  • Root or sudo access to the server
  • SteamCMD installed (for Steam-based games)
  • A registered domain name (for public-facing services)
  • A VPS running Ubuntu 22.04 or later (2GB+ RAM recommended)

Server Installation

After applying these changes, monitor the server's resource usage for at least 24 hours to ensure stability. Tools like htop, iostat, and vmstat can provide real-time insights into system performance.


# Create a dedicated game server user
sudo useradd -m -s /bin/bash gameserver
sudo su - gameserver

# Install SteamCMD
mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

# Install the game server
./steamcmd.sh +force_install_dir ~/servers/factorio +login anonymous +app_update 1234567 validate +quit

Each line in the configuration serves a specific purpose. The comments explain the reasoning behind each setting, making it easier to customize for your specific use case.

Security Implications

When scaling this setup, consider vertical scaling (adding more RAM/CPU) first, as it's simpler to implement. Horizontal scaling adds complexity but may be necessary for high-traffic applications.

  • Keep your system packages updated regularly
  • Monitor disk space usage and set up alerts
  • Review log files weekly for anomalies

Configuration File Setup

Security should be a primary consideration when configuring factorio. Always use strong passwords, keep software updated, and restrict network access to only the necessary ports and IP addresses.


# Server configuration file
[Server]
ServerName=My factorio Server
MaxPlayers=32
ServerPort=27015
Password=
AdminPassword=changeme
SaveInterval=300

This configuration provides a good balance between performance and resource usage. For high-traffic scenarios, you may need to increase the limits further.

Firewall and Port Configuration

Security should be a primary consideration when configuring factorio. Always use strong passwords, keep software updated, and restrict network access to only the necessary ports and IP addresses.


# Create systemd service for auto-start
sudo tee /etc/systemd/system/factorio.service << 'EOF'
[Unit]
Description=factorio Dedicated Server
After=network.target

[Service]
User=gameserver
WorkingDirectory=/home/gameserver/servers/factorio
ExecStart=/home/gameserver/servers/factorio/start.sh
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
EOF

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

The output should show the service running without errors. If you see any warning messages, address them before proceeding to the next step.

Advanced Settings

Before making changes to the configuration, always create a backup of the existing files. This ensures you can quickly roll back if something goes wrong during the setup process.

  • Review log files weekly for anomalies
  • Test your backup restore procedure monthly
  • Monitor disk space usage and set up alerts

Performance Optimization

Performance benchmarks show that properly tuned factorio can handle significantly more concurrent connections than the default configuration. The key improvements come from adjusting worker processes and connection pooling.


# Create a dedicated game server user
sudo useradd -m -s /bin/bash gameserver
sudo su - gameserver

# Install SteamCMD
mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

# Install the game server
./steamcmd.sh +force_install_dir ~/servers/factorio +login anonymous +app_update 1234567 validate +quit

Note that file paths may vary depending on your Linux distribution. The examples here are for Debian/Ubuntu; adjust paths accordingly for RHEL/CentOS-based systems.

Common Issues and Solutions

  • Connection timeout: Verify your firewall rules allow traffic on the required ports. Use ss -tlnp to confirm the service is listening on the expected port.
  • Service won't start: Check the logs with journalctl -xe -u factorio. Common causes include port conflicts, missing configuration files, or insufficient permissions.

Summary

You've successfully configured factorio on your VPS. Remember to monitor performance, keep your software updated, and maintain regular backups. If you run into issues, consult the official documentation or open a support ticket for assistance.

Was this article helpful?