Factorio gameplay

Host a Factorio Dedicated Server

Factorio is a construction and management simulation game focused on building and maintaining automated factories. Host dedicated multiplayer servers where players collaborate to build complex production lines, defend against alien creatures, and launch rockets.

Hardware Requirements

Here's what you need to run a Factorio dedicated server.

Economy

Small factory, 1-5 players

CPU0.5 cores
RAM512 MB
Storage1 GB

Standard

Medium factory with mods, 5-20 players

CPU1 core
RAM1 GB
Storage1 GB

Pro

Megabase or heavy mods, 20+ players

CPU2 cores
RAM2 GB
Storage1 GB

Start hosting from your own computer

Run a Factorio server on your desktop, laptop, VPS, or dedicated machine — GameCP automates Docker setup, resource allocation, and Factorio configuration instantly. Automatic port forwarding means your friends can connect without touching your router. Start local, scale to a VPS when you're ready.

Get Started FreeNo credit card required

Setup in 4 Steps

Skip the manual installation, port forwarding, and configuration. Install on your own computer and start hosting instantly.

The Manual Way vs. GameCP

Manual Setup

  • Configure 1+ firewall ports and router settings
  • Write systemd service files
  • SSH into server to edit configs
  • Requires a VPS or dedicated server
  • 30-60 minutes if experienced

With GameCP

  • Automatic port forwarding — no router config
  • Host from your own PC, VPS, or dedicated server
  • Docker container with auto-restart
  • Visual config editor in browser
  • Under 5 minutes total

Under the Hood

The full manual process to host a Factorio dedicated server on a VPS. Or install GameCP on your own computer and skip all of this.

Step 1

Configure & Prepare

Set your server settings, then install Docker, and pull the Factorio container image.

Server ConfigurationEdit values to update all commands
terminal
# Update system and install Docker
sudo apt update && sudo apt install -y docker.io
sudo systemctl enable --now docker

# Create game server directory
sudo mkdir -p /opt/gameserver

# Server configuration
export SERVER_DESC="A GameCP hosted Factorio server"
export MAX_PLAYERS="20"
export AFK_KICK="0"
export AUTO_PAUSE="true"
export SAVE_NAME="gamesave"
export AUTOSAVE_SLOTS="5"
export FACTORIO_VERSION="latest"
export AUTOSAVE_INTERVAL="10"

# Pull the container image
docker pull ghcr.io/ptero-eggs/yolks:debian
Step 2

Run the Installation Script

Factorio uses a custom install script to download and configure the server files.

Installation Script
#!/bin/bash
# Factorio Headless Server Installation
apt update
apt install -y curl tar xz-utils jq

VERSION_JSON=$(curl -sSL https://factorio.com/api/latest-releases)

latest_stable=$(echo $VERSION_JSON | jq -r '.stable.headless')
latest_experimental=$(echo $VERSION_JSON | jq -r '.experimental.headless')

if [ -z "${FACTORIO_VERSION}" ] || [ "${FACTORIO_VERSION}" == "latest" ]; then
  DL_VERSION=$latest_stable
elif [ "${FACTORIO_VERSION}" == "experimental" ]; then
  DL_VERSION=$latest_experimental
else
  DL_VERSION=${FACTORIO_VERSION}
fi

mkdir -p /opt/gameserver
cd /opt/gameserver

echo "Downloading Factorio ${DL_VERSION} headless server..."
curl -sL https://www.factorio.com/get-download/${DL_VERSION}/headless/linux64 -o factorio-${DL_VERSION}

tar -xf factorio-${DL_VERSION} --strip-components=1 -C /opt/gameserver
rm factorio-${DL_VERSION}

# Set up config files from examples if they don't exist
if [ ! -e data/map-gen-settings.json ]; then
    echo "Copying default map-gen settings"
    cp data/map-gen-settings.example.json data/map-gen-settings.json
fi

if [ ! -e data/map-settings.json ]; then
    echo "Copying default map settings"
    cp data/map-settings.example.json data/map-settings.json
fi

if [ ! -e data/server-settings.json ]; then
    echo "Copying default server settings"
    cp data/server-settings.example.json data/server-settings.json
fi

mkdir -p /opt/gameserver/saves

echo "-----------------------------------------"
echo "Factorio ${DL_VERSION} installed."
echo "-----------------------------------------"
Step 3

Open Firewall Ports

Factorio requires 1 port to be open for game traffic and queries.

terminal
sudo ufw allow 34197/udp
34197/UDP(PORT)
Step 4

Launch the Server

Start the Factorio server using the configuration from Step 1.

terminal
docker run -d \
  --name factorio-server \
  -p 34197:34197/udp \
  -e SERVER_DESC="A GameCP hosted Factorio server" \
  -e MAX_PLAYERS="20" \
  -e AFK_KICK="0" \
  -e AUTO_PAUSE="true" \
  -e SAVE_NAME="gamesave" \
  -e AUTOSAVE_SLOTS="5" \
  -e FACTORIO_VERSION="latest" \
  -e AUTOSAVE_INTERVAL="10" \
  -v /opt/gameserver:/opt/gameserver \
  -w /opt/gameserver \
  ghcr.io/ptero-eggs/yolks:debian \
  if [ ! -f "./saves/gamesave.zip" ]; then ./bin/x64/factorio --create ./saves/gamesave.zip --map-gen-settings data/map-gen-settings.json --map-settings data/map-settings.json; fi; ./bin/x64/factorio --port 34197 --server-settings data/server-settings.json --start-server saves/gamesave.zip

Or skip all of this

GameCP automates every step above: Docker, port forwarding, startup, and config. Install on your own PC and deploy a Factorio server in under 5 minutes.

Deploy with GameCP

Ready to Host Your Factorio Server?

Install GameCP on your own computer and start hosting in minutes. Automatic port forwarding, zero config — your friends connect instantly.

No credit card required · Free tier available · Install local, scale later

Deploy Free