keepcalculator

06 Numbers and Powers

Run Multiple Worlds on One Valheim Dedicated Server

Card No. 06·70918 · Updated · Standard formula, shown below

Running multiple worlds on a single Valheim dedicated server lets you host separate survival experiences—like a peaceful build world and a hardcore combat world—without paying for or managing multiple machines. You can switch between them by restarting the server with a different world file, or run several server instances at once if your hardware can handle it. This guide covers both approaches, so you can pick what fits your setup.

What You’ll Need

  • A Windows or Linux machine (or a VPS) that meets Valheim’s minimum server requirements: 2+ CPU cores, 4 GB RAM, and about 2 GB free disk space per world.
  • The Valheim dedicated server files. On Windows, you can get them via SteamCMD or the Steam client’s “Valheim Dedicated Server” tool. On Linux, use SteamCMD.
  • Basic comfort with editing text files and running commands in a terminal or command prompt.
  • Optional: a tool like WinSCP or nano if you’re managing a remote Linux server.

Step-by-Step

Method 1: Switch Worlds by Editing the Start Script (Simplest)

  1. Locate your server files. After installing the Valheim Dedicated Server, find the folder. On Windows it’s usually steamapps/common/Valheim Dedicated Server. On Linux it’s often /home/steam/valheim/server or wherever you placed it.
  2. Find your world files. Your worlds are stored in a separate folder, typically %USERPROFILE%/AppData/LocalLow/IronGate/Valheim/worlds on Windows or ~/.config/unity3d/IronGate/Valheim/worlds on Linux. Each world has two files: WorldName.fwl and WorldName.db.
  3. Create a new world (optional). If you don’t have a second world yet, start the server once with a new world name (e.g., -world "MyNewWorld") and let it generate the files. Then stop the server.
  4. Edit your start script or batch file. On Windows, you likely have a start_headless_server.bat. On Linux, you have a shell script. Open it in a text editor.
  5. Change the world name parameter. Look for the line that includes -world "YourWorldName". Replace it with the name of the world you want to run. For example, change -world "MySurvivalWorld" to -world "MyBuildWorld". Save the file.
  6. Restart the server. Stop the server (Ctrl+C in the console, or kill the process) and run the start script again. The server will load the new world. Players will need to select the new world when connecting (or you can use the same port; they’ll just see the new world).
  7. To switch back, repeat steps 4-6 with the other world name.

Method 2: Run Multiple Server Instances Simultaneously (For Powerful Hardware)

  1. Copy the server files. Create a second folder and copy the entire Valheim dedicated server directory into it. For example, valheim-server-2.
  2. Assign a different port. In the second server’s start script, add -port 2457 (or any unused port). The default is 2456. Also set a different -crossplay port if you use that (default 2457).
  3. Set a different world name. In the second script, use -world "SecondWorldName".
  4. Use a separate save folder (recommended). To keep worlds separate, add -savedir "C:/valheim-saves/server2" (Windows) or -savedir "/home/steam/valheim-saves/server2" (Linux). This prevents conflicts.
  5. Start both servers. Run both start scripts. Ensure your firewall allows both ports. Players connect to the IP with the respective port.

Common Mistakes

  • Using the same port for two instances. If you run two servers on the same machine, they must use different ports, or the second one will fail to start.
  • Editing the wrong world name. Double-check that the world name in the script matches the .fwl and .db files you intend to use. A typo will cause the server to generate a brand new world.
  • Forgetting to stop the server before changing the script. If you edit the script while the server is running, the changes won’t take effect until you restart.
  • Not backing up worlds. Before switching, copy the world files to a safe location. A crash during a switch can corrupt the world.
  • Running two instances without enough RAM. Each Valheim server uses about 1-2 GB RAM. If you have 4 GB total, running two will cause lag or crashes.

Tips

  • Use a batch file to switch worlds quickly. Create two .bat files (start_world1.bat and start_world2.bat) that launch the server with the appropriate world name. This saves time.
  • Label your worlds clearly. Use descriptive names like Survival_Hard and Creative_Build so you don’t confuse them.
  • Set up a dedicated save directory. Even with the single-instance method, using -savedir to point to a folder you control makes backups easier.
  • Use a server manager tool. Tools like Valheim Plus or BepInEx can help with world management, but always check compatibility with the current game version.
  • Monitor server performance. Use task manager or top to see CPU and RAM usage. If it’s maxed out, reduce the number of instances.

Troubleshooting

  • Server won’t start after changing the world name. Check the console for errors. Make sure the world files exist in the correct location. If not, the server will create a new world—which might be fine, but if you wanted the old one, restore from backup.
  • Players can’t connect to the second instance. Verify the port is open in your firewall and that you’re using the correct IP:port in the game’s join menu. Also check that the second server is actually running (look for the console window).
  • World loads but is empty or missing buildings. This usually means the server is loading a different world file than intended. Ensure the world name in the script matches the .fwl/.db files exactly, including capitalization.
  • High ping or lag on one instance. If you’re running multiple instances, your hardware might be insufficient. Close other programs or reduce the number of instances. Also check your network upload speed.
  • Server crashes when switching worlds. This can happen if the world files are corrupted. Try loading the world in single-player first to see if it works. If not, restore from a backup.

Frequently Asked Questions

Can I run two Valheim servers on the same machine without copying the files?

Yes, you can run two instances from the same installation by using different -port and -savedir parameters, but it’s safer to copy the files to avoid conflicts with updates or mods.

Do I need to open multiple ports for multiple worlds?

Yes, each server instance needs its own port (e.g., 2456 for the first, 2457 for the second). You must forward each port in your router and open them in your firewall.

Will my players lose their characters when I switch worlds?

No, character data is stored separately from world data. Players keep their characters and inventories, but they will appear at the spawn point of the new world.

Can I use mods on one world and not the other?

Yes, if you run separate instances, you can have different mods installed in each server folder. However, players must have the same mods to connect.

How do I back up a world before switching?

Simply copy the .fwl and .db files to a different folder. You can also use the in-game console command save to force a save, then copy the files.

Is it better to switch worlds or run multiple instances?

Switching is easier and uses fewer resources, but requires a restart. Running multiple instances allows both worlds to be live simultaneously, but demands more CPU and RAM. Choose based on your hardware and how often players need to switch.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →