{"id":113303,"date":"2024-07-25T12:43:01","date_gmt":"2024-07-25T12:43:01","guid":{"rendered":"\/tutorials\/?p=113303"},"modified":"2026-03-10T09:27:29","modified_gmt":"2026-03-10T09:27:29","slug":"how-to-host-dedicated-terraria-server","status":"publish","type":"post","link":"\/ca\/tutorials\/how-to-host-dedicated-terraria-server","title":{"rendered":"How to Host a dedicated Terraria server using Hostinger Game Panel and manual configuration"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>A dedicated Terraria server gives you more flexibility and customization options that make the gameplay more interesting. For example, you can install various mods, set up a custom world, and play multiplayer with friends.<\/p><p>In this tutorial, we will explain how to host a dedicated Terraria server using two methods &ndash; with Hostinger&rsquo;s Game Panel and manually with commands via Terminal. Since they differ in use cases and difficulty, choose according to your preferences and needs.<\/p><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-prerequisites\">Prerequisites<\/h2><p>To set up a dedicated Terraria host, you need a <a href=\"\/ca\/tutorials\/what-is-vps-hosting\">virtual private server<\/a> (VPS) hosting plan from a provider like Hostinger. Ideally, it runs a newer version of the Linux operating system since the steps and commands will differ otherwise. In this tutorial, we will use <strong>Debian 12<\/strong>.<\/p><p>Your server should also have sufficient hardware resources to ensure optimal performance and gameplay responsiveness. While there are no strict requirements, we recommend a machine with at least 1 GB of RAM, a multi-core processor, and a solid-state drive (SSD).<\/p><p>The <strong>Hostinger KVM 2<\/strong> plan is an excellent choice. In addition to powerful hardware, it provides various features that help simplify the game server setup process, like our VPS AI assistant <strong>Kodee<\/strong>, which generates commands with simple prompts.<\/p><p>If you prefer a graphical user interface (GUI), use our Game Panel 2 plan of dedicated <a href=\"\/ca\/vps\/terraria-hosting\">Terraria server hosting<\/a>. It offers similar hardware and features as <strong>KVM 2<\/strong> but with additional tools like the one-click installer for <a href=\"\/ca\/tutorials\/games-with-dedicated-servers\">various games with dedicated server<\/a> compatibility.<\/p><?xml encoding=\"utf-8\" ?><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-game-server-hosting\" href=\"\/ca\/vps\/game-server-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/02\/Game_panel_in-text-banner-2-1.png\" alt=\"\" class=\"wp-image-103282\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-how-to-host-a-dedicated-terraria-server-with-hostinger-game-panel\">How to host a dedicated Terraria server with Hostinger Game Panel<\/h2><p>Hostinger Game Panel lets you set up and manage a private game server without commands, making it suitable for beginners. In addition to being more efficient, this method is safer since you won&rsquo;t run the wrong utilities.<\/p><p>Once you purchase a Game Panel hosting plan and finish the onboarding process, follow these steps to set up a Terraria dedicated server:<\/p><ol class=\"wp-block-list\">\n<li>On <strong>hPanel<\/strong>, click <strong>VPS <\/strong>at the sidebar.&nbsp;<\/li>\n\n\n\n<li>Click <strong>Manage<\/strong> on your gaming VPS.&nbsp;<\/li>\n\n\n\n<li>In the <strong>VPS Overview<\/strong> menu, click <strong>Manage panel<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1f6ee3baaf\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"238\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/02\/the-game-panel-access-button-on-the-vps-overview-page.png\" alt=\"The Game Panel access button on hPanel's VPS Overview menu\" class=\"wp-image-125930\" style=\"width:840px;height:auto\"  sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>On the login page, enter your credentials and click <strong>Login<\/strong>. You can obtain these details from the previous <strong>Overview <\/strong>menu.&nbsp;<\/li>\n\n\n\n<li>Click <strong>Create instance<\/strong> and select <strong>Terraria<\/strong> from the drop-down list.&nbsp;<\/li>\n\n\n\n<li>Click <strong>Create Instance<\/strong> to confirm.&nbsp;<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1f6ee3df37\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"592\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/07\/terraria-instance-creation-menu-in-hpanel-1024x592.png\" alt=\"Ls command shows extracted Terraria server folder\" class=\"wp-image-113307\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Wait until the installation process is finished, which should take a couple of minutes. Once finished, double-click the instance, click <strong>Start<\/strong>, and enter your Steam account credentials for authentication.<\/p><p><div class=\"protip\">\n                    <h4 class=\"title\">Pro Tip<\/h4>\n                    <p> Hostinger Game Panel also supports custom Terraria servers like <strong> tModLoader<\/strong> and <strong>Tshock<\/strong>. You can install them by selecting these applications when creating an instance.<\/p>\n                <\/div>\n\n\n\n<\/p><p>That&rsquo;s it! Now, scroll down to the <strong>Connection info <\/strong>section to obtain the IP address. Then, open the <strong>Terraria Game Client <\/strong>&rarr; <strong>Multiplayer <\/strong>and enter the details to connect to the server.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-manually-host-a-dedicated-server-in-terraria\">How to manually host a dedicated server in Terraria<\/h2><p>If you wish to use another operating system or configure additional software components, set up your dedicated Terraria Server manually. Before proceeding, we recommend downloading the cheat sheet below to help understand what the commands do.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Linux-Commands-Cheat-Sheet.pdf\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"283\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet-1024x283.png\" alt=\"\" class=\"wp-image-69262\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-1-log-in-to-your-vps-via-ssh\">1. Log in to your VPS via SSH<\/h3><p>To run commands on your VPS, you must connect via SSH <a href=\"\/ca\/tutorials\/how-to-use-putty-ssh\">using an application like PuTTY<\/a> or Terminal. Alternatively, Hostinger customers can do so via their web browser using the <strong>Browser terminal <\/strong>feature. <\/p><p>You can find the login credentials under the <strong>VPS details <\/strong>section at the bottom of the <strong>VPS Overview<\/strong> menu in hPanel.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1f6ee41b94\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"2044\" height=\"654\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/08\/debian-game-server-ssh-credentials-1.png\" alt=\"Server SSH login credentials in hPanel's VPS Overview page\" class=\"wp-image-126008\"  sizes=\"auto, (max-width: 2044px) 100vw, 2044px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>By default, you will connect as <strong>root<\/strong>, which can run administrative commands without confirmation. Using this account to manage your server can be risky since you might accidentally execute the wrong utility.<\/p><p>With that in mind, let&rsquo;s use a superuser instead. Running administrative utilities with this account requires a password and the sudo prefix, minimizing the risk of accidental execution.<\/p><p>Create one by entering the following, with <strong>username<\/strong> being your desired account name:<\/p><pre class=\"wp-block-preformatted\">useradd username<\/pre><p>Enter a new password and other details. Once created, add the new user to the <strong>sudoers<\/strong> group to grant it the superuser privileges:<\/p><pre class=\"wp-block-preformatted\">usermod -a -G sudo username<\/pre><p>Now, let&rsquo;s switch to the new user by running the following command:<\/p><pre class=\"wp-block-preformatted\">su username<\/pre><p>Enter <strong>cd<\/strong> to return to the main directory. We are set! Now, let&rsquo;s start installing the required tools and server software components.<\/p><h3 class=\"wp-block-heading\" id=\"h-2-download-the-required-tools\">2. Download the required tools<\/h3><p>The Terraria server doesn&rsquo;t require any dependency to run. However, we must install several tools to download and extract the components. Before doing so, let&rsquo;s update the system library using this command:<\/p><pre class=\"wp-block-preformatted\">sudo apt update &amp;&amp; sudo apt upgrade<\/pre><p>Now install the following tools:<\/p><ul class=\"wp-block-list\">\n<li><a href=\"\/ca\/tutorials\/wget-command-examples\/\"><strong>Wget<\/strong><\/a> &mdash; a utility for downloading the Terraria server components from its website.<\/li>\n\n\n\n<li><strong><a href=\"\/ca\/tutorials\/how-to-unzip-files-linux\/\">Unzip <\/a><\/strong>&mdash; a tool for extracting an archive file.<\/li>\n\n\n\n<li><a href=\"\/ca\/tutorials\/how-to-install-and-use-linux-screen\"><strong>Screen<\/strong><\/a><strong> <\/strong>&mdash; a terminal multiplexer for running the Terraria server in the background.<\/li>\n<\/ul><p>Configure them by running this command:<\/p><pre class=\"wp-block-preformatted\">sudo apt install wget tar screen<\/pre><p>Now, enter the following commands one by one to check if these tools are installed properly:<\/p><pre class=\"wp-block-preformatted\">unzip --version<br><br>wget --version<br><br>screen --version<\/pre><p>If your command-line interface outputs version numbers like the following, the tools are properly configured. Otherwise, you will see the &ldquo;command not found error&rdquo; and must rerun the installation commands.<\/p><h3 class=\"wp-block-heading\" id=\"h-3-download-the-terraria-server-files\">3. Download the Terraria server files<\/h3><p>Download the Terraria server components using the <strong>wget<\/strong> command. Remember to replace <strong>URL<\/strong> with the actual download link:<\/p><pre class=\"wp-block-preformatted\">sudo wget URL<\/pre><p>Check out the <a href=\"https:\/\/terraria.fandom.com\/wiki\/Server\" target=\"_blank\" rel=\"noopener\">Terraria wiki<\/a> to learn more about the available server version and their download URLs. For example, we will use version <strong>1.4.2.3<\/strong>:<\/p><pre class=\"wp-block-preformatted\">sudo wget https:\/\/terraria.org\/api\/download\/pc-dedicated-server\/terraria-server-1423.zip<\/pre><p>Once the download is finished, extract the file using the following command:<\/p><pre class=\"wp-block-preformatted\">sudo unzip terraria-server-1423.zip<\/pre><p>Terminal will extract all the software components into a new folder, whose name depends on the version number. For example, if you install version <strong>1.4.2.3<\/strong>, the name will be <strong>1423<\/strong>. You can check if it exists by running this command:<\/p><pre class=\"wp-block-preformatted\">ls<\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1f6ee441c1\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"846\" height=\"66\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/07\/ls-command-shows-extracted-terraria-server-folder.png\" alt=\"Ls command shows extracted Terraria server folder\" class=\"wp-image-113308\"  sizes=\"auto, (max-width: 846px) 100vw, 846px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Now, navigate to the new folder using the <strong>cd<\/strong> command. Remember to change the name accordingly:<\/p><pre class=\"wp-block-preformatted\">cd 1423<\/pre><p>List the directory&rsquo;s content by running ls again. You should see a folder called Linux. Let&rsquo;s navigate to it using this command:<\/p><pre class=\"wp-block-preformatted\">cd Linux<\/pre><p>Within the folder, check whether you have <strong>TerrariaServer.bin.x86_64<\/strong> &ndash; the file we will use to start the game server. You can do so by running ls and filtering the output with <strong>grep<\/strong> like so:<\/p><pre class=\"wp-block-preformatted\">ls | grep TerrariaServer.bin.x86_64<\/pre><p>If the binary file doesn&rsquo;t exist, try downloading and extracting the server archive again. Otherwise, allow the current user to run it by changing the permission using this command:<\/p><pre class=\"wp-block-preformatted\">sudo chmod +x TerrariaServer.bin.x86_64<\/pre><h3 class=\"wp-block-heading\" id=\"h-4-start-the-server\">4. Start the server<\/h3><p>Now, let&rsquo;s start the Terraria server by running the following command:<\/p><pre class=\"wp-block-preformatted\">.\/TerrariaServer.bin.x86_64<\/pre><p>During the first startup, Terraria will ask you to enter information about your new game world, like its size and difficulty. You can find the acceptable values at the top of the question.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1f6ee466e4\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"950\" height=\"230\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/07\/terraria-server-prompts-user-to-configure-a-new-world.png\" alt=\"Terraria server prompts user to configure a new world\" class=\"wp-image-113309\"  sizes=\"auto, (max-width: 950px) 100vw, 950px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Wait until Terraria finishes generating your new world. Once completed, select it as the area to load. Then, enter other details like the maximum number of players, the port number, and the port forwarding option.<\/p><p>You will learn about ports in the later section. For now, let&rsquo;s use the default value by hitting <strong>Enter<\/strong>. That&rsquo;s it! The terminal should show that your server has started.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1f6ee48c41\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"652\" height=\"202\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/07\/terminal-indicates-that-terraria-server-has-started.png\" alt=\"Terminal indicates that Terraria server has started\" class=\"wp-image-113310\"  sizes=\"auto, (max-width: 652px) 100vw, 652px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Terraria will save your world files in the <strong>~\/.local\/share\/Terraria\/Worlds\/ <\/strong>directory. You can also upload an existing area to the folder using a <a href=\"\/ca\/tutorials\/what-is-ftp\">file transfer protocol<\/a> (FTP) client like FileZilla.<\/p><p>However, running the server directly on the main Terminal shell can be unreliable. Since it will shut down when you terminate the SSH session, you must maintain the connection to your VPS.<\/p><p>To keep your Terraria server running in the background, launch it using a multiplexer like <strong>Screen<\/strong>. Create a new virtual shell with this command:<\/p><pre class=\"wp-block-preformatted\">screen&nbsp;<\/pre><p>Then, navigate to the Terraria folder and run the startup script normally:<\/p><pre class=\"wp-block-preformatted\">cd 1423\/Linux<br><br>.\/TerrariaServer.bin.x86_64<\/pre><p>Press <strong>Ctrl + A<\/strong> and <strong>D<\/strong> to detach from the Screen session and return to the main Terminal shell. Now, you can disconnect from your VPS without interrupting the Terraria server.<\/p><p>To return to the Screen session where the Terraria server is running, enter the following command:<\/p><pre class=\"wp-block-preformatted\">screen -r<\/pre><h2 class=\"wp-block-heading\" id=\"h-advanced-terraria-server-configurations\">Advanced Terraria server configurations<\/h2><p>While you use the default settings, changing several configurations helps <a href=\"\/ca\/tutorials\/how-to-optimize-a-dedicated-game-server\">optimize your game server performance<\/a> and security. Here are several tasks to consider.<\/p><p><strong>Customizing server settings<\/strong><\/p><p>You can change your Terraria server configuration by entering various console commands into Terminal. For instance, you can modify the number of player slots and the room&rsquo;s password.<\/p><p>Alternatively, you can create a configuration file to apply the settings automatically during the server startup. Here&rsquo;s how to do so:<\/p><ol class=\"wp-block-list\">\n<li>Navigate to the folder where you want to create the configuration file. You can use any location, but we recommend the root Terraria directory:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">cd ~\/.config\/TerrariaServer<\/pre><ol start=\"2\" class=\"wp-block-list\">\n<li>Create the file <a href=\"\/ca\/tutorials\/how-to-install-and-use-nano-text-editor\">using the Nano text editor<\/a>:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">sudo nano serverconfig.txt<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Enter your desired server settings. Check the <a href=\"https:\/\/terraria.wiki.gg\/wiki\/Guide:Setting_up_a_Terraria_server\" target=\"_blank\" rel=\"noopener\">Terraria wiki guide<\/a> to learn more about the configurations.&nbsp;<\/li>\n\n\n\n<li>Once finished, press <strong>Ctrl + X<\/strong>, <strong>Y<\/strong>, and <strong>Enter<\/strong> to save the changes.<\/li>\n<\/ol><p>Now when you start the Terraria server, apply the settings by calling the file using the <strong>-config<\/strong> option like so:<\/p><pre class=\"wp-block-preformatted\">.\/TerrariaServer.bin.x86_64 -config serverconfig.txt<\/pre><p>While you can specify several server settings in the configuration file, it won&rsquo;t let you modify your Terraria world. You must use the console commands to do so.<\/p><p>Hostinger Game Panel users can directly edit the server configuration by navigating to the <strong>Terraria instance<\/strong> &rarr; <strong>sidebar<\/strong> &rarr; <strong>configurations<\/strong> &rarr; <strong>Terraria Server<\/strong>. Meanwhile, go to Terraria <strong>Generator Settings<\/strong> to modify your game world.<\/p><p><strong>Port forwarding and firewall setup<\/strong><\/p><p>Hostinger Game Panel automatically configures your Terraria server&rsquo;s network settings to ensure players can connect seamlessly. However, if you set up the host manually, you might need to adjust port and firewall configurations.<\/p><p>Port forwarding means opening a specific endpoint to allow clients to connect to your VPS and use the hosted service. During the startup process, Terraria should ask you to enter the port number to enable connection.<\/p><p>If you encounter issues, however, open the port manually by creating a new firewall rule. For Debian, the easiest way to do it is using the <a href=\"\/ca\/tutorials\/how-to-configure-firewall-on-ubuntu-using-ufw\/\">Uncomplicated Firewall<\/a> (UFW). Install it by running:<\/p><pre class=\"wp-block-preformatted\">sudo apt install ufw<\/pre><p>Then, add port <strong>7777<\/strong> for Terraria and <strong>22<\/strong> for SSH by entering these commands subsequently:<\/p><pre class=\"wp-block-preformatted\">sudo ufw allow 7777\/tcp&nbsp;<br><br>sudo ufw allow 22\/tcp<\/pre><p>Enable UFW to apply the rules by running the following. If you already have the firewall running, replace<strong> enable <\/strong>with <strong>reload<\/strong>:<\/p><pre class=\"wp-block-preformatted\">sudo ufw enable<\/pre><p>In Hostinger VPS, you can add firewall rules without any command via hPanel. To do so, open your VPS Overview menu and follow these steps:<\/p><ol class=\"wp-block-list\">\n<li>Navigate to the<strong> sidebar<\/strong> &rarr; <strong>Security<\/strong> &rarr; <strong>Firewall<\/strong>.&nbsp;<\/li>\n\n\n\n<li>Click <strong>Create firewall configuration<\/strong>.<\/li>\n\n\n\n<li>Enter a name and hit<strong> Create<\/strong>.<\/li>\n\n\n\n<li>From the list, you will see the newly created rule. Click the <strong>three-dot icon<\/strong> &rarr; <strong>Edit<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1f6ee4b4c1\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"334\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/07\/the-edit-menu-on-a-firewall-configuration.png\" alt=\"The firewall configuration's Edit button on hPanel\" class=\"wp-image-125995\"  sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"5\" class=\"wp-block-list\">\n<li>Add <strong>two<\/strong> rules that accept connections to ports <strong>7777<\/strong> and <strong>22<\/strong> from <strong>any<\/strong> source.&nbsp;<\/li>\n\n\n\n<li>Click the <strong>Arrow<\/strong> icon to return to the main page and click <strong>Activate<\/strong> on your new rule.<\/li>\n<\/ol><p>Alternatively, you can also ask Kodee AI assistant to set up the firewall rule for your Terraria server. Simply ask it, &ldquo;Create two firewall rules that accept connection to ports <strong>7777<\/strong> and <strong>22 TCP\/UDP<\/strong> from any IP address.&rdquo;<\/p><p><strong>Managing server backups and restorations<\/strong><\/p><p>Regularly back up your server files to ensure you can quickly recover your game data after errors or cyber-attacks. The steps to do so differ depending on <a href=\"\/ca\/tutorials\/best-game-server-hosting\">game hosting providers<\/a>&rsquo; features.<\/p><p>At Hostinger, our gaming VPS provides an automatic weekly backup that simplifies the data restoration process. We also include a free snapshot that captures your server configuration at a specific time.<\/p><p>To enable automatic backup in your Hostinger Game Panel hosting, open the VPS Overview page and navigate to the <strong>sidebar<\/strong> &rarr; <strong>Settings<\/strong> &rarr; <strong>Backup &amp; Monitoring<\/strong>. Select <strong>Snapshots &amp; Backups<\/strong>.<\/p><p>Click<strong> Auto-backups<\/strong> settings, select the <strong>Weekly<\/strong> option, and hit <strong>Save<\/strong>. That&rsquo;s it! From this menu, you can also manage all the restore points and snapshots easily without commands.<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Creating a dedicated Terraria server enables you to install mods, customize the world settings, and manage players to improve gameplay. In this article, we have explained how to do so using Hostinger&rsquo;s Game Panel and commands.<\/p><p>To set up a Terraria server in the Hostinger Game Panel, simply log in and create an instance. From this menu, you can also install mods and configure the game settings without commands.<\/p><p>If you want to set up the game server manually, connect to your VPS via SSH and create a new superuser. Install the tools required to set up the software, like unzip, wget, and Linux Screen.<\/p><p>Download the Terraria server archive, extract it, and run the startup file. You can also launch it in the background via Screen and apply additional settings by calling a configuration file. If you encounter an error, make sure to forward the right port using your firewall.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-host-a-dedicated-terraria-server-faq\">How to host a dedicated Terraria server FAQ<\/h2><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1721911149866\"><h3 class=\"schema-faq-question\">How many players can join a dedicated Terraria server?<\/h3> <p class=\"schema-faq-answer\">While Terraria doesn&rsquo;t specify the limit, the slot is limited to <strong>16 <\/strong>by default. However, the maximum number depends on your system&rsquo;s hardware. For example, a server with 1 GB of RAM is ideal for 16 players.&nbsp;<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1721911156471\"><h3 class=\"schema-faq-question\">Can I modify the game settings on a dedicated Terraria server?<\/h3> <p class=\"schema-faq-answer\">Absolutely! You can modify game settings on your Terraria server using console commands via Terminal. You can also create a file that loads configurations automatically during startup. Meanwhile, Hostinger Game Panel users can modify the game using a graphical user interface.&nbsp;<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1721911162432\"><h3 class=\"schema-faq-question\">Can I install mods on a dedicated Terraria server?<\/h3> <p class=\"schema-faq-answer\">Yes, you can install mods on your Terraria server by configuring <a href=\"https:\/\/github.com\/tModLoader\/tModLoader\" target=\"_blank\" rel=\"noopener\">tModLoader<\/a> from its official GitHub repository. Alternatively, Hostinger Game Panel users can set up the tool by creating an instance and managing the mods directly from the same menu.&nbsp;<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>A dedicated Terraria server gives you more flexibility and customization options that make the gameplay more interesting. For example, you can install various mods, set up a custom world, and play multiplayer with friends. In this tutorial, we will explain how to host a dedicated Terraria server using two methods &ndash; with Hostinger&rsquo;s Game Panel [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ca\/tutorials\/how-to-host-dedicated-terraria-server\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":337,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to host a dedicated server in Terraria","rank_math_description":"Learn how to set up a dedicated Terraria server. This guide covers two methods: using the Hostinger Game Panel and manual server configuration.","rank_math_focus_keyword":"how to host a dedicated terraria server","footnotes":""},"categories":[22704,22699],"tags":[],"class_list":["post-113303","post","type-post","status-publish","format-standard","hentry","category-game-server","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-host-dedicated-terraria-server","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/como-crear-servidor-terraria","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-host-dedicated-terraria-server","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-host-dedicated-terraria-server","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-host-dedicated-terraria-server","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/como-crear-servidor-terraria","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/como-crear-servidor-terraria","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/como-crear-servidor-terraria","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-host-dedicated-terraria-server","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-host-dedicated-terraria-server","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-host-dedicated-terraria-server","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-host-dedicated-terraria-server","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/113303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/users\/337"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/comments?post=113303"}],"version-history":[{"count":13,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/113303\/revisions"}],"predecessor-version":[{"id":137518,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/113303\/revisions\/137518"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/media?parent=113303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/categories?post=113303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/tags?post=113303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}