Terraria dedicated server linux

Terraria dedicated server linux

при первом запуске, сервер попросит создать новый мир, нажимаем «n»

далее указываем 4 параметра нового мира, после этого начнется генерация мира:

после окончания генерации нового мира, выбираем наш мир

далее указываем 4 стартовых параметра (все параметры по умолчанию), они нужны для запуска сервера

максимальное кол-во игроков на сервере порт по которому будет доступен сервер автоматические перенаправление портов пароль при входе на сервер

когда сервер запустится, в консоли вы увидите сообщение желтыми буквами, запоминаем «/auth 5915196«, у вас будет свой цифровой код

SetupToken — the /auth token used by the setup system to grant temporary superadmin access to new admins.

с версии TShock 4.3.20 убрали ненужный ввод /auth-verify, после создания superadmin

Security improvement: The auth system is now automatically disabled if a superadmin exists in the database.

заходим на сервер с клиента игры, в чате игры вводим «/auth 5915196«, получаем полный доступ к серверу

создаем аккаунт superadmin

логинимся как superadmin ( можно приступить к администрированию сервера )

после создания superadmina, переходим обратно в консоль сервера, вводим команду «/exit«, тобишь сохраним мир и выключим сервер, для дальнейшей настройки

при последующих запусках tshock, в консоли больше не будет предупреждения

если еще раз набрать «/auth 5915196«, сервер вас кикнет, написав сообщение:

Источник

How to Setup a Terraria Linux Server

Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.

Terraria is a two-dimensional sandbox game, similar to Minecraft, which allows players to explore, build, and battle in an open world.

Does Terraria support Linux?

In 2015, the Terraria developers announced support for Linux, which means that players can host their own standalone Terraria servers.

This guide outlines the steps required to run a Terraria server for yourself and others to play on. These steps are compatible with any Linux distribution that uses systemd. This includes recent versions of CentOS, Debian and Ubuntu, Arch Linux and Fedora.

Due to Terraria’s system requirements, a Linode with at least two CPU cores and adequate RAM is required. For this reason, we recommend using our 4GB plan or higher when following this guide. If your Linode does not meet Terraria’s minimum requirements, the process will crash intermittently.

Читайте также:  D link dwa 131 linux drivers

Before You Begin

  1. If you have not already done so, create a Linode account and Compute Instance. See our Getting Started with Linode and Creating a Compute Instance guides.
  2. Follow our Setting Up and Securing a Compute Instance guide to update your system. You may also wish to set the timezone, configure your hostname, create a limited user account, and harden SSH access.

Configure a Firewall for Terraria

Firewalld

Firewalld is the default iptables controller in CentOS 7+ and Fedora. See our guide on using firewalld for more information.

    Enable and start firewalld:

sudo systemctl enable firewalld && sudo systemctl start firewalld 
sudo firewall-cmd --get-active-zones 
sudo firewall-cmd --zone=public --permanent --add-service=terraria sudo firewall-cmd --reload sudo firewall-cmd --zone=public --permanent --list-services 
dhcpv6-client ssh terraria 

UFW

UFW (Uncomplicated Firewall) is an iptables controller packaged with Ubuntu, but it’s not installed in Debian by default.

sudo ufw allow ssh sudo ufw allow 7777/tcp 
sudo ufw enable sudo ufw delete 4 

The second command in this step, sudo ufw delete 4 references the fourth rule in your UFW ruleset. If you need to configure additional rules for different services, adjust this as necessary. You can see your UFW ruleset with sudo ufw status to make sure you’re removing the correct rule.

iptables

To manually configure iptables without using a controller, see our iptables guide for a general ruleset.

    You’ll also want to add the rule below for Terraria:

sudo iptables -A INPUT -p tcp --dport 7777 -j ACCEPT 

Install and Configure Terraria on Linux

  1. Download the Terraria tarball. You’ll need to check Terraria’s website for the current release version. Right-click and copy the link to use with curl or wget . We’ll use 1.4.2.3 as an example in this guide:
sudo curl -O https://terraria.org/api/download/pc-dedicated-server/terraria-server-1423.zip 

Before you install Terraria, be sure the version you download is the same as the clients that will be connecting to it.

sudo unzip terraria-server-* 
 sudo chmod +x ~/1423/Linux/TerrariaServer.bin.x86_64 

The options below will automatically create and serve the world MyWorld when the game server starts up. Note that you should change MyWorld to a world name of your choice.

Managing the Terraria Service

Screen

Terraria runs an interactive console as part of its server process. While useful, accessing this console can be challenging when operating game servers under service managers. The problem can be solved by running Terraria in a screen session that will enable you to send arbitrary commands to the listening admin console within Screen.

Install Screen with the system’s package manager:

Debian/Ubuntu:

systemd

It’s useful to have an automated way to start, stop, and bring up Terraria on boot. This is important if the system restarts unexpectedly.

Create the following file to define the terraria systemd service, replacing example_user with your limited username:

  • ExecStart instructs systemd to spawn a screen session containing the 64-bit TerrariaServer binary, which starts the daemon. KillMode=none is used to ensure that systemd does not prematurely kill the server before it has had a chance to save and shut down gracefully.
  • ExecStop calls a script to send the exit command to Terraria, which tell the server to ensure that the world is saved before shutting down. In the next section, we’ll create a script which will send the necessary commands to the running Terraria server.
