X
X
X
X
All systems operational · 200 Tbps+ DDoS protection active
Sign Up Sign In 08505574494

How to Set Up an MTA:SA Server: Step-by-Step Guide

HomepageArticlesMTA ServerHow to Set Up an MTA:SA Server: Ste...
How to Set Up an MTA:SA Server: Step-by-Step Guide

Setting up an MTA:SA server is a thirty-minute job if you know the right order — and a multi-day trial-and-error marathon if you do not. Multi Theft Auto: San Andreas is the modification that turned GTA: San Andreas into a multiplayer game, and it still has an active community years later. You do not need a huge infrastructure to launch your own roleplay, drift, deathmatch or freeroam server, but you absolutely need the right hosting environment, the correct port configuration and a sane approach to resource management. This guide walks through an MTA:SA server installation from scratch, on both Linux and Windows.

Before you start: what you actually need

An MTA server is a CPU-bound application once player counts rise. The main server loop runs largely on a single core, which makes per-core performance far more important than raw core count. The checklist is short:

  • A server with root access. Shared hosting cannot run an MTA server — shared hosting only serves websites; it will not let you run a persistent game process or listen on custom UDP ports. An MTA server package or a general purpose high-performance VDS is the correct environment.
  • A location close to your players. Ping directly affects playability in MTA. If your community is in Turkey or the surrounding region, an Istanbul location removes latency you would otherwise pay for nothing.
  • A static IP and the ability to open ports. MTA does not use standard web ports; it uses its own UDP and TCP ports.
  • Basic SSH skills. On Linux the whole installation happens in a terminal.

Step 1 — Linux or Windows?

The MTA:SA server runs on both platforms, but if you are building something serious, Linux is the better choice. The reasons are concrete: the server process consumes fewer resources, it is more stable over long uptimes, and automatic restart and backup workflows are far easier to set up. Windows, on the other hand, is more approachable for someone opening their first server, thanks to the graphical interface.

A practical compromise: develop and test locally on Windows, then run the production server on Linux. The configuration files behave identically on both sides, so migrating is not a problem.

Step 2 — Download the server files

The MTA:SA server software is free and comes from the official source. On Linux you need three pieces: the server binaries, the default configuration package and the official resources package. On Windows a single installer covers everything.

The typical Linux flow looks like this:

  1. Create a dedicated user for the server. Never run the MTA server as root.
  2. Download the server archive and extract it into a directory such as /home/mta/.
  3. Inside the extracted folder you will find mods/deathmatch/. Configuration files and resources live here.
  4. Extract the official resources package into mods/deathmatch/resources/.
  5. Place mtaserver.conf and acl.xml from the default configuration package into mods/deathmatch/.

Do not forget to make the binary executable: chmod +x mta-server64.

Step 3 — Configuring mtaserver.conf

The heart of the server is mods/deathmatch/mtaserver.conf. On a fresh installation these are the lines you need to touch:

Identity settings

  • servername — the name shown in the server browser. Keep it short, memorable, and avoid walls of capital letters.
  • serverip — the external IP of the machine. On a single-IP VDS you can usually leave it empty.
  • serverport — the game port, 22003 (UDP) by default.
  • maxplayers — set what your hardware can genuinely handle. An empty 200-slot server looks far worse than a full 60-slot one.

HTTP and download settings

Players download scripts and model files when they connect. Setting httpserver to 1 makes the server's own internal HTTP service handle those downloads (TCP 22005 by default). As your player count grows and you add custom models and sounds, moving those downloads to an external web server via httpdownloadurl both shortens join times and takes load off the game process.

Administrator account

After the first start, create an account from the console with addaccount username password, then add the object user.username to the Admin group inside acl.xml. Skip this step and your server will run perfectly while refusing every single administration command you try.

Step 4 — Understanding resources

In MTA almost everything is a resource: the spawn system, vehicle panels, maps, the admin panel, chat — all of them are Lua-based packages living in their own folders. The official resources package gives you a working baseline; you build your own systems on top of it.

Three console commands you will use constantly:

  • refresh — makes the server aware of changes in the resources folder.
  • start — starts a resource.
  • restart — reloads a running resource; this is the command you will type most often while developing scripts.

