Docs / Multiplayer / Dedicated server
Configuration reference
server.cfg is key = value, one per line. Lines starting with # are comments. Flags take 1/0 (also true, yes, on).
Two defaults are given when they differ: the value in a newly written file, and what a missing key means (for a server.cfg from an older version).
Name and map#
| Key | Default | What it sets |
|---|---|---|
| name | openOMSI server |
Shown in the players' server list and when they join. |
| motd | Welcome! Drive safely. (missing: empty) |
Message of the day. |
| map | maps/Berlin-Spandau/global.cfg |
The map, relative to the OMSI 2 folder. Maps in the content folder are found too. |
| date | empty | Start date YYYY-MM-DD. Empty: today. |
| time | 08:00 |
Start time of day. |
| weather | empty | A .owt file of the OMSI 2 folder. Empty: the map's default. cycle: one weather after another through the day, as the month allows. |
| radius | 0 |
Tiles around the map's first entry point kept loaded. 0: the whole map. |
server-icon.png beside server.cfg is the icon in the players' list: a PNG, 64x64, under 256 KB.
Clock and weather#
| Key | Default | What it sets |
|---|---|---|
| time_speed | 1 |
How fast the clock runs, 1 to 30. |
| real_time | 0 |
1: the clock follows the machine's real date and time. time, date, time_speed and the admins' clock are then ignored. |
| metar_sync | 0 |
1: the weather follows an airport's real METAR report. The server downloads it every ten minutes and passes it on, so players need no METAR sync of their own. Admins cannot change the weather then. |
| metar_station | empty | The airport's ICAO code, for example EDDB. Empty: the one nearest the map. |
Traffic and passengers#
| Key | Default | What it sets |
|---|---|---|
| traffic | 30 |
Random AI cars. Capped at the game's own maximum. |
| timetable | 1 |
Timetable buses. |
| passengers | 1 |
People at the stops and on the pavements, on or off for the whole run. A number is not a count: passengers = 50 reads as off. |
| passenger_density | 1 (missing: the machine's settings.cfg) |
How many people, as a factor on the map's own demand (below). 0 to 3. |
| ai_drive_through_parked | 0 |
1: the AI drives on through a parked car standing in its lane, as OMSI 2's does. 0 stops behind it and goes round when it can. Use 1 on maps where a parked car blocks a lane with no way round. |
| speed_limit_kmh | 0 |
Optional roleplay speed limit: 0 (off), 60, 75 or 80 (below). |
AI limits#
These override the machine's settings.cfg for this server. Empty: settings.cfg decides. They are for the whole server, not per player: with players all over the map, raise them (and the CPU) with the players.
| Key | Range | What it sets |
|---|---|---|
| ai_unsched_factor | 0 to 300 | Random traffic, percent of the map's density (100 = as the map says). |
| ai_max_scheduled | 0 to 4096 | Timetable vehicles on the road at once. 0: no limit. |
| ai_max_parked | -1 to 100000 | Parked cars in the loaded tiles. 0: every space. -1: none. |
| ai_max_humans | 1 to 4096 | People at once: waiting, walking and riding. |
A value out of range is ignored with a warning in the log.
Passenger density#
passenger_density multiplies the map's own demand: the hourly [trafficdensity_passenger] of its global.cfg and each stop's numbers. The map's busy and quiet hours stay as they are.
1is what the map says,0.5half,2twice.0brings no new people, but those already waiting, walking or riding stay.passengers = 0switches them off.- It is not a cap on how many people there are (that is
ai_max_humans). It does not changetrafficor the timetable. - It is the same factor as the game's own
pax_densitysetting. - A value that is not a number from 0 to 3 is refused with the reason in the log, and the server runs as if the key were missing.
Admins change it while the server runs with passengers <factor>. Nobody already there is removed.
Speed limit#
speed_limit_kmh asks every player's game to hold their bus under 60, 75 or 80 km/h. Any other value logs a warning and turns the limit off.
- The game reduces the throttle progressively in the last 5 km/h. Above the limit, a small braking assist counters downhill speed.
- Steering, reverse and normal braking work as usual. The speed is never clamped abruptly.
- Games ask the server for the limit regularly, also after reconnecting. Older games ignore it.
Network#
| Key | Default | What it sets |
|---|---|---|
| port | 27015 |
UDP port of the session. The same number on TCP carries the mods and players' buses. |
| web_port | 27025 |
TCP port of the web gateway: status, icon, WebSocket players, web panel. If it is taken, the server picks another and logs which. |
| max_players | 16 |
Player limit, 1 to 64. |
| tunnel | 1 |
Start a free Cloudflare quick tunnel in front of the web port and print its https://….trycloudflare.com address. The game downloads cloudflared if needed. |
| public_address | empty | Where players reach the web port without the tunnel (below). |
| gateway_proxy_header | x-forwarded-for |
How a reverse proxy on this machine names a WebSocket player's address: x-forwarded-for or cf-connecting-ip (below). |
Public address#
A quick tunnel drops its connections now and then. A game joining through the tunnel therefore first tries the server's direct web address.
- Empty: found automatically. This is the machine's own internet address when it has one. Otherwise it is the address the internet sees, if the server can reach itself there (not behind a carrier's NAT).
1.2.3.4:27025orplay.example.org:27025: your own.off: told to nobody.
The address is shown to whoever asks the server's status.
Players and content#
| Key | Default | What it sets |
|---|---|---|
| vehicles | empty | The buses players may drive, separated by ; (below). Empty: every bus on the server (and with accept_uploads = 1, any bus a player has). |
| accept_uploads | 1 |
Take the buses of players who drive one the server lacks, and pass them on (Uploads). |
| uploads_keep_days | 30 |
Days an uploaded bus nobody drives is kept, 1 to 3650. |
| parked_buses | 0 |
How many uploaded buses stand parked in the world for any player to take (below). 0 to 536. Needs accept_uploads = 1. |
| share_maps | 0 (missing: 1) |
A player who joins without the server's map gets it from the server, with everything it uses (below). |
| share_positions | 0 |
GET /players on the web port tells anyone the players' names, buses, lines and positions (below). |
| share_ai | 0 |
GET /buses on the web port tells anyone where the AI timetable buses are, with line, tour, trip and destination (below). No player data. |
| allow_player_teleport | 0 |
1: every player may teleport their own bus (F4 map, navigator map, start points). 0: only admins and moderators. It never moves another player. |
| plugins | empty | Plugins of the openOMSI plugin catalog the server suggests, by their catalog ids, separated by ; (below). |
Allowed buses#
vehicles takes bus files (Vehicles/MAN_SD200/MAN_SD77.bus) or bus folders (Vehicles/MAN_SD200 or MAN_SD200, meaning every bus directly in that folder).
Slashes or backslashes and any case are fine.
- The players' launcher offers only these buses, and so do the game's Place a vehicle and Swap menus.
- A player who drives another bus is sent away and told the list.
- The server announces these buses with their paint schemes (the first 256). Players who lack one can download it after they confirm (Playing together). A first start checks every file and can take minutes for a large list. The web port is open meanwhile.
Suggested plugins#
plugins = speed-warning; org.example.dispatcher names plugins of the openOMSI plugin catalog that suit the server: a dispatcher, a fare system, a radio. The server's status page tells their ids, and nothing else of them.
- When a player selects the server in the launcher, the launcher looks the ids up in the catalog and shows the plugins the player does not have, with the catalog's own name, author, licence, description and a link to the code. The player may install each one, or go on without them.
- They are installed from the catalog, never from the server: a server sends no plugin code at all, and an id the catalog does not have is only named, never offered.
- Nothing is required. A player without the plugins plays as usual.
- A suggested plugin runs in the sandbox like any other. A server cannot give a plugin full access (Full access); only each player can, on their own computer.
Ids are lower-case letters, digits, ., _ and -, at most 64 characters; up to 16 are told.
Sharing the map#
With share_maps = 1, a player who joins without the server's map downloads it and everything it uses: objects, splines, vehicles. For a big map that is gigabytes.
With 0, players install the map themselves and are told which one is missing. The server's bandwidth then goes to the players' buses.
To put a map on the server with everything it uses, pack it into the server's content folder:
openomsi --root "/path/to/OMSI2" --pack-map "<map name>" --pack-to contentOn the same disk, files go in as hard links and take no extra space. --pack-to map.zip makes a zip for another machine.
Files the map names that do not exist are listed in openomsi-map-pack-<map>.txt in the target folder.
Parked buses#
With parked_buses above 0, buses that players uploaded stand in the world when nobody drives them, where their last driver left them (also after a restart).
Any player who walks up to one takes it with the key that takes a seat. At most this many stand, one of each bus.
A game is told only the ones near its player. Players on an older release see them as other players' parked buses and cannot take them.
Administration keys#
| Key | Default | What it sets |
|---|---|---|
| admin_password | empty | Password of the admin role. At least 12 characters. Empty: no admin. |
| moderator_password | empty | Password of the moderator role. At least 12 characters. Empty: no moderators. One equal to admin_password gives the admin role. |
| admin_web | local (missing: off) |
Who reaches the web panel: local, remote or off (Web panel). |
| admin_web_origins | empty | Other https:// sites whose pages may use the admin API, separated by ;. |
| admin_trusted_proxies | empty (this machine) | Proxies whose word about a request's source is believed, separated by ;. |
| admin_proxy_header | x-forwarded-for |
The header those proxies name the client in: x-forwarded-for (last address), x-real-ip or cf-connecting-ip. |
A shorter password lets nobody in, and the log says so. With admin_web = remote, both passwords need 16 characters, or the panel stays local.
Voice chat#
| Key | Default | What it sets |
|---|---|---|
| voice | 1 (missing: 0) |
Voice chat at all. Players must also switch it on themselves. |
| voice_radio | 1 (missing: 0) |
The session-wide radio channel. 0 leaves only the nearby channel. |
| voice_range | 75 |
How far the nearby channel carries, 5 to 1000 m. |
The server passes voice on without decoding it and needs no audio device. See Voice chat.
Old keys voice_server_uid, voice_channel and voice_channel_password are ignored, and the log says so.
Public list and bans#
| Key | Default | What it sets |
|---|---|---|
| public_server | 0 |
1: list the server in the public server list (Public server list). |
| public_list_url | empty | The list service's https:// address. Empty: openOMSI's own. Not in the written file. |
| owner_bans | empty | The owner's ban list file, shared by all your sessions. Empty: ~/.openomsi/bans-owner.json. |
| require_hardware_id | 0 |
1: turn away players whose game sends no machine identifier. |
Logs and privacy#
| Key | Default | What it sets |
|---|---|---|
| log_addresses | 0 |
1: write the players' internet addresses whole in the log (for an abuse report). 0: a public address keeps only its network (203.0.113.x). |
| log_keep | 5 |
Earlier server.log files kept (server.1.log is the newest). 0 keeps none. |
| log_max_mb | 20 |
A new server.log is begun past this size. 0: no limit. |
log_keep and log_max_mb are applied by run-server and start.sh. See What the server keeps.
Something wrong or missing? Fix it on GitHub or open an issue.