Setup Teamspeak 3 server on Ubuntu 16.04

This guide, gives step-by-step to installing Teamspeak 3 (3.0.13.4) server on Ubuntu 16.04.

Step 1:
Login to SSH as root

Step 2:
Run the below commands:
Note: During the sudo apt-get upgrade command, you maybe asked about the grub load. Press Enter

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Step 3:
Let create a user for the Teamspeak 3 server.

sudo adduser –disabled-login teamspeak

You will be asked for user information for teamspeak. Press Enter for all the questions.
You will also be asked is the information correct. Press Enter.

Step 4:
Type the following command

cd /home/teamspeak/;su teamspeak

Step 5 – 32 bit:
Teamspeak 3 server 32 bit (3.0.13.4)

wget http://dl.4players.de/ts/releases/3.0.13.4/teamspeak3-server_linux_x86-3.0.13.4.tar.bz2
tar xvfj teamspeak3-server_linux_x86-3.0.13.4.tar.bz2
cd teamspeak3-server_linux_x86
cp * -R /home/teamspeak
cd ..
rm -r teamspeak3-server_linux_x86
rm teamspeak3-server_linux_x86-3.0.13.4.tar.bz2

Step 5 – 64 bit:
Teamspeak 3 server 64 bit (3.0.13.4)

wget http://dl.4players.de/ts/releases/3.0.13.4/teamspeak3-server_linux_amd64-3.0.13.4.tar.bz2
tar xvfj teamspeak3-server_linux_amd64-3.0.13.4.tar.bz2
cd teamspeak3-server_linux_amd64
cp * -R /home/teamspeak
cd ..
rm -r teamspeak3-server_linux_amd64
rm teamspeak3-server_linux-amd64-3.0.11.3.tar.gz

Step 6:
Now we start the TS3 server

./ts3server_startscript.sh start

Make sure you copy and save the security token and Server Query Admin Account details, once the server has started.

Step 6.2:
Press Enter. This will return to the command prompt.

Step 7:
Now we need to stop the server and return to root, enter the below:

./ts3server_startscript.sh stop
exit

Step 8:
Now we make a restart script using systemd to reset with.

nano /lib/systemd/system/ts3server.service

Step 8.2.
This should open a blank page copy the below into it:


[Unit]
Description=Teamspeak Service
Wants=network.target

[Service]
WorkingDirectory=/home/teamspeak
User=teamspeak
ExecStart=/home/teamspeak/ts3server_minimal_runscript.sh
ExecStop=/home/teamspeak/ts3server_startscript.sh stop
ExecReload=/home/teamspeak/ts3server_startscript.sh restart
Restart=always
RestartSec=15

[Install]
WantedBy=multi-user.target

Step 8.3:
Now we need to save it

Press CTRL and X together
Press Y

Step 9:
systemctl enable ts3server.service
reboot
systemctl status ts3server
Press Q

Step 9.2:
In the output Look for:
Active: active (running)

Try and connect to the server to confirm it is running.

Step 10:
Restart the server to make sure it, it restarts

Type: reboot

Step 11:
Reconnect to SSH and enter the following

systemctl status ts3server

Step 11.2
Return to the command prompt and check the output

Then Press Q

In the output Look for:
Active: active (running)

Install sSMTP and setup with Gmail on Ubuntu 16.04

This is a guide on how to install sSMTP and set it up with Gmail on Ubuntu 16.04.
I installed this to allow CSF/LFD to send email to me, as I didn’t want a full mail server.

Step 1:
Login to SSH as root.

Step 2:
Makre sure your Ubuntu Repository, is up to date.

sudo apt-get update

Step 3:
Install sSMTP

sudo apt-get install ssmtp

Step 4:
Configure sSMTP

nano /etc/ssmtp/ssmtp.conf

#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=MyEmailAddress@gmail.com

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:587

AuthUser=MyEmailAddress@gmail.com
AuthPass=MyPassword
UseTLS=YES
UseSTARTTLS=YES

# Where will the mail seem to come from?
rewriteDomain=gmail.com

# The full hostname
hostname=localhost

# Are users allowed to set their own From: address?
# YES – Allow the user to specify their own From: address
# NO – Use the system generated From: address
FromLineOverride=YES

Step 5:
Add reverse aliases

nano /etc/ssmtp/revaliases

Add the line:
root:MyEmailAddress@gmail.com:smtp.gmail.com:587

Step 6:
Create a test messae to send

cd /root

nano msg.txt

Add the following lines:
To: MyEmailAddress@gmail.com
From: MyEmailAddress@gmail.com
Subject: test email

Hello World!

Step 7:
Test to make sure it all working

cd /root

/usr/sbin/ssmtp MyEmailAddress@gmail.com < msg.txt

Info:
Be sure to set your Gmail email address where it has:
MyEmailAddress@gmail.com

