Factorio Dedicated Server
Factorio dedicated game server for multiplayer.
Overview
Factorio is a construction and management simulation game where players build and maintain automated factories to produce increasingly complex items. Originally released by Wube Software in 2016, Factorio has become one of the most beloved strategy games for its deep automation mechanics, multiplayer cooperation, and extensive modding support. The game's dedicated server functionality allows multiple players to collaborate on massive factory projects in persistent worlds that continue running even when players are offline.
This Docker stack utilizes the factoriotools/factorio image to create a containerized Factorio dedicated server with persistent world storage and proper network configuration. The setup handles UDP game traffic on port 34197 for player connections and TCP traffic on port 27015 for RCON administration, while maintaining save files and server configurations in Docker volumes. The container automatically manages server startup, world generation, and crash recovery without requiring manual intervention.
This configuration is ideal for gaming communities, friends groups, and organizations wanting to host private Factorio servers with reliable uptime and easy maintenance. The containerized approach eliminates compatibility issues across different host systems while providing consistent performance and simplified backup procedures. Engineers and system administrators will appreciate the infrastructure-as-code approach for managing game server deployments alongside other containerized services.
Key Features
- Automatic world generation with customizable map settings and seed values
- Built-in autosave functionality with configurable intervals and retention policies
- RCON administrative interface for remote server management and player administration
- Comprehensive mod support with automatic synchronization to connecting clients
- Player authentication integration with Factorio account system and whitelist management
- Configurable server settings including PvP modes, evolution factors, and pollution settings
- Detailed server console logging with chat history and administrative action tracking
- Save file versioning and corruption recovery mechanisms
Common Use Cases
- 1Gaming communities hosting persistent factory-building competitions and events
- 2Educational institutions teaching automation, logistics, and systems engineering concepts
- 3Remote teams using collaborative factory building as team-building exercises
- 4Modding communities testing and showcasing custom Factorio modifications
- 5Streamers and content creators hosting viewer participation factory projects
- 6Engineering groups demonstrating real-world manufacturing and supply chain principles
- 7Family and friend groups maintaining long-term collaborative building projects
Prerequisites
- Minimum 2GB RAM allocation with 4GB recommended for large factories or modded servers
- UDP port 34197 accessible for game client connections through firewalls and NAT
- TCP port 27015 available for RCON administrative access if remote management needed
- Valid Factorio account credentials for server authentication and multiplayer features
- At least 5GB free disk space for save files, with additional space for mod storage
- Basic understanding of Factorio server settings and player permission systems
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 factorio: 3 image: factoriotools/factorio:latest4 container_name: factorio5 restart: unless-stopped6 ports: 7 - "${FACTORIO_PORT:-34197}:34197/udp"8 - "27015:27015/tcp"9 environment: 10 - SAVE_NAME=${SAVE_NAME:-world}11 - GENERATE_NEW_SAVE=${GENERATE_NEW:-true}12 volumes: 13 - factorio_data:/factorio14 networks: 15 - factorio-network1617volumes: 18 factorio_data: 1920networks: 21 factorio-network: 22 driver: bridge.env Template
.env
1# Factorio Server2FACTORIO_PORT=341973SAVE_NAME=world4GENERATE_NEW=trueUsage Notes
- 1Server at localhost:34197 UDP
- 2Configure server-settings.json
- 3Place saves in /factorio/saves
- 4Supports mods
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 factorio:5 image: factoriotools/factorio:latest6 container_name: factorio7 restart: unless-stopped8 ports:9 - "${FACTORIO_PORT:-34197}:34197/udp"10 - "27015:27015/tcp"11 environment:12 - SAVE_NAME=${SAVE_NAME:-world}13 - GENERATE_NEW_SAVE=${GENERATE_NEW:-true}14 volumes:15 - factorio_data:/factorio16 networks:17 - factorio-network1819volumes:20 factorio_data:2122networks:23 factorio-network:24 driver: bridge25EOF2627# 2. Create the .env file28cat > .env << 'EOF'29# Factorio Server30FACTORIO_PORT=3419731SAVE_NAME=world32GENERATE_NEW=true33EOF3435# 3. Start the services36docker compose up -d3738# 4. View logs39docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/factorio-server/run | bashTroubleshooting
- Players cannot connect to server: Verify UDP port 34197 is properly forwarded and accessible from external networks
- Server crashes with 'out of memory' error: Increase Docker container memory limits or reduce autosave frequency in server settings
- Mods fail to synchronize to clients: Check mod compatibility versions and ensure all required dependencies are installed on server
- Save file corruption on server restart: Enable multiple autosave slots and verify proper container shutdown procedures
- RCON connection refused: Ensure TCP port 27015 is exposed and RCON password is configured in server-settings.json
- New players spawn in wrong locations: Verify spawn point settings and check for conflicting mod configurations affecting player positioning
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
factorio
Tags
#factorio#game-server#strategy#gaming#multiplayer
Category
Media & EntertainmentAd Space
Shortcuts: C CopyF FavoriteD Download