Multi Theft Auto (San Andreas)
MTA:SA server with the default resources (race, freeroam, admin…). Players need GTA San Andreas and MTA.
| Download | install script |
|---|---|
| Architectures | amd64, arm64 |
| Ports | game UDP 22003 · http TCP 22005 · ase UDP (+123) |
| Recommended | 384 MB memory + 4 MB per player · 1 cores · 2 GB disk |
| Player count | mta |
| RCON | — |
| Version | 74bdf31e745e |
Settings
- Server name
- Max players
- Join password
Template
mta-sa.yaml · import it in the panel or add it from the catalogue.
# Multi Theft Auto: San Andreas server (mtasa.com), with the official resources.
id: mta-sa
name: Multi Theft Auto (San Andreas)
description: MTA:SA server with the default resources (race, freeroam, admin…). Players need GTA San Andreas and MTA.
# MTA publishes Linux servers for x64 and arm64: the install and the start pick the node's
architectures: [amd64, arm64]
images:
# has what the server needs (ncurses, libstdc++, zlib) and exists for both architectures
- label: Base runtime
image: registry.audifire.ch/hosting-panel/runtime-images/base:latest
startupMode: shell
startup: >-
if [ "$(uname -m)" = aarch64 ]; then exec ./mta-server-arm64 -n -t -u; else exec ./mta-server64 -n -t -u; fi
stop:
command: shutdown
timeoutSeconds: 30
readyPattern: Server started and is ready to accept connections
ports:
- role: game
protocol: udp
default: 22003
- role: http
protocol: tcp
default: 22005
variable: HTTP_PORT
# the server browser (ASE) port is always the game port + 123
- role: ase
protocol: udp
offset: 123
# the server browser (ASE) answer: players, name, game mode
query:
protocol: mta
port: ase
# starting points for the limits when creating a server; memory grows with the player slots
resources:
memoryMb: 384
memoryPerPlayerMb: 4
playersVariable: MAX_PLAYERS
cpuPercent: 100
diskMb: 2048
variables:
- key: SERVER_NAME
name: Server name
default: MTA Server
rules: required|string|max:96
- key: MAX_PLAYERS
name: Max players
default: "32"
rules: required|integer|between:1,4096
- key: SERVER_PASSWORD
name: Join password
visibility: secret
rules: nullable|string|max:32
configFiles:
- path: mods/deathmatch/mtaserver.conf
parser: file
values:
- key: <servername>
value: <servername>{{env.SERVER_NAME}}</servername>
- key: <serverport>
value: <serverport>{{server.build.default.port}}</serverport>
- key: <httpport>
value: <httpport>{{env.HTTP_PORT}}</httpport>
- key: <maxplayers>
value: <maxplayers>{{env.MAX_PLAYERS}}</maxplayers>
- key: <password>
value: <password>{{env.SERVER_PASSWORD}}</password>
install:
image: registry.audifire.ch/hosting-panel/runtime-images/base:latest
entrypoint: bash
script: |
set -e
cd /mnt/server
case "$(uname -m)" in
x86_64) build=x64 ;;
aarch64) build=arm64 ;;
*) echo "MTA has no Linux server for $(uname -m)."; exit 1 ;;
esac
echo "Downloading the MTA server ($build)…"
curl -fsSL -o mta.tar.gz "https://linux.multitheftauto.com/dl/multitheftauto_linux_$build.tar.gz"
tar -xzf mta.tar.gz --strip-components=1 && rm mta.tar.gz
mkdir -p mods/deathmatch/resources
if [ ! -f mods/deathmatch/mtaserver.conf ]; then
echo "Adding the default configuration…"
curl -fsSL -o baseconfig.tar.gz https://linux.multitheftauto.com/dl/baseconfig.tar.gz
tar -xzf baseconfig.tar.gz
cp -rn baseconfig/. mods/deathmatch/
rm -rf baseconfig baseconfig.tar.gz
fi
if [ -z "$(ls -A mods/deathmatch/resources)" ]; then
echo "Downloading the default resources…"
curl -fsSL -o resources.zip https://mirror-cdn.multitheftauto.com/mtasa/resources/mtasa-resources-latest.zip
unzip -qo resources.zip -d mods/deathmatch/resources && rm resources.zip
fi
# the panel keeps these lines up to date; an empty password line must exist to be replaced
grep -q '<password>' mods/deathmatch/mtaserver.conf || sed -i 's|</config>| <password></password>\n</config>|' mods/deathmatch/mtaserver.conf
chmod +x mta-server64 mta-server-arm64 2>/dev/null || true
echo "MTA installed."