Hong Kong VPS · September 30, 2025

Set Up a Low‑Latency Factorio Server on a Hong Kong VPS

Running a reliable, low‑latency Factorio server for collaborators, public communities, or corporate demo environments requires more than just launching the game binary. Network topology, VM selection, operating system tuning, process isolation, and automated operations all affect latency and player experience. This article explains how to set up a low‑latency Factorio server on a Hong Kong VPS with practical, technical steps and rationale — and compares tradeoffs versus US VPS/US Server options for different use cases.

Why choose a Hong Kong VPS for Factorio?

Factorio servers are latency‑sensitive: frequent small packets and tight tick synchronization make round‑trip times (RTT) and jitter highly visible to players. For communities or teams based in East and Southeast Asia, a Hong Kong Server typically delivers significantly lower latency than a US Server. If most players are local to Hong Kong, Singapore, Taiwan, or southern China, colocating the server in Hong Kong minimizes geographic RTT and reduces packet loss risk on long transpacific hops.

That said, for mostly North American audiences, a US VPS still makes sense. Choose your server region based on player distribution — a central rule for multiplayer games.

Overview: Factorio server architecture and traffic

Factorio runs a headless server binary that handles world simulation and network traffic. Key characteristics:

  • Protocol: primarily UDP for game packets (default port 34197 UDP). Some administrative tools or mods may open TCP ports for web admin or RCON-like interfaces.
  • CPU bound: the simulation tick is single‑threaded for the main game loop; heavy scenarios and many players/entities benefit from high clock speed and low host contention.
  • I/O: periodic map autosaves and mod writes, so stable disk performance and consistent IOPS matter.
  • Persistence: world saves are binary files; safe rotation and atomic saves are important to avoid corruption.

VPS selection and virtualization considerations

For a low‑latency Factorio server on a Hong Kong VPS, prioritize:

  • Dedicated vCPU or CPU pinning — avoid noisy neighbor interference. Choose plans that advertise dedicated vCPU or cores.
  • High single‑thread performance — Factorio’s simulation benefits from higher clock speeds more than many cores.
  • Low network jitter and guaranteed bandwidth — check provider SLA for packet loss and burst limits.
  • SSD storage with stable latency — NVMe or high‑end SSD for fast autosaves and map IO.
  • Prefer KVM/QEMU virtualization over containerized bursts if you require predictable CPU scheduling.

Hong Kong vs US VPS: latency tradeoffs

If most players are in Asia, a Hong Kong VPS reduces median RTT by tens to hundreds of milliseconds compared to a US VPS. Conversely, if players are concentrated in North America, choose a US Server for lower latency there. For global audiences, consider multiple regional servers and cross‑server teleport/mod solutions to reduce perceived lag.

System setup: Ubuntu/Debian example

Below is a concise server setup using Ubuntu LTS. Commands assume root or sudo privileges.

1) Create a dedicated user and download the headless server:

sudo adduser --system --group factorio

cd /opt && sudo wget https://www.factorio.com/get-download/latest/headless/linux64 -O factorio_headless.tar.xz

sudo tar -xJf factorio_headless.tar.xz && sudo chown -R factorio:factorio factorio

2) Prepare save directory and initial configuration:

sudo -u factorio mkdir -p /var/lib/factorio

Place your server-settings.json and config files in /var/lib/factorio (Factorio will create defaults on first run).

3) Firewall (ufw / iptables): open game port and administrative ports:

sudo ufw allow 34197/udp

If you use a web admin or RCON mod, open its TCP port as needed (do this only if required and secured).

Example systemd service

Create /etc/systemd/system/factorio.service with the following content (adjust paths and user):

[Unit]
Description=Factorio headless server
After=network.target

[Service]
User=factorio
WorkingDirectory=/var/lib/factorio
ExecStart=/opt/factorio/bin/x64/factorio --start-server-load-latest --server-settings server-settings.json --port 34197 --server-name "My Hong Kong Factorio"
Restart=on-failure
Nice=-5
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target

Then enable and start:

sudo systemctl daemon-reload && sudo systemctl enable --now factorio

Network tuning for low latency

