34197/UDPFactorio servers require specific ports for proper operation:
| Port | Protocol | Purpose | Required |
|---|---|---|---|
| 34197 (configurable) | UDP | Game port | Yes |
| 27015 | TCP | RCON (if enabled) | Optional |
UFW (Ubuntu/Debian):
sudo ufw allow 34197/udp comment 'Factorio Game Port'
sudo ufw allow 27015/tcp comment 'Factorio RCON'
FirewallD (CentOS/RHEL):
sudo firewall-cmd --permanent --add-port=34197/udp
sudo firewall-cmd --permanent --add-port=27015/tcp
sudo firewall-cmd --reload
iptables:
iptables -A INPUT -p udp --dport 34197 -j ACCEPT
iptables -A INPUT -p tcp --dport 27015 -j ACCEPT
cd /home/factorio
wget -O factorio.tar.xz https://www.factorio.com/get-download/latest/headless/linux64
tar -xf factorio.tar.xzmkdir -p ~/.factorio
cd factorio./bin/x64/factorio --create my-saveC:\factorio\factorio.exe --create my-save to generate map~/.factorio/ # Config directory (Linux)
%APPDATA%\Factorio\ # Config directory (Windows)
├── saves/ # Save games
├── mods/ # Installed mods
├── config/
│ ├── server-settings.json
│ ├── server-whitelist.json
│ ├── server-banlist.json
│ └── server-adminlist.json
└── script-output/ # Script output files
{
"name": "My Factorio Server",
"description": "Vanilla cooperative factory building",
"tags": ["game", "tags"],
"_comment_max_players": "Maximum number of players allowed",
"max_players": 0,
"_comment_visibility": "public: Game will be published on the official Factorio matching server",
"visibility": {
"public": true,
"lan": true
},
"username": "",
"password": "",
"token": "",
"game_password": "",
"require_user_verification": true,
"max_upload_in_kilobytes_per_second": 0,
"max_upload_slots": 5,
"minimum_latency_in_ticks": 0,
"ignore_player_limit_for_returning_players": false,
"allow_commands": "admins-only",
"autosave_interval": 10,
"autosave_slots": 5,
"afk_autokick_interval": 0,
"auto_pause": true,
"only_admins_can_pause_the_game": true,
"autosave_only_on_server": true,
"non_blocking_saving": false,
"_comment_admins": "List of case insensitive usernames, that will be admins on the server",
"admins": []
}
[
"player1",
"player2",
"player3"
]
[
"admin1",
"admin2"
]
{
"terrain_segmentation": "normal",
"water": "normal",
"width": 0,
"height": 0,
"starting_area": "normal",
"peaceful_mode": false,
"autoplace_controls": {
"coal": {
"frequency": "normal",
"size": "normal",
"richness": "normal"
},
"iron-ore": { "frequency": "normal", "size": "normal", "richness": "normal" },
"copper-ore": { "frequency": "normal", "size": "normal", "richness": "normal" },
"stone": { "frequency": "normal", "size": "normal", "richness": "normal" },
"crude-oil": { "frequency": "normal", "size": "normal", "richness": "normal" },
"uranium-ore": { "frequency": "normal", "size": "normal", "richness": "normal" },
"trees": { "frequency": "normal", "size": "normal", "richness": "normal" },
"enemy-base": { "frequency": "normal", "size": "normal", "richness": "normal" }
},
"cliff_settings": {
"name": "cliff",
"cliff_elevation_0": 10,
"cliff_elevation_interval": 40,
"richness": "normal"
},
"property_expression_names": {},
"starting_points": [ { "x": 0, "y": 0 } ],
"seed": null
}
| Parameter | Description | Example |
|---|---|---|
| --start-server | Start multiplayer server with save file | --start-server my-save |
| --create | Create new map/save | --create my-save |
| --port | Network port to use | --port 34197 |
| --bind | IP address to bind to | --bind 0.0.0.0 |
| --server-settings | Path to server settings JSON | --server-settings settings.json |
| --server-whitelist | Path to whitelist JSON | --server-whitelist whitelist.json |
| --server-adminlist | Path to admin list JSON | --server-adminlist adminlist.json |
| --rcon-port | RCON port (requires password) | --rcon-port 27015 |
| --rcon-password | RCON password | --rcon-password secret |
| --map-gen-settings | Map generation settings JSON | --map-gen-settings mapgen.json |
| --console-log | Path to write console log | --console-log server.log |
./bin/x64/factorio --start-server my-save --port 34197 --server-settings server-settings.json
factorio.exe --start-server my-save --port 34197 --server-settings server-settings.json
#!/bin/bash
cd /home/factorio/factorio
./bin/x64/factorio \
--start-server saves/my-save.zip \
--port 34197 \
--server-settings config/server-settings.json \
--server-adminlist config/server-adminlist.json \
--rcon-port 27015 \
--rcon-password "your_secure_password" \
--console-log /var/log/factorio/server.log
Issue: Server not visible in public game list.
Solutions:
"visibility": {"public": true} in server-settings.jsonusername and token are set (for public listing)Issue: Players cannot connect or timeout.
Solutions:
game_password if server is password protectedmax_players is not exceeded (0 = unlimited)server-whitelist.json is usedIssue: Players experiencing lag or desyncs.
Solutions:
minimum_latency_in_ticks for high-latency playersmax_upload_slots if bandwidth limitednon_blocking_saving to prevent save-related lag spikesIssue: Save file won't load or crashes.
Solutions:
autosave_slots keeps multiple backups)--check-save parameter to validate save integritysaves/ directory recommendedIssue: Mods not loading or causing crashes.
Solutions:
mods/ directory for corrupted downloadsmod-list.json to enable/disable modsIssue: Server running slowly with many players.
Solutions:
autosave_interval frequencyFactorio has extensive mod support via the official Mod Portal:
~/.factorio/mods/mod-list.json to enable/disable mods--mod-directory parameter if neededmod-list.json for easy sync/admin # Open admin menu
/ban [player] # Ban a player
/unban [player] # Unban a player
/kick [player] [reason] # Kick a player
/promote [player] # Promote player to admin
/demote [player] # Demote player from admin
/mute [player] # Mute player's chat
/unmute [player] # Unmute player
/whitelist add [player] # Add to whitelist
/whitelist remove [player]# Remove from whitelist
/save # Manually save game
Use RCON to send console commands remotely when --rcon-port and --rcon-password are configured.