Deploying TeamSpeak 3 on Ubuntu 22.04

Discord has pretty much replaced Teamspeak, but there are still some good use cases for the product. I decided to roll a server out to play Minecraft with my son. He’s young, so I didn’t want to have to create a Discord account. Plus, if some company has any of his info, it should be up to him when he is older.

This brought me to the idea of rolling out a TS3 server. I had done it many years ago during my World of Warcraft days. It turns out the installation continues to be simple.

You can rent a VPS from Digital Ocean or do what I did and roll my own in Proxmox. I started with a fresh Container on Ubuntu 22.04 LTS. I won’t go over the setup of Ubuntu Server, but I will have a tutorial on how I do it coming soon.

Start by SSHing into your server. The first thing is to create a new user for Teamspeak service to run on.

sudo adduser --disabled-login teamspeak

Be sure to specify the --disabled-login account so it cannot be logged into locally or remotely.

Using our current user, log in as the teamspeak user.

su - teamspeak

You will also want to download the Teamspeak 3 server software from here. Be sure to download the 64-bit version under the Linux header.

Once downloaded, upload the file to the Ubuntu server with scp or the FileZilla client. You can also use wget to download it directly onto the server.

wget https://files.teamspeak-services.com/releases/server/3.13.7/teamspeak3-server_linux_amd64-3.13.7.tar.bz2

Next, we need to extract the contents of the tar file.

tar -xvfj teamspeak3-server_linux_amd64-3.13.7.tar.bz2

Copy the new directory and move it to the users home directory.

