How big a machine does your world need?
Less than you might fear: Anego's guidance starts at 1 GB of memory and adds 300 MB with each player, four processor threads, and a clock of 1 GHz plus 150 MHz per player. The studio calls this a rough, conservative recommendation for an ordinary survival world where people wander off in different directions, and says it can probably be lowered with tuning. (The wiki repeats it with 100 MHz per player instead of 150.)
| Players online | Memory by Anego's formula |
|---|---|
| 4 | 2.2 GB |
| 8 | 3.4 GB |
| 16 (the default cap) | 5.8 GB |
| 32 | 10.6 GB |
We did that multiplication, not Anego. Treat it as the floor, then leave room on top: mods add load, and so does a long view distance, which the config file warns needs more memory. If the server falls over with what looks like an out-of-memory crash on Linux, the studio's hosting page suggests raising vm.max_map_count to 262144 with sysctl.
What you need before you start
- A paid game account. You sign in to Anego's client area with it to download the server, and the server checks every joining player against Anego's account system, so each of your friends needs their own copy.
- The right .NET runtime. Game 1.22.0 and later run on .NET 10; 1.21.x used .NET 8. Match it to the version you plan to host.
- A 64-bit x86 machine running Linux. The ARM build is marked experimental and cannot load mods that rely on Harmony patching.
- Port 42420. Forwarded for TCP, and also for UDP since game 1.20.
Up and running in an evening
These steps follow the official Linux guide on Ubuntu. Never run the game as root: the wiki strongly recommends against it, so the commands below create a separate vintagestory account that cannot even log in.
- Install the .NET 10 runtime plus
procpsandscreen, which the bundledserver.shscript needs. If Ubuntu has nodotnet-runtime-10.0package, the wiki links Microsoft's own installer. - Create the service account, then switch on the firewall, allowing SSH and 42420 over both protocols, before the game ever starts. Look for
IPV6=yesin/etc/default/ufw; with it, ufw applies every rule to IPv6 as well. - Download the server archive as that account and unpack it into
server. - Open
server.shand set the user, the install folder and a separate data folder. - Start it, add yourself to the whitelist and give yourself the admin role.
sudo apt update && sudo apt install dotnet-runtime-10.0 procps screen
sudo useradd -m -s /usr/sbin/nologin vintagestory
grep IPV6 /etc/default/ufw # should print IPV6=yes
sudo ufw allow OpenSSH
sudo ufw allow 42420/tcp
sudo ufw allow 42420/udp
sudo ufw enable
V=1.22.7 # newest stable on your downloads page
sudo -u vintagestory bash -c "cd /home/vintagestory && \
wget https://cdn.vintagestory.at/gamefiles/stable/vs_server_linux-x64_$V.tar.gz && \
mkdir -p server && tar -C server -xzf vs_server_linux-x64_$V.tar.gz && \
chmod +x server/server.sh"
sudo -u vintagestory nano /home/vintagestory/server/server.sh
# USERNAME=vintagestory
# VSPATH=/home/vintagestory/server
# DATAPATH=/home/vintagestory/data
SRV=/home/vintagestory/server/server.sh
sudo -u vintagestory $SRV start
sudo -u vintagestory $SRV command "/whitelist add YourPlayerName"
sudo -u vintagestory $SRV command "/op YourPlayerName"
# watch the console; leave it with Ctrl+A, then D
sudo -u vintagestory screen -r vintagestory_server
When the console prints that the dedicated server is now running on port 42420, your friends add your server's IP address under Multiplayer in the game. Use the name they log in with, exactly as spelled, when you whitelist each of them.
Keeping the world for your group only
You're protected from the start: since 1.20, dedicated servers only admit whitelisted players, and the default config keeps the server out of the public server browser (AdvertiseServer ships set to false) unless you switch it on. The rest lives in serverconfig.json inside your data folder. Stop the server first, edit, then start again: the wiki says the file should only be edited while the server is stopped.
- Password. Put it in the
Passwordfield of the file instead of typing a/serverconfig passwordcommand into your shell: anything on a command line can turn up in shell history and in the list of running processes. Afterwards make it private to the game account:chmod 600run asvintagestory. - Whitelist.
WhitelistMode0 means the default (on for a dedicated server), 1 turns it off, 2 forces it on. The wiki rates the whitelist as stronger protection than a password. - Public listing.
AdvertiseServerstays false unless you want strangers; listing also needs aServerNamebetween 4 and 80 characters. - Newcomers as visitors. Set
DefaultRoleCodetosuvisitorand new arrivals can look around and chat but not build, until you run/player TheirName role suplayer. - Player cap.
MaxClientsdefaults to 16; more players means more memory.
Saving the world, and moving to a new version
Type /genbackup in the console, or send it with server.sh command, and the server copies the whole save into its backups folder while everyone keeps playing (we expect it at /home/vintagestory/data/Backups with the layout above; that location is our inference from how the wiki describes the data folder, not a stated path). To bring one back, stop the server and put the file into Saves under the world's name. Schedule the command nightly with cron, copy the folder off the machine, and delete old copies: when free disk drops under 400 MB the server shuts down on purpose.
Updating is a clean swap. The wiki warns that unpacking a new version over an old one causes unpredictable problems, so take a backup, stop the server, delete the server folder (your world sits safely in data), unpack the new archive in its place and set the three lines in server.sh again. When a release changes the .NET version, as 1.22 did, install the new runtime before you start it.
The server that fits
Our bare metal servers for gaming give your world one physical HPE machine that nobody else uses, on a network port that is not shared with any other customer at the access switch, with any operating system you like. A server that is already racked is ready about 30 minutes after your order is approved (payment checks can add time), and the instant servers page shows what is waiting on the shelf. Help is there around the clock by live chat, email and phone.
Our five data centers let you put the world close to where most of your friends live. There is no contract, so you can start with a modest machine and move up as the group grows. Running more than one game? Our Terraria world guide follows the same pattern.
A rented machine is not always the answer. If three friends play only when the host is online anyway, Open to LAN and Open to Internet in the game, or a home PC with the port forwarded, does the job for free.
Questions people ask
- Does every friend need to buy the game to play on my server?
- Yes. With the standard setting
VerifyPlayerAuthon, the server checks each person who joins against Anego's account system and turns away anyone without a purchased game account. A Family Pack of four accounts exists on the official store if you're buying for a household. - Why can't strangers see my server in the public list?
- Because
AdvertiseServerships set to false, which is usually what you want. To list it, setAdvertiseServerto true and give it aServerNameof 4 to 80 characters, then restart. Remember that the whitelist still keeps out anyone you have not added. - Can I add mods to my world?
- Yes. Put the mod zip files in a Mods folder in your data directory and add that path to
ModPathsin serverconfig.json, keeping the firstModsentry the game needs. When friends connect, the game offers to download the server's mods tagged server-side or universal for them. - Can one machine host two separate worlds?
- Yes, as two separate installs with their own data folders. Give the second one a different
Portin its config and a differentSCREENNAMEin its copy ofserver.sh, and open that port in the firewall too. - Is it allowed to ask players for money?
- Anego's FAQ is fine with donations, subscriptions and purely cosmetic rewards. Paid perks that give someone an in-game edge are not allowed unless every player benefits equally.