Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Dedicated Linux server: Difference between revisions

From TF2 Classified Wiki
Webb (talk | contribs)
Make test a subsection of install
Webb (talk | contribs)
No edit summary
Line 16: Line 16:
* At least 25GB of free storage
* At least 25GB of free storage
* A minimum of a ten megabit upload speed if you intend on hosting a server over the Internet, more will be needed if you host custom content
* A minimum of a ten megabit upload speed if you intend on hosting a server over the Internet, more will be needed if you host custom content
* ''Optional'': An opened port on your firewall for the server if you want a persistent IP address (see [[#Disabling the Steam Datagram Relay|this section on disabling the Steam Datagram Relay]])
* An opened port on your firewall for the server if you want a persistent IP address (unless using SDR, see [[#Enabling the Steam Datagram Relay|this section on enabling the Steam Datagram Relay]])
* ''Optional'': An SSH/SFTP client if doing remote access/file management
* ''Optional'': An SSH/SFTP client if doing remote access/file management


Line 95: Line 95:
<pre>
<pre>
$ cd ~/classified
$ cd ~/classified
$ ./srcds.sh -tf_path ~/tf +map ctf_2fort +sv_password changethis
$ ./srcds.sh -port 27015 -tf_path ~/tf +map ctf_2fort +sv_password changethis
</pre>
</pre>


Line 187: Line 187:
ExecStartPre=-/usr/games/steamcmd +runscript /home/srcds/bin/update-classified.steamcmd
ExecStartPre=-/usr/games/steamcmd +runscript /home/srcds/bin/update-classified.steamcmd
Environment="LD_LIBRARY_PATH=".:bin/linux64:$LD_LIBRARY_PATH""
Environment="LD_LIBRARY_PATH=".:bin/linux64:$LD_LIBRARY_PATH""
ExecStart=/usr/bin/script -e -c "/home/srcds/classified/srcds_linux64 -tf_path /home/srcds/tf +map ctf_2fort +maxplayers 24" /dev/null
ExecStart=/usr/bin/script -e -c "/home/srcds/classified/srcds_linux64 -port 27015 -tf_path /home/srcds/tf +map ctf_2fort +maxplayers 24" /dev/null
TimeoutStartSec=infinity
TimeoutStartSec=infinity
Restart=always
Restart=always
Line 227: Line 227:
== Extras ==
== Extras ==


=== Disabling the Steam Datagram Relay ===
=== Enabling the Steam Datagram Relay ===


By default, the dedicated server will use the Steam Datagram Relay. It masks your server's IP address, helps prevent DDoS attacks, and allows you to run a server without port forwarding or configuring firewalls. However, this comes at the cost of added latency and using ephemeral IP addresses for your server, the latter breaking server favoriting.
Servers can use the Steam Datagram Relay. It masks your server's IP address, helps prevent DDoS attacks, and allows you to run a server without port forwarding or configuring firewalls. However, this comes at the cost of added latency and using ephemeral IP addresses for your server, the latter breaking server favoriting and IP bans.


You can disable this by adding <code>sv_use_steam_networking 0</code> to <code>classified/tf2classified/cfg/default.cfg</code>. You should also manually assign a port to the server by adding the <code>-port</code> argument to the server launch command. You will need the assigned port forwarded in your router and allowed in your firewall.
You can enable this by adding <code>sv_use_steam_networking 1</code> to <code>classified/tf2classified/cfg/default.cfg</code>.


== Troubleshooting ==
== Troubleshooting ==