---
title: 'Installing a game server for Terraria - TShock on Centos 7 | Zomro'
description: 'Today we will consider the launch of a game server for the game Terraria. To install, we need a server with Linux OS. This tutorial will install on a Centos 7 system.'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661074556_image_2022-08-21_12-33-53.png'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [FAQ](https://zomro.com/blog/faq/)
  * Installing a game server for Terraria - TShock on Centos 7 



# Installing a game server for Terraria - TShock on Centos 7

21-08-2022

Today we will consider the launch of a game server for the game Terraria with OS Centos 7.  


**1\. Adding the mono repository**

  
To run the game server, we need the mono application installed. We import the public key. Assign the following command:
    
    
    rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"

  
Then we will download and add the repository for installing mono. We write the following command in the console:
    
    
    curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo 

  
If the following result is observed, then this lets us know that the process of adding the repository has completed correctly. Screenshot example 1.  
  
![Installing a game server for Terraria - TShock on Centos 7 - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661074556_image_2022-08-21_12-33-53.png)

Screenshot 1 - Adding the mono repository

**2\. Mono installation**

  
Once the repository has been added, we install mono. To do this, we write the installation command:
    
    
    yum -y install mono-devel

  
After a successful installation, we can observe the following result in the screenshot:  
  
![Installing a game server for Terraria - TShock on Centos 7 - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661076798_image_2022-08-21_12-52-42.png)![Installing a game server for Terraria - TShock on Centos 7 - 3](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661076977_2.png)

Screenshot 2 - Successful installation of mono

**3\. Installing and running the TShock game server**

  
For convenience, all actions with the game will be performed in a separate directory. Create a directory to unpack the directory. We create under the name, for example, "Terraria-Server" and go to this directory. We write the following command in the console:
    
    
    mkdir Terraria-Server
    cd Terraria-Server
    

![Installing a game server for Terraria - TShock on Centos 7 - 4](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661077715_3.png)

Screenshot 3 - creating a directory for the game server

  
Also, for the server to work, you will need to open ports in the firewall. According to the standard, port 7777 is used, so we create a new firewall rule. To do this, write the following commands:
    
    
    iptables -I INPUT -p tcp -m tcp --dport 7777 -j ACCEPT
    iptables -I OUTPUT -p tcp -m tcp --dport 7777 -j ACCEPT
    

After that, we save the rules so that we do not need to open ports again after the server is rebooted. To do this, write the command:
    
    
    iptables-save

![Installing a game server for Terraria - TShock on Centos 7 - 5](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661078513_4.png)

Screenshot 4 - creating a directory for the game server

  
Since this utility, TShock, allows you to run the Terraria game server, you need to select the correct version of TShock.  
To do this, follow the link to github "https://github.com/Pryaxis/TShock/releases" to select the version of the game server we need.  
In this case, the launch will be made for Terraria version 1.4.3.2, so we write the version we need and press Enter. From the results, we have the release of TShock 4.5.10.

![Installing a game server for Terraria - TShock on Centos 7 - 6](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661078703_1661078629768.png)![Installing a game server for Terraria - TShock on Centos 7 - 7](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661078798_1661078789381.png)Screenshot 5 - the result of searching for the desired version of TShock

  
Next, in the "Assets" section, copy the link to the TShockX.X.X_TerrariaX.X.X.X.zip file. Next, download to your server using the command:
    
    
    wget https://github.com/Pryaxis/TShock/releases/download/v4.5.10/TShock4.5.10_Terraria1.4.3.2.zip

  
![Installing a game server for Terraria - TShock on Centos 7 - 8](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661079135_7.png)

Screenshot 6 - downloading the archive from TShock to your server

  
We unpack the archive. Install the unzip package and extract the archive. We write commands:
    
    
    yum install unzip -y
    unzip TShock4.5.10_Terraria1.4.3.2.zip
    

  
![Installing a game server for Terraria - TShock on Centos 7 - 9](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661090707_1.png)![Installing a game server for Terraria - TShock on Centos 7 - 10](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661090788_2-1.png)

Screenshot 7 - unpacking the archive

  
After unpacking the archive with the server, we launch it. To make the server run in the background and not shut down, install the screen utility using the command:
    
    
    yum install screen -y

After successful installation, run it with the command:
    
    
    screen

After that, we launch the game server. To do this, write the command:  

    
    
    mono TerrariaServer.exe

  
![Installing a game server for Terraria - TShock on Centos 7 - 11](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661090832_1.png)

Screenshot 8 - Starting TShock Server

  
In this menu, you can create a new world or run your previously created world. In this case, we create a new world.  
We make the basic setting of the world.  
After creating a world, it will be available in the list of worlds.  
  
![Installing a game server for Terraria - TShock on Centos 7 - 12](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661090488_10.png)

Screenshot 9 - List of worlds

  
We choose our world. After that, you can use all the items according to the standard. As soon as the server is started, there will be information that the server is started.  
  
![Installing a game server for Terraria - TShock on Centos 7 - 13](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661090463_11.png)

Screenshot 10 - Working server

  
If all actions are performed correctly, the server will be available for the game.  
  
![Installing a game server for Terraria - TShock on Centos 7 - 14](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a54@server-panel.net/2022/08/01/1661091199_1.png)

Screenshot 11 - Connecting to the server

  
To disconnect from our virtual server and the game server remains running, use the key combination Ctrl + A, and then press on D.  
After that, you can safely disconnect from the server. To return to the console of the TShock game server, write the command screen -r  
  


* * *

  
**Where are all game worlds located?**  
All game worlds are located in the directory /root/.local/share/Terraria/Worlds

* * *

  
**Where is the server configuration file located?**  
The configuration file "config.json" is located in the directory with the TShock game server in the tshock directory. In this case, the full path to /root/Terraria-Server/tshock

Similar articles:

[Adding resource records to a domain in DNS hosting](https://zomro.com/blog/faq/296-dobavlenie-zapisej-v-dns-hosting) [How to install FileBrowser in Docker](https://zomro.com/blog/faq/293-kak-ustanovit-file-browser-v-docker) [Installing the VestaCP panel](https://zomro.com/blog/faq/327-ustanovka-paneli-vestacp) [How to install and configure IIS on Windows Server](https://zomro.com/blog/faq/349-kak-ustanovit-i-nastroit-vebserver-iis-php-i-mysql-na-windows-server) [How to install HestiaCP](https://zomro.com/blog/faq/245-kak-ustanovit-hestiacp)

[ Virtual hosting from €3.98/mon ](/virtual)
