Skip to content Nodecraft
Support / Terraria / Changing and Switching Worlds
Terraria Icon
Create a Terraria Server today!
Start Free Trial

Changing and Switching Worlds

Terraria Worlds

On a Terraria world running on a dedicated server, many of the functions that can be set in the main menu of a single-player game are inaccessible.

Instead, these are set by editing configuration files that the server will check before running.

By changing the setting in the configuration files, you can control the following:

  • Determine what size world the server will create: small, medium, or large.

  • Determine the difficulty level: normal or expert mode.

  • Give a newly created world a specific name (beside the default "world")

  • Have the server create a fresh unused world

  • Have the server "switch" worlds and load a different world next time it starts, and by repeating this allow you to switch back and forth between already generated worlds.

Before Using this Guide

It's highly recommended that before using this guide, you Start your server and let the server finish starting up. When the server is run for the first time, it will automatically generate many of the files and folders you will need to edit. During this process, the game will automatically generate a default world, which will take several minutes. This default world can be deleted later if you wish to create a world with custom settings.

If the server has never been run, many of the files you will need to change will not be present, this guide will be difficult to follow, and your Server Files view will not match many of the screenshots used as examples

Location of the Config File

The config file that controls most of the settings in the game is located in the main directory of the Terraria game, viewed by selecting the "Server Files" tab on the left side of the panel.

The file is called serverconfig.txt and is highlighted in the following picture:

A view of Nodecraft Pro's file explorer for Terraria highlighting the serverconfig.txt file

The Worlds Folder

Also, in the picture below, the worlds folder is highlighted.

A view of a Terraria server's Server Files in Nodecraft Pro, with the worlds folder highlighted

The worlds folder is the default location where the game stores all the "save" files for worlds. These files contain the world map, buildings, containers, and items you've created. Player information (your stats and personal inventory) is stored separately from the world information in a different location. You can delete a world without affecting any of your characters, or the character's inventory.

Each separate world will have two files with the same name, one ending in .wldextension, and a second that ends with .wld.bak (which is a backup). The file that ends in .bak is created each time the server stops and is shut down.

Editing the Config File

From the Server Files tab in the Nodecraft Pro panel, select the serverconfig.txt file, and then click the Edit button. It's highly recommended that you stop the server and that it not be running when you make any changes to the config files.

A view of Nodecraft Pro's file explorer for Terraria highlighting the serverconfig.txt file

This will open a basic text editor, and display the contents of the serverconfig.txt file, which should look like the picture below:

A view of a raw serverconfig.txt file for Terraria within Nodecraft Pro

On Terraria servers at here at Nodecraft, we have an automated UI built into our server control panel that configures all the world creation settings for our users and even allows them to create multiple worlds and switch between them easily. Because of this automated system, the config files for Terraria will be dramatically different than the screenshots presented here. The comment lines have been removed, and the settings are directly changed by the UI on the control panel.

Because of this, the specific line numbers referenced in the following sections will only apply to the default configuration files for Terraria.

The config file has numbered lines down the left side, which makes it more convenient to find specific settings when repeatedly editing the file.

The settings in the config file come in 2 line pairs.

The first line is a comment that describes what the setting does, and in many cases, gives you the actual settings allowed. The second line is the actual setting the game will follow when the server starts next time.