Читайте также:  Acer aspire one linux bios

This script is intended to save your world in the event that you reboot the operating system within the Linode. It is not intended to save your progress if you reboot your Linode from the Linode Manager. If you must reboot your Linode, first stop the Terraria service using sudo systemctl stop terraria . This will save your world, and then you can reboot from the Linode Manager.

Create a Script for Basic Terraria Administration

The Terraria administration script needs two primary functions:

  • Attaching to the running screen session, which offers a helpful administration console.
  • The ability to broadcast input into the screen session so the script can be run to save the world, exit the server, etc.
sudo chmod +x /usr/local/bin/terrariad 

This script permits you to both:

  • Attach to the console for direct administration, and
  • Send the console commands like save or exit while it’s running without needing to attach at all (useful when services like systemd need to send server commands).

Throughout the rest of this guide, you may encounter “command not found” errors when running the terrariad command. This may result from the directory /usr/local/bin/ not being found in the $PATH when running sudo commands, which can occur with some Linux distributions. You can work around this problem by calling the script with the full path. For example, instead of running sudo terrariad attach , use sudo /usr/local/bin/terrariad attach .

Running Terraria Linux Server

Start and Enable the Terraria Server

Now that the game server is installed, the scripts are written, and the service is ready, the server can be started with a single command:

sudo systemctl start terraria 

The first time you run the server, it will generate the world defined earlier. This will take a while, so give it time before trying to connect. To watch the world generation progress, use:

In addition to starting and stopping the terraria service, systemd can also use the service file created earlier to automatically start Terraria on boot.

To enable the service at startup:

sudo systemctl enable terraria 

If the operating system is restarted for any reason, Terraria will launch itself on reboot.

Server Status

To check if the server is running, use the command:

sudo systemctl status terraria 

The output should be similar to:

● terraria.service Loaded: loaded (/etc/systemd/system/terraria.service; disabled) Active: active (running) since Tue 2017-03-07 17:37:03 UTC; 7s ago Process: 31143 ExecStart=/usr/bin/screen -dmS terraria /bin/bash -c /opt/terraria/TerrariaServer.bin.x86_64 -config /opt/terraria/serverconfig.txt (code=exited, status=0/SUCCESS) Main PID: 31144 (screen) CGroup: /system.slice/terraria.service ├─31144 /usr/bin/SCREEN -dmS terraria /bin/bash -c /opt/terraria/TerrariaServer.bin.x86_64 -config /opt/terraria/serverconfig.txt └─31145 /opt/terraria/TerrariaServer.bin.x86_64 -config /opt/terraria/serverconfig.txt

Stop the Server

If you ever need to shut down Terraria, use the following command to save the world and shut down the game server:

sudo systemctl stop terraria 

Attach to the Console

In the course of running your server, you may need to attach to the console to do things like kick players or change the message of the day (MOTD). To enter the Terraria server console with the terrariad script use:

Читайте также:  Linux команда run as

Type help to get a list of commands. Once you’re done, use the keyboard shortcut CTRL+A then D to detach from the screen session and leave it running in the background. More keyboard shortcuts for Screen can be found in the Screen default key bindings documentation.

How do I host a Terraria Server for free?

To host a Terraria server for free, choose a free plan first and then choose the country where you are planning to host this Terraria server.

How do I find my server port for Terraria?

Default server port for Terraria is 7777. But if you have port forwarding enabled, your server port is your IP address + Colin + the port number.

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

This page was originally published on Monday, December 21, 2015.

Источник

Terraria dedicated server linux

при первом запуске, сервер попросит создать новый мир, нажимаем «n»

далее указываем 4 параметра нового мира, после этого начнется генерация мира:

после окончания генерации нового мира, выбираем наш мир

далее указываем 4 стартовых параметра (все параметры по умолчанию), они нужны для запуска сервера

максимальное кол-во игроков на сервере порт по которому будет доступен сервер автоматические перенаправление портов пароль при входе на сервер

когда сервер запустится, в консоли вы увидите сообщение желтыми буквами, запоминаем «/auth 5915196«, у вас будет свой цифровой код

SetupToken — the /auth token used by the setup system to grant temporary superadmin access to new admins.

с версии TShock 4.3.20 убрали ненужный ввод /auth-verify, после создания superadmin

Security improvement: The auth system is now automatically disabled if a superadmin exists in the database.

заходим на сервер с клиента игры, в чате игры вводим «/auth 5915196«, получаем полный доступ к серверу

создаем аккаунт superadmin

логинимся как superadmin ( можно приступить к администрированию сервера )

после создания superadmina, переходим обратно в консоль сервера, вводим команду «/exit«, тобишь сохраним мир и выключим сервер, для дальнейшей настройки

при последующих запусках tshock, в консоли больше не будет предупреждения

если еще раз набрать «/auth 5915196«, сервер вас кикнет, написав сообщение:

Источник

Оцените статью
Adblock
detector