TürkiyeVPS

How to Host a SA-MP Server on Linux with open.mp: Step-by-Step Guide

Set up your GTA San Andreas Multiplayer (SA-MP) server on Ubuntu 24.04 with open.mp: server files, config.json settings, loading a gamemode, port 7777, a systemd service, plugins and fixes for common errors.

8 min read

SA-MP, the multiplayer mod for GTA San Andreas, is still alive after many years, with roleplay (RP), freeroam, drift and racing servers especially popular in Turkey and Russia. The original SA-MP server software is no longer developed; today most new servers run open.mp (Open Multiplayer), which is open source, actively developed and backwards compatible with SA-MP. In this guide we set up a SA-MP server with open.mp on Ubuntu 24.04.

Summary: download the Linux server package from open.mp's GitHub page and extract it, install the required 32-bit libraries, set the server name, RCON password and gamemode in config.json, open port 7777/UDP and run omp-server as a systemd service. Players can connect with the regular SA-MP 0.3.7 client or the open.mp launcher.

SA-MP or open.mp?

SA-MP (original) open.mp
Development Stopped Active, open source
Gamemodes (Pawn .amx) Work The vast majority of SA-MP gamemodes work unchanged
Old plugins (.so) Work Most work as "legacy plugins"
Client SA-MP 0.3.7 / 0.3.DL Same clients + the open.mp launcher
Config file server.cfg config.json

If you're starting a new server, open.mp is the sensible choice: bug fixes and new features keep coming, and you can bring your existing SA-MP gamemode with you.

How many resources do you need?

  • CPU: The server mostly uses a single core. As your gamemode gets more complex and the player count grows, single-core performance becomes important. On servers whose CPU is shared with other customers, lag can appear at peak hours; choose a server with dedicated vCPUs.
  • RAM: The server itself is lightweight. 2 GB is enough for a small to medium server. If you also run a MySQL/MariaDB database on the same machine (common for RP servers), 4 GB is more comfortable.
  • Disk: The server files are small; leave a few GB for logs, the database and backups.
  • Public IP: For players to connect directly and for the server to appear in server lists, it needs its own public IPv4 address. A server behind a shared (NAT) IP is not suitable.

1. Prepare the system

Connect to your server over SSH. The open.mp Linux server is a 32-bit program; enable the i386 architecture and install the required libraries:

sudo dpkg --add-architecture i386
sudo apt update && sudo apt upgrade -y
sudo apt install -y libc6-i386 lib32gcc-s1 lib32stdc++6 curl tar tmux

Don't run the server as root; create a separate user:

sudo adduser --disabled-password --gecos "" samp

2. Download the open.mp server files

Switch to the samp user:

sudo -iu samp

Download the Linux package of the latest release (open.mp-linux-x86.tar.gz) from the Releases section of open.mp's GitHub page. You can open github.com/openmultiplayer/open.mp/releases in your browser, copy the file's link and download it on the server like this:

curl -LO "https://github.com/openmultiplayer/open.mp/releases/download/VERSION/open.mp-linux-x86.tar.gz"
tar -xzf open.mp-linux-x86.tar.gz
ls ~/Server

Replace VERSION with the current release tag from the page. The archive extracts into a folder called Server. Inside are the server program omp-server, the config file config.json and these folders:

Folder Contents
gamemodes/ Gamemodes (compiled .amx files)
filterscripts/ Extra scripts that run alongside the gamemode
plugins/ Old SA-MP plugins (.so for Linux)
components/ open.mp components
scriptfiles/ Files the gamemode reads and writes

Make sure the program file is executable:

chmod +x ~/Server/omp-server

3. config.json settings

The server settings are in config.json:

nano ~/Server/config.json

The file contains many settings; these are the important fields to change at the start:

{
    "name": "My SA-MP Server",
    "max_players": 50,
    "password": "",
    "announce": true,
    "language": "English",
    "website": "example.com",
    "network": {
        "port": 7777
    },
    "rcon": {
        "enable": true,
        "password": "AStrongRconPassword"
    },
    "pawn": {
        "main_scripts": ["mygamemode 1"],
        "side_scripts": [],
        "legacy_plugins": []
    }
}

This is only an example showing the important fields; instead of deleting the whole file and pasting this, edit the matching lines in your own file.

Setting What it does
name The name shown in the server list
max_players Maximum number of players at the same time
password If set, only players who know the password can join
announce Whether the server appears in public server lists
network.port The port players connect to (default 7777)
rcon.password The remote administration password; must be strong and unique
pawn.main_scripts The gamemode to run: file name without the .amx extension, plus the repeat count
pawn.side_scripts Extra scripts, for example "filterscripts/admin"
pawn.legacy_plugins Old SA-MP plugins to load

4. Upload your gamemode

