LinuxServer: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
No edit summary
No edit summary
Line 18: Line 18:
== Updating the server ==
== Updating the server ==
GTA Connected is an actively updated multiplayer modification and regularly receives [https://gtaconnected.com/versions/server/ updates]. Here is a quick and easy one-liner to update your server:
GTA Connected is an actively updated multiplayer modification and regularly receives [https://gtaconnected.com/versions/server/ updates]. Here is a quick and easy one-liner to update your server:
<br><nowiki>wget -qO- https://gtaconnected.com/downloads/server/latest/linux | tar xvzf -</nowiki><br>
<br><nowiki><code>wget -qO- https://gtaconnected.com/downloads/server/latest/linux | tar xvzf -</code></nowiki><br>
'''Please note''' that this will overwrite server.xml with default values!
'''Please note''' that this will overwrite server.xml with default values!
If you use server.xml as your [[ServerConfiguration|server configuration]], back up your current configuration before using this.  
If you use server.xml as your [[ServerConfiguration|server configuration]], back up your current configuration before using this.  
You can also avoid this by using a different configuration file when starting the server via the -config command arg.
You can also avoid this by using a different configuration file when starting the server via the -config command arg.

Revision as of 07:17, 22 February 2021

Downloading the Server

You'll need to download the linux server to your host before you can run it. You can do this by either making the host download it with something like wget, or download it from our downloads page, then upload it to your linux host via FTP or SFTP or similar protocol.

If you want to download it directly to the linux host, you can use wget. On the downloads page, find the linux server link, and right click it, and choose Copy Link Location or Copy Link. Your browser may have a different text for this option. Then, in your SSH terminal (we recommend putty, if you're on Windows) use wget SERVER_URL_HERE, replacing SERVER_URL_HERE with the link you copied of course. You can then unzip it with your linux hosts's tar command. Please see your distro's documentation or man pages for information on the tar command if you need help.

Running the Server

First, you'll need to make sure the required dependencies are installed. See the dependencies section below for more information on that.

After you have the dependencies installed, in order to run the server executable you need to first make sure it has execute permissions. To do this, use the command chmod +x Server from within your server's main directory. Once you have set execute permissions for the server executable, you may start the server with ./Server. This is the simplest way to run the server.

However, once you terminate your SSH connection to the server host, the GTAC server will stop running. To keep the server running, you can either nohup or use screen. There are other ways to keep the server running, but those two are the most common. Please refer to your distro's documentation for information information and/or examples available on using nohup and screen.

Server Manual

You can find the main server manual (applies to both Linux and Windows servers) on the server manual

Updating the server

GTA Connected is an actively updated multiplayer modification and regularly receives updates. Here is a quick and easy one-liner to update your server:
<code>wget -qO- https://gtaconnected.com/downloads/server/latest/linux | tar xvzf -</code>
Please note that this will overwrite server.xml with default values! If you use server.xml as your server configuration, back up your current configuration before using this. You can also avoid this by using a different configuration file when starting the server via the -config command arg.