How to Install a Multi Theft Auto (MTA) Server on Linux
How to Install Multi Theft Auto Server on Linux
Multi Theft Auto (MTA) is a multiplayer modification for Grand Theft Auto: San Andreas that allows you to play online with hundreds of other players. In this guide, I'll show you how to set up an MTA server on a Linux system.
Prerequisites
- A Linux server (Ubuntu/Debian recommended)
- At least 1GB RAM (2GB+ recommended for busy servers)
- Root or sudo access
- Basic knowledge of Linux command line
Installation Steps
Step 1: Update Your System
sudo apt update sudo apt upgrade -y
Step 2: Install Required Dependencies
sudo apt install -y wget unzip tar libcurl3 libpcre3
Step 3: Download MTA Server
Visit the official MTA downloads page and get the Linux server version or use:
wget https://linux.mtasa.com/dl/1.5.9/multitheftauto_linux-1.5.9.tar.gz wget https://linux.mtasa.com/dl/1.5.9/baseconfig-1.5.9.tar.gz
Step 4: Extract the Files
tar -xf multitheftauto_linux-1.5.9.tar.gz tar -xf baseconfig-1.5.9.tar.gz
Step 5: Move Files to Proper Location
sudo mv multitheftauto_linux-1.5.9 /opt/mta sudo mv baseconfig-1.5.9/* /opt/mta/mods/deathmatch
Step 6: Configure Your Server
Edit the configuration file:
nano /opt/mta/mods/deathmatch/mtaserver.conf
Key settings to modify:
- Server Name: Your server's display name
- Max Players: Maximum concurrent players
- Port: Default is 22003 (ensure this port is open in your firewall)
Step 7: Start the Server
cd /opt/mta ./mta-server
Step 8: (Optional) Create a Systemd Service
For automatic startup on boot:
sudo nano /etc/systemd/system/mta.service
Add this content:
[Unit] Description=MTA Server After=network.target [Service] Type=simple User=root WorkingDirectory=/opt/mta ExecStart=/opt/mta/mta-server Restart=always [Install] WantedBy=multi-user.target
Then enable and start the service:
sudo systemctl daemon-reload sudo systemctl enable mta sudo systemctl start mta
Troubleshooting
- Port not open: Ensure your firewall allows TCP/UDP on port 22003 and 22126
- Can't connect: Verify your server IP in the client
- Permission issues: Run server as root or adjust permissions
Conclusion
You now have a working MTA server on Linux! You can further customize your server by adding resources, scripts, and modifying game modes. Check the MTA Wiki for more advanced configuration options.
Comments
Post a Comment