Setting Up a Dedicated Factorio Server: A Comprehensive Guide
Introduction
Prerequisites
- Network Configuration: Factorio uses UDP port 34197 by default. Ensure this port is open and forwarded in your router settings to allow external connections.
Setting Up on Windows
- Download Factorio:
- Visit the Factorio Downloads page[www.factorio.com] and download the latest version suitable for your system.
- Extract Files:
- Extract the downloaded files to a directory of your choice, e.g., C:\\FactorioServer.
- Create a Save File:
- Launch Factorio, set up your desired game settings, and save the game.
- Place the save file in the saves folder within your Factorio directory.
- Configure the Server:
- Navigate to the data folder and locate server-settings.example.json.
- Copy and rename it to server-settings.json.
- Edit this file to configure server settings such as name, description, and password.
- In the Factorio directory, create a new text file named start-server.bat.
- Add the following line, replacing YourSaveFile.zip with the name of your save file:
Setting Up on Linux
- Open a terminal and run:
- Create a User for Factorio:
- It's advisable to run the server under a dedicated user:
- Download and Extract Factorio:
- Navigate to /opt and download the headless server:
- Set Permissions:
- Assign ownership to the Factorio user:
- Configure the Server:
- Similar to the Windows setup, edit the server-settings.json file located in /opt/factorio/data.
- Create a Systemd Service:
- Create a service file for Factorio:
Example Batch Scripts
- Linux Shell Script (start-server.sh):
Additional Tips
- Mod Support: To add mods, place them in the mods folder within your Factorio directory.
- Backups: Regularly back up your save files to prevent data loss.
- Troubleshooting: Check logs for errors and ensure all required ports are open for external connections.
---
By following this guide, you can set up and manage a dedicated Factorio server with ease, ensuring smooth multiplayer gameplay for you and your friends. Happy building!
This guide was created by its original author on the Steam Community. Are you the author and want it removed? Request removal.