Garry's Mod

Base Garrysmod Linux Ubuntu 16.04/17.10 Server Setup Guide

Submitted by chickendipper, , Thread ID: 69332

Thread Closed
chickendipper
Novice
Level:
0
Reputation:
0
Posts:
21
Likes:
1
Credits:
15
11-01-2018, 05:16 AM
This post was last modified: 11-01-2018, 05:52 AM by chickendipper
#1
This guide covers getting a base garrysmod server up and running on Linux Ubuntu 16.04/17.10.

You need:
A server with Ubuntu 16.04/17.10 (could be a vm or vps or dedi)

Software:
VM Software if your doing it on a vm for testing
SSH Client (putty)
SSH file transfer client (WinSCP)

For sake of demonstration we'll be using a VM in oracle virtualbox running linux server 17.10 with an openSSH server installed from the installation and accessing it through a ssh client in this case putty to run commands and a ssh file transfer client in this case WinSCP to transfer files and manage directories from your pc to the vm to simulate a vps or dedi following this guide.

Downloads:
Ubuntu server iso: from https://www.ubuntu.com/download/server
Putty SSH Client: https://www.chiark.greenend.org.uk/~sgta...atest.html
WinSCP SSH FTClient https://winscp.net/eng/download.php

Step 1. Setting up the VM

First we start by opening oracle virtualbox and click new and fill out the information asked
[Image: cCkQEwqDRfiGsC1ytSER5Q.jpg]
[Image: eItSM1WJSyaTn8cLTLfqRA.jpg]
[Image: LxjV8a_xSx6qPBPtoYl9xA.jpg]
[Image: qrVBZDX6TtiaKvEE_JGCpw.jpg]
[Image: aLztlDEfSr2RICHvLNRNEA.jpg]
[Image: xAZq8LQoTYWXqiWm6itMMg.jpg]

Now we have created the VM we should change some settings before launching it, We will be adding the ubuntu server iso to the VM boot drive and setting the Network adapter to bridged adapter.
[Image: fTqFiFfeRbmhgYu_6dYQsg.jpg]
[Image: OcAByh66SSq8QIgAv0d8nw.jpg]
[Image: lJhJGAr3R8aFxrxe0N-qyA.jpg]
[Image: m2rW4ZN_S06BIwCXnr702Q.jpg]
[Image: tPQvtuHpQIiIcV9KUYCMiQ.jpg]
[Image: zJl0fqUjSWCKoNKX2Ulk5Q.jpg]
[Image: pF9SWBbHT5S-0W7is8LYnA.jpg]

Now the basic set-up of the vm is done and we can press start.
[Image: gJDYh76TSUCxqxsmvd8BRA.jpg]

Install ubuntu server and follow the promps to install until you reach a part about Software selection with options like DNS Server, LAMP Server and OpenSSH server.
[Image: AdeuPLgoQv_FKX6Ju8vgng.jpg]

Once you've gotten to this screen use the arrow keys on your keyboard to move down and press spacebar to select OpenSSH Server then press Enter on your keyboard. Then continue with the prompts until asked about GRUB boot loader.
[Image: jErG59HLTVOU_9v7py_R5w.jpg]

Select Yes and Install GRUB boot laoder to the VM Virtual hard disk
[Image: ifrXyhCERUmiiCaWL86Qlg.jpg]

Done, we now just leave this running and our virtual server is running, now before we move on we just want to grab some information from the machine login using the account you created during installation.
[Image: eWTUx5OTTJiPfkSBsfDdZw.jpg]

Once logged in we type the command ifconfig to display network information on the VM, here we can find out VMs internal IP that we will use in our SSH client to connect.
[Image: v8gg_GMsS8WDebYtqGpjKQ.jpg]

After you've got the ip address you can exit and be returned to the blackbox and just leave it running and move on.
[Image: IKHsge54T7GQaoXNBiuM9Q.jpg]
[Image: vUWHg4s_RgecKzFYyY5PAw.jpg]

Step 2: Setting up the gmod server

Fillout the connection information for your server if a VM use your local ip we found in the guide in this case is 192.168.0.67, for a VPS or dedi then use your external ip and login information your host provides.
[Image: T5WAhJ6_RLaZQDBEQ5BQaQ.jpg]
[Image: UEzDjHoASI_NLBsRUtys9w.jpg]

Login with your username and password setup in installation or what your host provides.
[Image: v_ZQ5TYvTNmCrjVNu9VlkA.jpg]

It's concered good practice to update when logging into your server. run the 'sudo apt-get update' command followed by the 'sudo apt-get upgrade' command and response with Y when prompted.
[Image: 17ZUevLTQ0e9Sh_zzZHlzQ.jpg]

[Image: eIwvi7V6T8WKgqQkSvN2HA.jpg]

Next to install dependancies we will use gameservermanagers website for this as they have conviently created several lists for several distros
[Image: tjyAN_uHTqSf0SV52dpWzQ.jpg]

Its not secure to run the server as root as is recommened to make a new user we will make a user called gmodserver and give it a password using 'sudo adduser gmodserver'
[Image: H2oU1o8WRRi4HNQsqWYDDA.jpg]

We then login with that user using 'su - gmodserver'
[Image: ZgsX6YMTT-qzeytC_zjxDA.jpg]

Next is to install the actuall garrysmod server and its components we will use gameservermanagers script for this and can be found on their website for this is case its:

'wget -N --no-check-certificate https://gameservermanagers.com/dl/linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh gmodserver'