In the config file, any line that begins with a pound sign ( # ) is a comment, and the game ignores any of the text past the # sign.

Some of the settings are optional (like a password), and both lines are "commented out". If you want to enable these settings, it is necessary to remove the # from in front of the 2nd line.

Custom Settings for World Generation

The following settings only take effect when a new world is created. If you change these settings, and then reload an already generated world, they will have no effect.

World Size:

The autocreate setting for Terraria in serverconfig.txt file

Edit line 20 of the config file, which is normally autocreate=1. As is shown in the picture above, change the number after the = sign to set what size world it creates.

  • 1= small world

  • 2 = medium world

  • 3 = large world

Increasing the world size will require more RAM to run the server smoothly. The small world runs fine on 2 GB of RAM, but a medium world will require 4 GB of RAM, while a large world will need 6 GB to run correctly. Generating medium and large-size worlds on 2 GB servers will most likely result in severe performance issues that will affect gameplay.

Difficulty

The difficulty setting for Terraria in serverconfig.txt file

Edit line 23 of the config file, which is normally #difficulty=0

  • 0 = normal mode

  • 1 = Expert Mode

In expert mode, the game is significantly harder: you will take more damage from enemy attacks, special monsters spawn, special items can drop from monsters, and bosses will drop special loot bags with unique items in them.

For this line to take effect, it's necessary to remove the # from in front of "difficulty" so the line is no longer "commented out". It should look like difficulty=1 when finished editing, to enable Expert Mode.

World Name

The worldname setting for Terraria in serverconfig.txt file

Edit line 26, of the config file, which is normally #worldname=Terraria

Normally, the first world created is world.wld. If you change the file name on line 5 of the config, regardless of what file name you use there it will create a new world and call it world2.wld. Change the file name again, and the server creates World3.wld, and so on, and so on. Doesn't matter what filename you use on line 5, it just creates a world or a world followed by a number.

Changing this setting will cause the game to use a specific filename instead of the generic world, world2, world3, etc when generating a new world.

This line is normally "commented out", and for the game to use this setting, it will be necessary to remove the # from in front of the line, so it looks like worldname=worldname. Remember that filenames cannot have spaces, or special characters in them. If you want spaces, use characters like underscore (_) instead.

Deleting a Terraria World

Deleting the world files for Terraria within Nodecraft Pro

To get rid of a Terraria world, click on Server Files, then click on the "worlds" folder.

Inside the folder, find the world you want to delete. There will be two files with the same name (the default is "world"), one ending in .wld, and the other in .wld.bak. Select the files, and click the "delete" button in Server Files. That's it, the world is gone.

Characters and the character's inventory are saved completely separately from worlds, and will not be affected by deleting a world. This only includes the items in the character's hot bar and inventory. Anything left in any kind of container is part of the world map, and will be deleted along with the world the container is on.

Alternative method: Instead of deleting a world, it's possible to simply rename the world files.

The game will only look for specific file names, and if they don't exactly match, will skip them. So, you can select a file and then click the "rename" button in Server Files, and edit the name of the file. One common method is to add .old onto the very end of the file name.

Renaming the world files for Terraria within Nodecraft Pro

Repeat this process with the other file (world.wld.bak), and the server will cease to "see" those files anymore since their filenames don't match entries in the config file anymore.

This method is often safer than deleting files, and you can undo the changes by simply renaming the file again and removing the changes. If the file names exactly match the settings in serverconfig.txt (see next section below), the server will "see" them again, and will load them.

Creating a New Terraria World

The world that Terraria loads on startup is controlled by lines 4 and 5 in serverconfig.txt

The world setting in the serverconfig.txt file for Terraria

The default name for the world is "world", and the server will look for the file world.wld in the worlds folder, and load that file if that file already exists.

If the server cannot find this specific filename on line 5 of serverconfig.txt at startup in the "worlds" folder, the server will instead create a whole new world.

The server will use whatever auto-create settings are already entered in the config file. Regardless of what filename you add on line 5, the new world will be called "world" followed by a number. The second world you create is world2.wld, the third world created is world3.wld, and so on. If you want to have the new world created be named something else, change the auto-create world name settings on line 26 in the config file (see above).

Of course, you can always rename the world after it's created, but changing line 26 does it automatically for you.

So by deleting, moving, or renaming world files in the "worlds" folder, you can make the server generate entirely new worlds. If it cannot find the file name at the end of line 5 in the config file, it will instead make a new world.

Creating Multiple Terraria Worlds

By using information from the section above, it's possible to have the server create multiple worlds, each with different settings if you wish (world size, difficulty, etc).

If you edit line 5 and change the filename to something different, it will cause the server to generate an entirely new world. The first world is titled world.wld, the second is world2.wld, and so on. If you change the auto-create world name on line 26 of the config file, the game will instead rename it to your choosing.

When you run the server and stop it for the first time, the "worlds" folder will look like this example:

One world in the worlds folder for Terraria in Nodecraft Pro

If you make the underlined changes to the serverconfig.txt file:

The serverconfig.txt file for creating World2

Then start and stop the server, and your "worlds" folder will look like this example:

Two worlds in the worlds folder for Terraria in Nodecraft Pro

The files that end in .bak are only created when you stop the server, so if the server is still running, you will only see World2.wld

If you make the underlined changes below to the serverconfig.txt file, it will create a third. This time, the size of the world is set to "large", and the difficulty is set to "expert".

The serverconfig.txt file for creating World3

When you start the server, it will now create a large size, expert-mode world called World3.wld

Three worlds in the worlds folder for Terraria in Nodecraft Pro

Switching Between Multiple Worlds

In the example above, there are now three worlds created in the "worlds" folder:

  • World.wld - The default one created when the game was first run

  • World2.wld - A size small, normal mode world

  • World3.wld - A size large, expert mode world

By editing the config file, like the example below, the server will load the 2nd world, World2.wld the next time the server starts.

The serverconfig.txt file for loading World2

If you notice, line 26 still says World3, the size is still set to 3, and the difficulty is set to Expert. None of these settings will matter, since the server is directed to load the file World2.wld, which it does find in the "worlds" folder. Those settings are only used for new world creation, and since that file exists, it will load World2.wld instead of making a new world.

If you stop the server and edit the config, you can have it load World.wld next, or World.wld. By changing line 5 of the config file, you can switch between worlds, as long as the filename already exists in the "worlds" folder.

Chat blocked!

Nodecraft is an ad-free website! Disable adblock if you have any questions.