cp teamspeak3-server_linux_amd64/* -R /home/teamspeak/

Now that the files are in place, accept the license agreement by creating this file.

touch .ts3server_license_accepted

Type exit to leave the teamspeak users prompt and return to our account.

We must tell our Ubuntu Server how to start and stop the Teamspeak service. We will create a config file so systemd knows how to do this.

We will use nano as our text editor, you can use anything you are comfortable with.

sudo nano /lib/systemd/system/ts3server.service

Paste in the code below. If you used a different account name, you may need to adjust the folder names.

[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

Save and close the file. You can press Ctrl + x and follow the prompts.

Reload systemd so it picks up this new config.

sudo systemctl daemon-reload

Add the service and start it now.

sudo systemctl enable --now ts3server

Check the status of it and grab the token code, too. You will need this token code to administer the server from the Teamspeak client.

sudo systemctl status ts3server

Firewall

Add rules to the firewall to allow the traffic through.

sudo ufw allow 3033/tcp
sudo ufw allow 9987/udp
sudo ufw allow 1011/tcp

That is it! The Teamspeak 3 server is up and running. It really doesn’t take that long if you’re familiar with bash. If you have any issues or questions, please click here to join the Discord server.

NTP Client Setup – Ubuntu 22.04

The following tutorial will cover how to enable the NTP client on Ubuntu. When working with Linux servers, the system time must be accurate. The best way to do that is by using the Network Time Protocol.

The first step is to install the NTP client.

sudo apt install ntp

Before we begin configuration, let’s back up the default NTP client config. We will use today’s date in the command.

sudo cp --archive /etc/ntp.conf /etc/ntp.conf-COPY-$(date +"%Y%m%d%H%M%S")

Open the config file using your favourite text editor. In my case, I will be using nano.

sudo nano /etc/ntp.conf

The first thing we want to do is comment out the current servers that ships with Ubuntu. Add a # in front of all the “pool” lines.

Head to NTP Pool and find the closest pool address to your machine. In my case, I am in Canada, so I’m going to add the following to the bottom of my ntp.conf file.

You can do this all in one command if you would like.

sudo sed -i -r -e "s/^((server|pool).*)/# \1         # commented by $(whoami) on $(date +"%Y-%m-%d @ %H:%M:%S")/" /etc/ntp.conf
echo -e "\npool ca.pool.ntp.org iburst         # added by $(whoami) on $(date +"%Y-%m-%d @ %H:%M:%S")" | sudo tee -a /etc/ntp.conf

We will restart the NTP client service once you have saved and closed the config file.

sudo service ntp restart

Let’s check to see if the service is running.

sudo ntpq -p

The following output should show.

Output of the ntpq command. This is showing the list of server NTP is getting time from.

That’s it! Your box will always get its time from the ntp pool; no more out-of-sync log files.

This tutorial was found in the How-To-Secure-A-Linux-Server GitHub repository. If you have any questions, please drop a comment below.

Deploying a Discord bot in Docker

A few months back I did a video on Fusion Terror’s YouTube channel. Fusion has actually been a summer student at my current place of employment for the last year. I had mentioned a few times how easy it is to get Node working in a Docker container.

I asked him if his audience would be interested in this type of content and he said yes! Away I went to film my first YouTube video.

Took me an entire morning to get things right but here is the final product.

If you want to code from this video, you can subscribe to his Patreon here.

I keep reflecting back on this and thinking about all the other ideas I have for videos. Maybe it’s time to start my own thing?

The Goals of 2022

I started off 2020 on a great note and continued through the year. I used a daily checklist in Notion to make sure I accomplished something every day. Here is the single list of things.

  • Learn something new
  • Read
  • 30 mins on Social Media
  • Do House stuff

A weird list, but here’s the reasoning behind the four.

Learn Something New

This one is pretty simple. Learning anything new that day to increase my knowledge in either my work field (IT) or my personal self-help/growth. This task can be completed using the next item on the list, “Read.”

My company pays for a subscription to ITPro.TV, and online learn at your own pace IT library of classes. My goal was to do one hour daily but sometimes it doesn’t happen. This year I want to put more of a priority on this. Its free to me and can only provide me with more understanding of the IT world I work in.

Read

A journey I started in 2019 was to read more. Before that year, I couldn’t tell you the last time I read a book about anything. So my first dive into self-help books was Atomic Habits by James Clear. This book set the groundwork for this entire journey in learning more and stopping the waste of my time on social media.

After finishing Atomic Habits, the natural progression seemed to move to Cal Newport’s books. So I started with Deep Work. The premise of the book is distractions are bad. Picking a task and just working on that one task without the distractions of email, text messages and phone calls. It also talks about the reality that other people’s emergencies don’t have to be yours.

I continued my Cal Newport journey to Digital Minimalism. Minimalism is a topic and Philosophy that has fascinated me for years now. Something about having what I need to bring peace to my over-filled brain and physical space feels like the piece I wish I had. As I write this post, I hardly have enough room for this computer on the table due to the cereal box, water cup, baby monitor and residual items from Christmas scattered over the dining room table. Always a work in progress.

A World without Email was an exciting read. In my line of work (IT), it’s not practical to only check my email once a day, let alone a few times a month. A lot of this book I couldn’t relate to or couldn’t apply in my daily work-life, and so that concluded my Cal Newport journey.

I was an avid listener of The Tim Ferris Podcast but fell off the bandwagon when he gets in the “compounds” and psychedelics, two topics I have no interest in. However, one episode came up in the feed that interested me, the lost South by Southwest talk he did before the release of his famous book “The 4-hour Work Week”.

I was glued to the 50-minute episode. I as soon as the episode ended, I bought the book. I’m only into it a few chapters, but what a game-changer. I’m trying to apply the teachings from this book to my everyday life, though some are difficult due to my 9 – 5 “career.”

30 Minutes of Social Media

I have removed Facebook from my phone entirely and only check it when sitting at a computer. I also found removing all the news organizations and companies trying to “buy my eyes” has cleaned up my feed. I now only see things friends and family have posted. Sometimes I don’t check Facebook for a few days, which is a massive change from the once-every-hour doom scrolling.

On the flip side, Instagram is still a problem for me. A lot of communication occurs in the Instagram app, so I find myself chatting and scrolling while I wait for responses. My one relief has been tapping on the “Instagram” logo at the top of the app and changing to see people and hashtags I’m “Following.”

The 30-minute limit should reduce the “doom scrolling” until I can make the jump to only a few times a week.

Do House Stuff

This was always an area of improvement. With two kids, the house goes from clean and organized to a disaster in just a matter of 30 seconds. I checked this box off once I had cleaned or run a load of laundry once a day. It’s not glamourous, but it has to be done.

Final Thoughts

I’m going to put the processes I had created with the daily checklist back in place. Unfortunately, stopping didn’t hold me accountable for the tasks on the list, thus causing everything to fall by the wayside. I believe this is also the reason for my decline in mental health.

I want to find an app to help me along with this journey as there are many barriers when using Notion to track the changes. If you have any suggestions, please comment below. Your help would be greatly appreciated! I will report back on how the journey is going. New me starts today!

Social Media Detox

Over the last 3 months I started tracking a list of daily task that I would like to adhere to. One of those tasks is 1 hour of social media per day.

At first this was easy to do. I broke my Samsung S8 phone and had to switch to an old iPhone 7 we had. I decided to only install the apps I deemed essential. Facebook, Instagram and Twitter did not meet that essential criteria.

I found my concentration was up and I was able to complete more projects at work. It’s amazing what a hole day of not scroll through Facebook can do. During this time, COVID was in full swing here in Canada. Facebook felt toxic with all the fears and “crazy talk” from some of my Facebook”friends”. Instagram was filled with pictures of text?! That’s right, pictures of sentences. I thought Instagram was for photos?

Limiting social media to 1 hour a day really changed my perspective. I realized my primary news outlet was Facebook so I decided to login to my Feedly.com account and setup some good old RSS feeds but reduced my selection to my local news paper (not actually a paper anymore) and international news from the CBC. I do have a few personal blogs I follow but posts are few and far between.

Since the beginning of August, I have felt my self slipping. In the evenings, I’m scrolling past the 1 hour limit. I justify this by saying “well the days over so what does it matter”. It matters! As I write this post, my productivity has dropped, concentration has dropped. I still don’t check social media on my phone, but when I get home, there I am, scrolling through Facebook and Instagram on my tablet.

I see my son developing the same bad habits as his parents. He comes home and just wants to sit in front of a laptop and watch endless episodes of Peppa Pig. He doesn’t even like to go outside and play with his toys. I’m almost at the point where I sell everything in our back yard.

The Goal

For me, it’s time to be more present. Stop scrolling and stop wasting my time reading what crazy conspiracy theory aunt Helen is sharing on Facebook. I’m sure if this photo gets 100 likes, God will send me $1000.

What are your theory’s on social media and what its doing to you? Do you find it helpful or is getting in the way of living your life?