open.mp runs gamemodes written in the Pawn language. If you use a ready-made gamemode, put the compiled .amx file into gamemodes/ and write its name in main_scripts. For example, if your file is gamemodes/mygamemode.amx, the setting is "mygamemode 1".

If you start from source code (.pwn), compile the gamemode on your own computer with open.mp's Pawn compiler and include files, then upload the resulting .amx file to the server. To copy files from your computer to the server you can use scp or an SFTP program (for example FileZilla or WinSCP):

scp mygamemode.amx samp@SERVER_IP:/home/samp/Server/gamemodes/

If your gamemode uses plugins such as the MySQL plugin, sscanf or streamer, put their Linux builds (.so) into plugins/ and add their names to legacy_plugins (for example "mysql", "sscanf", "streamer"). .dll files built for Windows don't work on Linux. Only install plugins and gamemodes from sources you trust; files of unknown origin can open a backdoor into your server.

5. Open the firewall

Go back to your own user (exit). In SA-MP, game traffic, server list queries and RCON all use the same 7777/UDP port:

sudo ufw allow OpenSSH
sudo ufw allow 7777/udp
sudo ufw enable

6. Start the server for the first time

Do the first run inside a tmux session:

sudo -iu samp
tmux new -s samp
cd ~/Server
./omp-server

You should see the gamemode and plugins load in the console. If something fails, check log.txt. Press Ctrl+B, then D to leave the tmux session; the server keeps running.

To join, add SERVER_IP:7777 in the SA-MP client or the open.mp launcher.

7. A systemd service: start the server automatically

Stop the server in tmux (tmux attach -t samp, then Ctrl+C), go back to your own user and create the service file:

sudo nano /etc/systemd/system/samp.service
[Unit]
Description=SA-MP (open.mp) server
After=network-online.target mariadb.service
Wants=network-online.target

[Service]
User=samp
WorkingDirectory=/home/samp/Server
ExecStart=/home/samp/Server/omp-server
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable the service and follow the logs:

sudo systemctl daemon-reload
sudo systemctl enable --now samp
sudo journalctl -u samp -f

The server now starts on every boot and restarts within 10 seconds if it crashes. If you don't use a database, you can remove mariadb.service from the After= line. For user and service management, see also our server management commands article.

8. A database (for RP servers)

Most roleplay gamemodes store player accounts, vehicles and houses in MySQL/MariaDB. You can install MariaDB on the same server:

sudo apt install -y mariadb-server
sudo mysql_secure_installation

Create a separate database for the gamemode and a user that can only connect from localhost; don't open the database port (3306) to the internet. Player data is the most valuable part of your server: back up the database and the scriptfiles/ folder off the server regularly. You can use our VPS backup with restic guide for that.

Security

Never share the RCON password; RCON gives full control of the server. Set up in-game admins with your gamemode's own permission system. Use keys instead of passwords for SSH, keep the system updated and don't run the server as root. For the basics, see our Linux server security guide.

TürkiyeVPS game servers for SA-MP

Our game server plans are in Istanbul and come with dedicated vCPUs on an Intel Core i5-10400F, guaranteed RAM, 60–100 GB of disk, your own IPv4 address, unmetered speed, 3 TB of traffic per month and root access; the server is set up automatically after payment. For a small to medium SA-MP server Oyun VDS 1 (2 vCPU, 2 GB RAM, 60 GB disk) is enough; if you'll run an RP server with MariaDB on the same machine, Oyun VDS 2 with 4 GB RAM is more comfortable. Our standard VPS plans don't include a dedicated public IPv4 address, so they aren't suitable for a game server that players connect to directly. Payments are accepted in USDT (TRC20). If you want a GTA V server instead, see our FiveM server setup guide.

Frequently Asked Questions

Is hosting a SA-MP server free?

The open.mp server software is open source and free; no license key or token is required. You only pay for the machine the server runs on.

Will my old SA-MP gamemode work on open.mp?

The vast majority of gamemodes written for SA-MP work unchanged. Old plugins are loaded via legacy_plugins. Some old plugins' functionality is built into open.mp as components, so they may not need to be loaded separately; if you run into problems, check the warnings in log.txt.

How much RAM does a SA-MP server need?

The server itself uses little memory; 2 GB is enough for a small to medium server. For RP servers running MySQL/MariaDB on the same machine, 4 GB is recommended. Single-core performance and a public IP address matter more than RAM.

My server doesn't appear in the list or players can't connect. What should I do?

First check with sudo ufw status that port 7777/UDP is open, and that announce is true in config.json. The server must have its own public IPv4 address. If the server doesn't start at all, look at the error lines in log.txt; the most common causes are missing 32-bit libraries and plugins built for Windows.

Can I run several SA-MP servers on the same machine?

Yes. Use a separate folder, a different port in config.json (for example 7777 and 7778) and a separate systemd service for each server. Don't forget to add a firewall rule for each port.