Resources that should start automatically go into the resource lines of mtaserver.conf. Make sure the admin resource is on that list.

Step 5 — Run the server in the background

So the server does not die when you close your SSH session, run the process under a session manager. The simplest option is screen or tmux:

screen -S mta ./mta-server64

Detach with Ctrl+A followed by D, reattach with screen -r mta. For a permanent setup the better approach is defining the server as a systemd service, so MTA comes back up automatically after a reboot and restarts itself after an unexpected crash.

Step 6 — Open the ports

Three ports matter for an MTA:SA server to work and to be visible:

  • 22003/UDP — game traffic. Closed means nobody connects.
  • 22005/TCP — internal HTTP download service. Closed means players connect but files never arrive, and they hang on the loading screen.
  • 22126/UDP — server browser (ASE) queries. Closed means your server never appears in the list. This is the single most common mistake.

While opening these ports, keep everything else closed. On a brand-new server, the SSH port, root login and the default password policy are all day-one items.

Step 7 — Get listed in the server browser

Once ase is set to 1 and 22126/UDP is reachable, your server starts appearing in the public list. If it does not show up, check in this order: is the server actually running, is serverip correct, is the port genuinely reachable from outside, and is there a filter on the provider side.

Hardware: how much is enough?

The bottleneck on an MTA server is usually CPU rather than RAM — especially on roleplay servers with heavy Lua scripts, large vehicle counts and lots of timers. A modern high-clock processor beats a slow many-core one every time. Nubitro game servers run on AMD Ryzen 9 9950X processors with DDR5 memory and NVMe M2 storage in an Istanbul datacenter, which is exactly the profile MTA wants. On the storage side, NVMe noticeably shortens startup and resource loading times.

Five common mistakes

  1. Running the server as root. One scripting flaw then becomes a full machine compromise.
  2. Forgetting 22126/UDP. The server runs fine and nobody can find it.
  3. No backups. Without regular copies of mods/deathmatch/ and your database, a single bad command can erase months of work.
  4. Installing unverified scripts. Ready-made server packages downloaded from forums frequently ship with backdoors.
  5. Postponing DDoS protection. MTA is UDP-based, and every server that gets popular eventually becomes a target. We covered this in detail in our guide to protecting an MTA:SA server against DDoS attacks.

Frequently Asked Questions

Does opening an MTA:SA server cost money?

The server software itself is free and downloaded from the official source. What you pay for is the hosting environment that keeps it online around the clock. You can review current options in the MTA server category.

Can I host the server on my home computer?

For testing, yes. For production, no. Home connections have limited upload bandwidth, usually a dynamic IP, the server dies when you shut the machine down, and there is no DDoS protection at all.

How much RAM do I need?

A small freeroam or deathmatch server runs comfortably on modest memory. What really decides the requirement is the weight of your resources and the number of concurrent players. Roleplay servers need noticeably more because of databases and large custom script bases.

Can I run MTA on a Windows VDS?

Yes. It is a reasonable choice if you prefer managing things through a graphical interface. Just account for Windows itself consuming somewhat more memory on identical hardware.

Why is my server missing from the list?

Almost always one of two reasons: ase is disabled, or 22126/UDP is blocked in the firewall. The third possibility is a wrong address in the serverip field.

Do the same steps apply to FiveM or Minecraft servers?

The logic is identical — a server with root access, opened ports, resource management, running in the background — but the file layout and ports differ. You can find suitable configurations for each game in the game servers category.

Summary

Installing an MTA:SA server comes down to seven steps: get a server with root access, pick your platform, download the binaries and resources, configure mtaserver.conf, create your administrator account, run the process persistently in the background, and open 22003/UDP, 22005/TCP and 22126/UDP. After that the real work starts: shaping your resources, growing a community and keeping the server alive.

If you want to run your server on an Istanbul location with low latency and a DDoS-protected network, take a look at our MTA server packages, or get in touch for a configuration matched to your needs. Our support team is available 24/7 for anything you run into after installation.

Powered by WISECP
💬
Top