# How to Install a Factorio Server

How to Install a Factorio Server – Step-by-step guide for your Factorio on NexoraHost.

**Quick answer:** Set up your server step by step – check requirements, install files, configure ports and start the service.

This guide shows you step by step how to set up a Factorio Dedicated Server – both on Linux and Windows. Factorio is known for its extreme performance optimization – even large factories run on modest hardware.

## Requirements

    - **Operating system:** Linux (Ubuntu/Debian) or Windows 10/11 (64-bit)
- **Processor:** 2 cores at 2.0 GHz+ – Factorio is extremely CPU-efficient
- **RAM:** 2-4 GB for vanilla, 4-8 GB for large modpacks
- **Storage:** 5 GB free disk space
- **Network:** UDP port 34197 must be open
- **Factorio license:** A separate Factorio account (the game doesn't need to be purchased – the server can be used separately in headless mode)

## Step 1: Download server files

### Linux

    - Create a folder for the server:
        `mkdir -p ~/factorio && cd ~/factorio`
    
- Download the latest server version (link from the official Factorio website):
        `wget https://factorio.com/get-download/stable/headless/linux64 -O factorio.tar.xz`
    
- Extract the archive:
        `tar -xvf factorio.tar.xz
rm factorio.tar.xz`
    

### Windows

    - Visit the official Factorio website: [factorio.com/download](https://factorio.com/download)
- Download the **Headless Server** version for Windows
- Create a folder (e.g. `C:\factorio-server`) and extract the ZIP there

## Step 2: First start and map generation

Navigate to the server folder and start the server for the first time:

### Linux

`./bin/x64/factorio --create ./saves/my-world.zip --map-gen-settings ./data/map-gen-settings.example.json --map-settings ./data/map-settings.example.json`

### Windows

`factorio.exe --create saves\my-world.zip --map-gen-settings data\map-gen-settings.example.json --map-settings data\map-settings.example.json`

The server generates a new world and saves it in the `saves/` folder.

## Step 3: Adjust server configuration

In the main directory you'll find the file **server-settings.example.json**. Copy it and rename it:

`cp server-settings.example.json server-settings.json`
Open `server-settings.json` and adjust the following settings:

`{
  "name": "My Factorio Server",
  "description": "Welcome to my server!",
  "tags": ["vanilla", "english"],
  "max_players": 10,
  "visibility": {
    "public": true,
    "lan": true
  },
  "username": "",
  "password": "",
  "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": true
}`

**Important settings:**

    - **name / description:** Name and description in the server list
- **tags:** Keywords like "vanilla", "pvp", "modded"
- **max_players:** Maximum number of players
- **game_password:** Password for players (leave empty for public server)
- **autosave_interval:** Autosave interval in minutes (10 is default)
- **non_blocking_saving:** true = game continues running while saving
- **auto_pause:** true = server pauses when no players are online

## Step 4: Start the server

### Linux

`./bin/x64/factorio --start-server ./saves/my-world.zip --server-settings ./server-settings.json`

### Windows

`factorio.exe --start-server saves\my-world.zip --server-settings server-settings.json`

## Step 5: Open firewall ports

Factorio uses **UDP port 34197** by default:

### Linux (UFW)

`sudo ufw allow 34197/udp`

### Windows Firewall (PowerShell as Administrator)

`New-NetFirewallRule -DisplayName "Factorio Server" -Direction Inbound -Protocol UDP -LocalPort 34197 -Action Allow`

Forward the port in your router to your server's local IP address.

## Step 6: Join the server

    - Launch Factorio on your PC
- Click **Multiplayer → Browse Servers** in the main menu
- Search for your server name
- Alternatively: **Direct Connect** and enter server IP with port (e.g. `123.123.123.123:34197`)

## Step 7: Install mods (optional)

Factorio has an integrated mod manager. To install mods on the server:

    - Edit `mod-list.json` in the `mods/` folder
- Set the desired mods to `true`
- The mods are automatically downloaded when the server starts
- Players joining the server download the mods automatically

## Step 8: Set up server as a service (Linux, optional)

So the server starts automatically after a reboot:

`sudo nano /etc/systemd/system/factorio.service`
`[Unit]
Description=Factorio Server
After=network.target

[Service]
Type=simple
User=factorio
WorkingDirectory=/home/factorio/factorio
ExecStart=/home/factorio/factorio/bin/x64/factorio --start-server /home/factorio/factorio/saves/my-world.zip --server-settings /home/factorio/factorio/server-settings.json
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target`
`sudo systemctl daemon-reload
sudo systemctl enable --now factorio`

## Common problems

**Server not showing in the list:**

    - Check if UDP port 34197 is open in firewall and router
- Check `visibility.public` in server-settings.json – must be set to `true`

**Players cannot join:**

    - Check `game_password` – leave empty for public server
- Check if the player has the same Factorio version as the server

**Mods not working:**

    - All players need the same mods – Factorio synchronizes them automatically when connecting
- Check `mod-list.json` for correct entries
