
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.
Here's what you need to run a Factorio dedicated server.
Small factory, 1-5 players
Medium factory, 5-20 players
Megabase, 20-40 players
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.
Skip the manual installation, port forwarding, and configuration. Install on your own computer and start hosting instantly.
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.
Set your server settings, then install Docker, and pull the Factorio container image.
# 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
Factorio uses a custom install script to download and configure the server files.
#!/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 "-----------------------------------------"Factorio requires 1 port to be open for game traffic and queries.
sudo ufw allow 34197/udp
Start the Factorio server using the configuration from Step 1.
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
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 GameCPExplore step-by-step setup guides for other popular games supported by GameCP.
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