Summary
This is a beginner-friendly guide to running a dedicated Factorio server on your Windows machine. It’s designed to be simple, effective, and free of the outdated issues you might find elsewhere. Just follow the quick steps, and the batch file provided will take care of the heavy lifting.
Batch File And Initial Setup
Create a folder in `C:\` named `SteamCMD`. Inside it, create a new text file named `Factorio_Dedicated_Server_Manager.bat`. Paste the following code into the file and save:
Factorio_Dedicated_Server_Manager.bat@echo off :: Factorio Dedicated Server Manager Batch Script :: By: Ghostwheel :: Last Updated: Space Age Release :: Version 1.0 :: ----------------------------------------------- :: This script validates, manages, and runs a Factorio Dedicated Server :: with support for save files, server settings, and elevated privileges. :: Variables set "BaseDir=%~dp0" set "FactorioExe=%~dp0steamapps\common\Factorio\bin\x64\factorio.exe" set "ExampleSettings=%~dp0steamapps\common\Factorio\data\server-settings.example.json" set "SettingsFile=%~dp0steamapps\common\Factorio\data\server-settings.json" set "SavesDir=%APPDATA%\Factorio\saves" set "MenuChoice=" :: Ensure Factorio executable exists if not exist "%FactorioExe%" ( echo ERROR: Factorio executable not found at "%FactorioExe%". echo Please ensure Factorio is installed in the expected location. pause goto :ExitScript ) :: Ensure server-settings.json exists, create it if necessary if not exist "%SettingsFile%" ( if exist "%ExampleSettings%" ( echo Creating server-settings.json from server-settings.example.json... copy "%ExampleSettings%" "%SettingsFile%" >nul echo server-settings.json created successfully. ) else ( echo ERROR: server-settings.example.json not found at "%ExampleSettings%". echo Cannot create server-settings.json. Please verify the installation. pause goto :ExitScript ) ) :: Ensure Saves directory exists if not exist "%SavesDir%" ( echo Creating Saves directory... mkdir "%SavesDir%" echo Saves directory created successfully. ) :: Main Menu :MainMenu cls echo ===================================================== echo Factorio Dedicated Server Manager echo ===================================================== echo [1] Load Latest Save echo [2] Load Specific Save echo [3] Open server-settings.json for Editing echo [4] Install Factorio Dedicated Server echo [5] Exit Factorio Dedicated Server Manager echo ===================================================== set /p "MenuChoice=Please enter your choice (1-5): " if "%MenuChoice%"=="1" goto :LoadLatestSave if "%MenuChoice%"=="2" goto :LoadSpecificSave if "%MenuChoice%"=="3" goto :EditSettings if "%MenuChoice%"=="4" goto :Install if "%MenuChoice%"=="5" goto :ExitScript :: Invalid input handling echo Invalid option! Please select a valid option. pause goto :MainMenu :: Load the latest save :LoadLatestSave cls echo ===================================================== echo Loading the latest save file... echo ================================ Download SteamCMD from here.
SteamCMD: https://developer.valvesoftware.com/wiki/SteamCMD
Place SteamCMD.exe in C:\SteamCMD\
Run the batch file and choose the **Install** option to install Factorio.
Once installation is complete, proceed to the configuration section.
Initial Configurations Needed
You’ll need to configure the following files:
C:\\SteamCMD\\steamapps\\common\\Factorio\\data\\server-settings.json
C:\\SteamCMD\\steamapps\\common\\Factorio\\data\\server-adminlist.json
1. server-settings.json{ "name": "The Factory Must Grow", "description": "Friends Welcome", "tags": [ "game", "tags" ], "_comment_max_players": "Maximum number of players allowed, admins can join even a full server. 0 means unlimited.", "max_players": 0, "_comment_visibility": [ "public: Game will be published on the official Factorio matching server", "lan: Game will be broadcast on LAN" ], "visibility": { "public": true, "lan": true }, "_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public", "username": "username", "password": "password", "_comment_token": "Authentication token. May be used instead of 'password' above.", "token": "", "game_password": "password", "_comment_require_user_verification": "When set to true, the server will only allow clients that have a valid Factorio.com account", "require_user_verification": true, "_comment_max_upload_in_kilobytes_per_second": "optional, default value is 0. 0 means unlimited.", "max_upload_in_kilobytes_per_second": 0, "_comment_max_upload_slots": "optional, default value is 5. 0 means unlimited.", "max_upload_slots": 5, "_comment_minimum_latency_in_ticks": "optional one tick is 16ms in default speed, default value is 0. 0 means no minimum.", "minimum_latency_in_ticks": 0, "_comment_max_heartbeats_per_second": "Network tick rate. Maximum rate game updates packets are sent at before bundling them together. Minimum value is 6, maximum value is 240.", "max_heartbeats_per_second": 60, "_comment_ignore_player_limit_for_returning_players": "Players that played on this map already can join even when the max player limit was reached.", "ignore_player_limit_for_returning_players": false, "_comment_allow_commands": "possible values are, true, false and admins-only", "allow_commands": "admins-only", "_comment_autosave_interval": "Autosave interval in minutes", "autosave_interval": 10, "_comment_autosave_slots": "server autosave slots, it is cycled through when the server autosaves.", "autosave_slots": 5, "_comment_afk_autokick_interval": "How many minutes until someone is kicked when doing nothing, 0 for never.", "afk_autokick_interval": 0, "_comment_auto_pause": "Whether should the server be paused when no players are present.", "auto_pause": true, "_comment_auto_pause_when_players_connect": "Whether should the server be paused when someone is connecting to the server.", "auto_pause_when_players_connect": false, "only_admins_can_pause_the_game": true, "_comment_autosave_only_on_server": "Whether autosaves should be saved only on server or also on all connected clients. Default is true.", "autosave_only_on_server": true, "_comment_non_blocking_saving": "Highly experimental feature, enable only at your own risk of losing your saves. On UNIX systems, server will fork itself to create an autosave. Autosaving on connected Windows clients will be disabled regardless of autosave_only_on_server option.", "non_blocking_saving": false, "_comment_segment_sizes": "Long network messages are split into segments that are sent over multiple ticks. Their size depends on the number of peers currently connected. Increasing the segment size will increase upload bandwidth requirement for the server and download bandwidth requirement for clients. This setting only affects server outbound messages. Changing these settings can have a negative impact on connection stability for some clients.", "minimum_segment_size": 25, "minimum_segment_size_peer_count": 20, "maximum_segment_size": 100, "maximum_segment_size_peer_count": 10 }
2. server-adminlist.json
["username1", "username2"]
For example:
["ghostwheel", "Coolguy2000"]
This file must be manually created if you want admin privileges.
NotesIf you want the server to appear in the public browser, ensure your Factorio.com credentials are correct in the `username` and `password` fields. You can find them on the Factorio website under your account settings.
"username": "username", "password": "password",
Example:
"username": "coolguy2000", "password": "Beanz$",
Extras
If you want to customize further, you can.
Command to have your server start on Windows startup.
**Make the server start on Windows startup:**
schtasks /create /tn "FactorioServer" /tr "/"C:/Factorio/bin/x64/factorio.exe/" --start-server-load-latest --server-settings /"C:/steamcmd/steamapps/common/Factorio/data/server-settings.json/" --server-adminlist /"C:/steamcmd/steamapps/common/Factorio/data/server-adminlist.json/"" /sc onstart /rl highest
**Disable the scheduled task:**
schtasks /change /tn "FactorioServer" /disable
Source: https://steamcommunity.com/sharedfiles/filedetails/?id=3415327368
More Factorio guilds
- All Guilds
- Factorio Guide 1278
- Useful checkboxes in the interface settings (ENG)
- Achievements Factorio
- Factorio Guide 1258
- How to beat spoiling!
- Factorio Guide 1246
- Devenez un pro de Factorio en 5 minutes
- The Curse of "SIGSEGV"
- Guide to Legendary Quality