openOMSI GitHub Discord
Dedicated server

Docs / Multiplayer / Dedicated server

Quick start

2 min readEdit this pagedocs/SERVER.md

On this page
  1. 1. Download
  2. 2. Run the guided start script
  3. 3. Or start it directly
  4. 4. Minimal configuration
  5. 5. Connect
  6. 6. Open the firewall

1. Download#

Every release has ready server packages:

Package System Start script
openOMSI-<version>-server-linux-x64.zip Linux x86-64 start.sh, run-server.sh
openOMSI-<version>-server-linux-arm64.zip Linux ARM64 start.sh, run-server.sh
openOMSI-<version>-server-windows-x64.zip Windows 10/11, Server 2016 or later start.cmd, run-server.cmd
openOMSI-<version>-server-windows-arm64.zip Windows on ARM start.cmd, run-server.cmd

Unpack it into a folder of its own. You also need a complete original OMSI 2 installation on that machine, the same one the players have. Put the server's mods into the OMSI 2 folder's Vehicles, maps, Sceneryobjects … as in the game's content folder.

To build the same package yourself on Linux: scripts/build-server.sh [folder] (into dist/server by default).

2. Run the guided start script#

The easiest way is the script that asks:

  • Windows: double-click run-server.cmd.
  • Linux: run ./run-server.sh.
  1. The first time, it asks for the OMSI 2 folder and checks that it is a complete installation.
  2. It asks for the main settings: name, maximum players, UDP port, web port, the tunnel and the admin password (typed hidden, at least 12 characters). The current value is shown in brackets. Enter keeps it.
  3. Every time, it lists the installed maps by number. The last one is marked; Enter takes it.
  4. It starts the server on that map. Output goes to the window and to server.log.
  5. Once per map it offers to create start-<map>.cmd (or .sh), which starts that map again with no questions.
Option Does
run-server.cmd -Setup / run-server.sh --setup Ask for the folder and settings again.
run-server.cmd -Map maps/<folder>/global.cfg / run-server.sh --map … Start this map with no questions.

The script remembers the folder, the last map and its shortcuts in run-server.conf. It does not change map in server.cfg. It speaks Portuguese on a Portuguese system and English otherwise. It needs no administrator rights. On Windows it runs in the built-in Windows PowerShell. When the server stops on an error, the script says what the exit code means.

3. Or start it directly#

shell
./start.sh /path/to/OMSI2 [server.cfg]
start.cmd C:\path\to\OMSI2 [server.cfg]

Both run:

shell
openomsi --root /path/to/OMSI2 --server /path/to/server.cfg

A missing server.cfg is written with its defaults and a comment for every key on the first start. start.sh writes the output to server.log too. start.cmd shows it in its window only.

4. Minimal configuration#

Edit server.cfg beside the script. For a first server, these keys are enough:

name = My openOMSI server
motd = Welcome! Drive safely.
map = maps/Grundorf/global.cfg
max_players = 16
admin_password = a-long-password-here

Restart the server after changing server.cfg.

5. Connect#

The server prints its addresses when it starts. Players join in the launcher on Servers → Use a server address:

  • <server address>:27015 (UDP), or
  • the https://….trycloudflare.com address the server printed (with tunnel = 1, the default).

On the same machine, use 127.0.0.1:27015.

6. Open the firewall#

Port Protocol Used for
27015 (port) UDP The session
27015 (port) TCP The server's mods and the players' buses
27025 (web_port) TCP Status, icon, WebSocket players, web panel

On a server on the internet, open all three. With the tunnel, players can also come in through it with no ports open.

Something wrong or missing? Fix it on GitHub or open an issue.

↑↓ to move↵ to open