[Image: lHXcmhEmQ1S4DKirCjvrAw.jpg]
[Image: INIlPCcAS6aS-OjT-9u8gA.jpg]

Next we run the script we downloaded to install the server with the command './gmodserver install'
[Image: 52BU2ys4QWm1h80oqGGKyw.jpg]

Install is done and we now have a working base gmod server. congradulations
[Image: FTRTgHybTqCw45nqOLrGGg.jpg]

Step 3 Accessing it with SSH FTClient

Here we will launch WinSCP to access the gmodserver with a nice file manager gui something were familiar with like windows. This will simply use the same ssh protocol as putty but allow us to transfer files from the computer its installed on to the VM/VPS/Dedi
[Image: w1OO3jAyTqKJ4WnPvm4cOg.jpg]

Fill in your login credentials and save for later or you can just login directly
[Image: jQd0149aTtaeENmC9MtrYg.jpg]
[Image: 0zOBbgbxTneotooNgd78Vg.jpg]

Here we can see its very similar to Filezilla or other ftp clients and is very easy to use and manage directories, all the folders here are the server files, for example serverfiles is the actually gamefiles like garrysmod this is where you would install CSS for darkrp for example, other fodles such as logs and steam and steamcmd are self explantory and lgsm is the gameservermanager configs and files, here you can edit things like the srcds command line for changing stuff like maps and tickrates and maxplayers etc.
[Image: ws4vAqQZR3iXoWcTRdpllA.jpg]

The gmodserver addons folder and a demonstration of uploading.
[Image: y6RanCq0QDasvv3V1t-lSQ.jpg]
[Image: 8wORBSCwTWeGm7Y-puScOg.jpg]

Thanks for reading.

Sources & Documentation and useful links

http://wiki.garrysmod.com/page/Main_Page
https://gameservermanagers.com/lgsm/gmodserver/
https://github.com/GameServerManagers/Li...ry%27s-Mod

RE: Base Garrysmod Linux Ubuntu 16.04/17.10 Server Setup Guide

BigDickJohnson
Junior Member
Level:
0
Reputation:
1
Posts:
82
Likes:
2
Credits:
44
11-01-2018, 05:54 AM
#2
Useful.. I guess? What person is gonna be using base Ubuntu if they're not a Big Server Man or something else? Most people just use a generic server host that has it all set up for them..

RE: Base Garrysmod Linux Ubuntu 16.04/17.10 Server Setup Guide

chickendipper
Novice
Level:
0
Reputation:
0
Posts:
21
Likes:
1
Credits:
15
OP
11-01-2018, 05:58 AM
This post was last modified: 11-01-2018, 06:12 AM by chickendipper
#3
I'm not sure for other peoples uses but for me it saves me giving microsoft 20/month of my dedi server bill, for the other end then this can be done on a vps costing $5/month vps could handle 60+ players and also host a webserver for you reducing costs even more, basically its the ultimate way to do it on the cheap at small or big scales. example nitrous charge 10/month for 32player server i can get a vps for 5 that will handle 80-126 players depending on gamemode and addons and their functions/calls ect. Gmod servers run astonishingly well on low end systems and only for 1 thread

RE: Base Garrysmod Linux Ubuntu 16.04/17.10 Server Setup Guide

Ctalker
Newbie
Level:
0
Reputation:
0
Posts:
11
Likes:
0
Credits:
30
11-01-2018, 04:12 PM
#4
VPS gives you more freedom. Some hosts won't allow you to upload a .dll to your server, you don't really have the server, only the files. Some force you to pay for slots... It's not worth to rent a server.

RE: Base Garrysmod Linux Ubuntu 16.04/17.10 Server Setup Guide

chickendipper
Novice
Level:
0
Reputation:
0
Posts:
21
Likes:
1
Credits:
15
OP
13-01-2018, 12:23 AM
#5
Yeah and the VM give you even more to developer the server without paying in the same enviroment as a vps its very useful for cost effective hosting, it'll make the difference between being able to keep your server up based on donations instead of losing money yourself to try and get to the point of self sustaining, It does come with its drawbacks on linux for some reason if you change the tickrate it effects the physics differently than windows for some reason but its not a huge deal since u can compensate by editing things that work on velocity spiderman swep and grappling hook for example. has the same effect on windows but its just seems abit slower with things like gravity on linux by a minute amount

RE: Base Garrysmod Linux Ubuntu 16.04/17.10 Server Setup Guide

lolxoxoxo
Active Member
Level:
0
Reputation:
0
Posts:
208
Likes:
6
Credits:
0
13-01-2018, 08:48 PM
#6
cool guide, could come in handy for people who use linux

RE: Base Garrysmod Linux Ubuntu 16.04/17.10 Server Setup Guide

Aideenove
Closed Account
Level:
0
Reputation:
0
Posts:
4
Likes:
0
Credits:
10
14-01-2018, 06:20 PM
#7
nice guide, could come in handy for people who use linux

RE: Base Garrysmod Linux Ubuntu 16.04/17.10 Server Setup Guide

chickendipper
Novice
Level:
0
Reputation:
0
Posts:
21
Likes:
1
Credits:
15
OP
17-01-2018, 05:20 PM
#8
Thanks hopefully it helps with the transition from windows server to linux for some people, from there on theres plenty of other open and free resources out there for other things like setting up ftps and webservers, its defentialy the most work but then the most cost effective and sustainable afterwards.

Users browsing this thread: 2 Guest(s)