• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tool] open.mp server for Raspberry Pi (arm64) - 1.6.7
#1
open.mp server for Raspberry Pi
Native 64-bit ARM build - no emulation, no compiling on the Pi

A native linux/arm64 build of the open.mp server is now available for hosting on a Raspberry Pi 4 or 5. It is the regular upstream server with a few small additions that build and package it for the Pi; nothing else is changed. Download it, unpack it and run it.

Download
open.mp 1.6.7 (build 3224) for Raspberry Pi - GitHub release

Requirements
  • Raspberry Pi 4 or 5
  • 64-bit Raspberry Pi OS, bookworm or newer (uname -m should print aarch64). 32-bit Raspberry Pi OS is not supported.
  • Other 64-bit ARM Linux boards with glibc 2.36 or newer should also work, but are untested.

Install
On the Pi:
Code:
curl -LO https://github.com/Pi-Andreas/omp-server-raspberrypi/releases/latest/download/open.mp-linux-arm64.tar.gz tar -xzf open.mp-linux-arm64.tar.gz cd omp-server ./omp-server --default-config

Then:
  1. Copy the gamemode .amx into gamemodes/ and add it to pawn.main_scripts in config.json (e.g. "mygamemode 1").
  2. Change rcon.password from changeme. The server will not start while it is still the default.
  3. Run ./omp-server. Players connect on UDP 7777; forward that port on the router to make the server public.

Existing .amx files work unchanged. Compiled Pawn scripts are platform independent, so nothing needs recompiling for the Pi.

Run it at boot
The folder includes omp-server.service. Set the user and paths in it (it assumes user pi and /home/pi/omp-server), then:
Code:
sudo cp omp-server.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable --now omp-server
Logs: journalctl -u omp-server -f

How many players can a Pi handle?
Measured on a Raspberry Pi 4 (1.8 GHz, 1 GB) with server-side NPCs constantly moving around a 1 km area of Los Santos. The server's game loop runs on one core, so the figure that matters is the share of one core:
  • Idle: 0.5% of a core, 96 MB RAM
  • 100 moving NPCs: 3.8% of a core, 145 MB
  • 200 moving NPCs: 7.9% of a core, 153 MB
  • 400 moving NPCs: 11% of a core, 169 MB
  • 990 moving NPCs: 42% of a core, 219 MB (the Pi stayed at 40 °C, no throttling - with aluminium heat sink case -- passive cooling)
Real players cost more than NPCs (networking and gamemode scripts on top), so the estimates below allow 3-5 times the NPC cost per player.

Bandwidth (estimated from the sync protocol) is usually the real limit on a home connection, not the Pi:
  • Spread-out servers (RP, freeroam): about 60 kbit/s of upload per player, so ~6 Mbit/s for 100 players.
  • Crowded servers (DM, events): about 150-250 kbit/s per player, so ~15-25 Mbit/s for 100 players.
  • Download is small: about 25-30 kbit/s per moving player.

Which Raspberry Pi to use
  • Raspberry Pi 4 (2 GB) - best value. Comfortable for about 150-200 players with a typical gamemode. 1 GB is enough for the server alone; take 4 GB if MySQL runs on the same Pi.
  • Raspberry Pi 5 (4 or 8 GB) - roughly 2-3 times a Pi 4 per core, for 300+ players, script-heavy gamemodes or MySQL on the same Pi. Needs the 27 W supply and active cooling.
  • Raspberry Pi 3B / 3B+ - small servers, up to about 50 players (64-bit OS required).
  • Pi Zero 2 W - not recommended: 512 MB and Wi-Fi only.
Use wired Ethernet, the official power supply (under-voltage throttles the CPU) and a heatsink or fan for long sessions.

Track your own server's usage
The download includes omp-usage.py, a small tracker that logs players online, server CPU and RAM, upload/download, temperature and throttling every minute:
Code:
./omp-usage.py record & ./omp-usage.py report
Once real players have been on, the report shows the actual cost per player on that Pi and how many players it can take. omp-usage.service runs it at boot.

Good to know
  • Plugins: only Linux arm64 .so plugins load. Most legacy SA-MP plugins only ship 32-bit x86 builds and will not work on the Pi. Pure Pawn gamemodes and the built-in open.mp components work fine.
  • MySQL: omp-MySQL 1.0.2 ships a Raspberry Pi build (mysql-linux-arm64.zip), tested on this server against MySQL 8.4 over TLS 1.3.
  • Bug fix included: ./omp-server --default-config crashed (a null pointer in the NPC component) after writing the config. This build fixes that.

Source / build it yourself
The repo is a fork of upstream open.mp, so every difference is visible: compare with upstream.
It builds with Docker on any machine (natively on an Apple Silicon Mac or other arm64 host): github.com/Pi-Andreas/omp-server-raspberrypi

All credit for the server itself goes to the open.mp team. This is an unofficial community build, so problems with it should not go to them; report them in this thread with the Pi model, OS version and server log
Away
  Reply
#2
This is weird, not only our source code already has tools for it to happen (our docker files already support different architectures), we even have nightly builds for Linux ARM architectures. So I have no idea why yours is needed or even useful
  Reply