Server - oldnapalm/GTACoop GitHub Wiki
This page will guide you to setting up and running a GTA Coop server.
- Windows 10 (1607 and above) or Windows Server 2022 (older versions of Windows might work but are not supported).
- Download the latest server files for Windows and extract them.
- Open
gtaserver.core.exe
and wait for the server completely start. - Gracefully shut down the server by pressing CTRL + C.
- Browse to the newly created Configuration folder and edit
serverSettings.xml
. - Edit the configuration, and start the server again after saving the file.
NOTE: These instructions have been tested on Ubuntu on WSL (Windows Subsystem for Linux), the instructions might differ on other Linux distributions.
- libunwind8 (
apt-get install libunwind8
) -
wget
,unzip
- Copy the url of the latest server files for Linux.
- Download the ZIP file
wget <the link you copied>
, and extract themunzip server-*.zip
. - Allow the executable execute privileges
chmod +x gtaserver.core
. - Run the server
./gtaserver.core
. - Gracefully shut down the server by pressing CTRL + C.
- Browse to the newly created Configuration folder and edit
serverSettings.xml
. - Edit the configuration, and start the server again after saving the file.
After your server is ready you will be able to connect, however for others to connect you often need to do a bit more.
Run in Command Prompt (as administrator)
netsh advfirewall firewall add rule name="gtaserver.core" dir=in action=allow protocol=UDP localport=4499
In situations that all players are connected to the same network, everyone will be able to reach your server. To find the IP address of your server use the ipconfig
command in CMD or the ifconfig
command on Linux and look for your IPv4 address.
NOTE: The server is able to sometimes port forward automatically, you can check by looking for the message
Server available on 198.51.100.0
in the server console.
When you want everyone on the internet to connect to your server you will have to forward the port in your router. Port forwarding will be different per router, but often come down to these steps.
Start by finding the IP address of your server, you can do this by following the instructions under 'LAN'.
- Login to your router web interface ('Default Gateway' in
ipconfig
output). - Browse to the 'Port Forwarding' page.
- Add a new entry, enter your server (computer) IP address, server port. And select UDP as protocol.
Port forwarding details for various routers can be found here.
When you are unable to port forward it is also possible to use a VPN provider such as Hamachi to open your server for others.
- Create a network with the name and password of your choice.
- Have everyone join the Hamachi network.
- Have your players copy your IPv4 address in Hamachi, they can do so by right-clicking on you and selecting 'Copy IPv4 address'.
The server provides support for plugins for extending the server functionality. For example adding commands or gamemodes to your server.
- Extract all plugin files to the
Plugins
folder. - Add the plugin to your
serverSettings.xml
to enable it.
<ServerPlugins>
<string>DiscordBot</string>
</ServerPlugins>
- Extract all gamemode files to the
Gamemodes
folder (create it if it does not exist). - Set the gamemode in the
serverSettings.xml
file.
<GamemodeName>Race</GamemodeName>
To write plugins or gamemodes please see the guide here.
There are some issues you might run into, you can referrer to this page for solutions to some common problems.
This error means you made a mistake while editing the server configuration, you can delete the serverSettings.xml
to restore the original configuration.
You will see this warning during the server start, if you get this warning it means the automatic port forwarding failed. This is a non-fatal warning and can be safely ignored. You can also disable it by setting UPnP
to false
in the server configuration.
You are unable to connect to your server, this could have many reasons but make sure you have gone over the connecting guide.
Please make sure you have the latest version of Windows, only Windows 10 (1607 and above) or Windows Server 2022 are supported.
This error happens on Linux when you do not have libunwind8 installed, please install it by running apt-get install libunwind
.