Lower latency often requires OS network parameter tuning to reduce jitter and bufferbloat. Examples (sysctl.conf or temporary via sysctl):

  • net.core.rmem_max=16777216 and net.core.wmem_max=16777216 — allow larger UDP buffers when needed.
  • net.core.netdev_max_backlog=2500 — handles bursts of incoming packets.
  • net.ipv4.tcp_tw_reuse=1 and net.ipv4.tcp_fin_timeout=30 — reduce socket congestion for TCP admin tools.
  • Enable fq_codel or fq for qdisc on the VPS host or within VM if supported: tc qdisc replace dev eth0 root fq — reduces bufferbloat and stabilizes latency.

Note: adjust values conservatively and monitor. Some VPS environments restrict changing network stack parameters.

CPU isolation and process priority

Because Factorio’s simulation is CPU‑bound on a single thread, isolating a core and assigning affinity can reduce jitter:

  • Use isolcpus kernel boot parameter to reserve a core for the game if you control the host kernel (not always possible on shared VPS).
  • Set CPU affinity using taskset: taskset -c 3 /opt/factorio/bin/x64/factorio ...
  • Adjust nice/rtprio: in systemd service above we set Nice=-5; for even higher priority consider real-time scheduling only if safe.

Autosaves, backups and safe restarts

Implement a save rotation and remote backups to prevent data loss and reduce downtime:

  • Configure Factorio autosave frequency in server settings (balance between save time and potential rollback).
  • Use atomic copies and rsync to remote storage: write saves to a temporary location and then move into /var/lib/factorio to avoid incomplete files.
  • Schedule nightly backups to an object store or another VPS and keep several historic versions.
  • Automate graceful restart: use server console command to initiate a save then restart service during low traffic windows.

Monitoring, alerts and autoscaling

For production deployments, integrate monitoring:

  • Metrics: expose /metrics via a small exporter or monitor process CPU, memory, network traffic, and disk I/O.
  • Use Node Exporter + Prometheus + Grafana for dashboards and alerting on latency/jitter spikes.
  • Autoscaling: if you host multiple factorio instances, use a load balancer and scripts that spin up new Hong Kong VPS instances when player counts exceed thresholds.

Security and hardening

Minimize attack surface and protect admin features:

  • Only open UDP 34197 to public; restrict admin/TCP ports to specific IPs via firewall.
  • Run the server as an unprivileged user and keep system packages up to date.
  • Use automated fail2ban rules for SSH and admin endpoints.
  • Regularly audit mods for security and performance impact; poorly written mods can cause lag spikes.

Application scenarios and recommended configurations

Different use cases need different tradeoffs:

  • Small private cooperative (2–8 players): a small Hong Kong VPS with 1–2 dedicated vCPU and 2–4 GB RAM is usually sufficient. Prioritize clock speed and low jitter.
  • Medium public community (10–40 players): choose 2–4 dedicated vCPU, 8–16 GB RAM, and NVMe SSD. Implement monitoring and scheduled restarts.
  • Large persistent worlds (40+ players, many entities/mods): use higher single‑core performance, multiple pinned cores for background tasks (save, mods), and consider splitting into multiple servers or shards.

Advantages of hosting in Hong Kong

Hosting on a Hong Kong Server provides several practical advantages for regional players:

  • Lower RTT and reduced packet loss for East Asian players compared with US VPS/US Server alternatives.
  • Good connectivity to Southeast Asia and mainland China through multiple regional IXs and peering arrangements.
  • Strong datacenter infrastructure with predictable performance and available backups/replication.

Final recommendations

To achieve low latency for a Factorio server on a Hong Kong VPS:

  • Choose a plan with dedicated CPU resources, high single‑thread performance, and NVMe storage.
  • Tune network buffers and use fq/qdisc to mitigate bufferbloat. Monitor network metrics and adjust sysctl values conservatively.
  • Use systemd for reliable service management, schedule safe autosaves and backups, and monitor performance with Prometheus/Grafana.
  • Restrict admin access, audit mods, and plan capacity based on expected concurrent players and entity counts.

Running a well‑tuned Factorio server on a Hong Kong VPS optimizes the player experience for regional audiences and keeps operational overhead low with modern automation and monitoring practices. If your audience is primarily North America, favor a US VPS/US Server for latency; for Asia‑centric communities, the Hong Kong Server location is often the superior choice.

For technical server options and Hong Kong VPS plans that fit the configurations described above, see Server.HK’s Hong Kong VPS offerings: https://server.hk/cloud.php. You can also learn more about the provider at Server.HK.