Remember to set your Password in the ssmtp.conf file.
If you are using Two-Factor you will need to create an App password, instead.

Setup Minecraft 1.8.8 server on Ubuntu 15.04

This guide, gives step-by-step to installing Minecraft 1.8.8 server on Ubuntu 15.04.

Step 1:
Login to SSH as root

Step 2:
Run the below commands:
Note: During the sudo apt-get upgrade command, you maybe asked about the grub load. Press Enter

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Step 3:
Let crate a user for the Minecraft server

sudo adduser --disabled-login minecraft

You will be asked for user information for minecraft. Press Enter for all the questions.
You will also be asked is the information correct. Press Enter.

Step 4:
Run the below commands
Note: During the sudo apt-get install oracle-java7-installer command, you will get asked to agree to the license

sudo apt-get install screen
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Step 5:
Change to the minecraft user to download and run Minecraft 1.8.8
The first time you run the minecraft_server1.8.8.jar it will fail and say you need to agree to the license.

su minecraft
cd /home/minecraft
wget https://s3.amazonaws.com/Minecraft.Download/versions/1.8.8/minecraft_server.1.8.8.jar
java -Xmx1024M -Xms1024M -jar minecraft_server.1.8.8.jar nogui

Step 6:
Agree to the Minecraft license

nano eula.txt

Change FALSE to TRUE

Step 7:
Start the minecraft server

java -Xmx1024M -Xms1024M -jar minecraft_server.1.8.8.jar nogui

Step 8:
Stop the Minecraft server

Pess CTRL and C together

Step 9:
Edit the config, to how you want it

nano server.properties

Step 10:
Start the Minecraft server

screen -dmS minecraft java -Xmx1024M -Xms1024M -jar minecraft_server.1.8.8.jar nogui

Step 11:
Add a task for the minecraft user, to restart it on reboot

crontab -e
screen -dmS minecraft java -Xmx1024M -Xms1024M -jar minecraft_server.1.8.8.jar nogui

Step 12:
Let return to root, type

exit

Setup Teamspeak 3 server on Ubuntu 15.04

This guide, gives step-by-step to installing Teamspeak 3 server on Ubuntu 15.04.

Step 1:
Login to SSH as root

Step 2:
Run the below commands:
Note: During the sudo apt-get upgrade command, you maybe asked about the grub load. Press Enter

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Step 3:
Let create a user for the Teamspeak 3 server.

sudo adduser --disabled-login teamspeak

You will be asked for user information for teamspeak. Press Enter for all the questions.
You will also be asked is the information correct. Press Enter.

Step 4:
Type the following command

su teamspeak
cd /home/teamspeak

Step 5 – 32 bit:
Teamspeak 3 server 32 bit (3.0.11.3)

wget http://dl.4players.de/ts/releases/3.0.11.3/teamspeak3-server_linux-x86-3.0.11.3.tar.gz
tar xzf teamspeak3-server_linux-x86-3.0.11.3.tar.gz
cd teamspeak3-server_linux-x86
cp * -R /home/teamspeak
cd ..
rm teamspeak3-server_linux-x86 -r
rm teamspeak3-server_linux-x86-3.0.11.3.tar.gz

Step 5 – 64 bit:
Teamspeak 3 server 64 bit (3.0.11.3)

wget http://dl.4players.de/ts/releases/3.0.11.3/teamspeak3-server_linux-amd64-3.0.11.3.tar.gz
tar xzf teamspeak3-server_linux-amd64-3.0.11.3.tar.gz
cd teamspeak3-server_linux-amd64
cp * -R /home/teamspeak
cd ..
rm teamspeak3-server_linux-amd64 -r
rm teamspeak3-server_linux-amd64-3.0.11.3.tar.gz

Step 6:
Now we setup the restart of the Teamspeak 3 server, when the server gets rebooted.

crontab -e

Press: 2

Step 7:
Enter the following line at the bottom of the file.

@reboot /home/teamspeak/ts3server_startscript.sh start

Press CTRL and X together
Press Y

Step 8:
Now let check to make sure it been added

crontab -l

You should see:
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use ‘*’ in these fields (for ‘any’).#
# Notice that tasks will be started based on the cron’s system
# daemon’s notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
@reboot /home/teamspeak/ts3server_startscript.sh start

Step 9:
Now we start the TS3 server

./ts3server_startscript.sh start

Make sure you copy and save the security token and Server Query Admin Account details, once the server has started.

Step 10:
Press Enter. This will return to the command prompt.

Step 11:
Return to root.
You will be asked for the root password.

su

Step 12:
Let reboot to make sure it starts, type the command.

reboot

Step 13:
Reconnect to SSH, you may need to give it a minute to reboot.

Step 14:
Let make sure it is running.

/home/teamspeak/ts3server_startscript.sh status

You should see:
Server is running