A Valheim dedicated server needs 2 GB of memory for up to three players on a new world, 3 to 4 GB for a group of four to six with a few bases, and 4 to 6 GB for a full group of ten on a world that has been played for months. A modded server with BepInEx and a dozen content mods wants 6 to 8 GB. Player count is the weakest of the three inputs: the server holds the entire world in memory, so what drives the number is how much of the map has been explored, how much has been built and, above all, how much ground has been terraformed. A world that started at 2 GB comfortably can need twice that by the time the group reaches the Mistlands, without anybody new joining.
What a Valheim server keeps in memory#
Valheim's world is stored as a large collection of objects the game calls ZDOs - one for every tree, rock, creature, building piece, chest, dropped item, cart, ship and portal that exists or has ever been changed. The world save (Name.db) is essentially that collection written to disk, and the dedicated server loads all of it into memory when it starts and keeps it there. Nothing is unloaded because nobody is standing near it.
That makes Valheim different from Minecraft in a way that matters for sizing:
- The server does not simulate the world. Each zone is simulated by the first client to enter it; the server stores the objects and relays changes between players. So CPU use is modest, and memory does not depend on where players are standing.
- The server holds everything. A base nobody has visited for three weeks costs exactly as much memory as the one everyone is in tonight.
- Memory tracks the world file. A
.dbfile that has grown from 15 MB to 150 MB is the clearest single sign that the server needs more than it did at the start.
Around that world data sit the Unity runtime itself, the networking buffers per connection, a little per-player state, and any mods. The runtime floor is a few hundred megabytes; the world is where the rest goes.
RAM by group size and world age#
These figures hold for a vanilla server with crossplay on or off - crossplay adds a relay hop, not meaningful memory.
| Group and world | RAM | Notes |
|---|---|---|
| 1-3 players, new world | 2 GB | Comfortable until the world is well explored |
| 4-6 players, several bases | 3-4 GB | The common case |
| 7-10 players, mapped world | 4-6 GB | Large builds and terraforming start to cost |
| Modded, 10+ BepInEx mods | 6-8 GB | Depends on what the mods add |
| Expanded world or 20+ players (mods) | 8 GB and up | Mods change every assumption |
The ten-player limit is hard-coded, so the vanilla rows stop there. What moves a server down the table is time: a group of four in their first week sits happily in 2 GB, and the same group with a sprawling base in every biome a few months later may not.
As a working rule, check the size of the world's .db file in the file manager from time to time. Under about 50 MB, 2 to 3 GB is plenty. Between 50 and 150 MB, which is where most long-lived worlds end up, plan on 4 GB. A world past 200 MB is a heavily built or heavily terraformed one and deserves 6 GB. This is a rule of thumb from watching servers, not a formula - the in-memory representation is several times larger than the file, and how much larger depends on what the objects are.
What makes a world expensive#
Four things grow a Valheim world, and they do not cost the same.
Exploration
Every zone a player visits for the first time is generated: its trees, rocks, bushes, creatures, locations and dungeon entrances become objects in the world. An unexplored zone costs nothing. A group that sails the whole map to find the Queen has generated a large fraction of the world, and each of those zones is now stored. Exploration is the slow, steady growth that every world has.
Building
Every placed piece is an object: each wall, floor, beam, torch, chest and item frame. A modest longhouse is a few hundred pieces; a mature base with a great hall, a farm, a portal hub, a smelting yard and decorative stonework is thousands. Chests add their contents. Multiply by the number of bases and the number of players who each build their own.
Terraforming
This is the expensive one. Raising, lowering, levelling and paving ground with the hoe and the pickaxe is stored as terrain modifications per zone, and heavily modified zones carry far more data than natural ones. A base built on a hilltop that has been flattened, with a moat dug around it and paths paved to the portal, costs more than the same base on natural ground - and none of that cost goes away if the base is later abandoned.
Things left lying around
Dropped items outside a base area eventually despawn, but items inside a player base do not, and neither do tamed animals, carts, ships or the contents of every chest. A farm of a hundred tamed boars, or a dock with twelve longships, is a memory cost every hour the server runs. Breeding pens that are never thinned are a classic slow climb.
Saves, the save freeze and memory#
Valheim writes the world on a timer set by -saveinterval, 1800 seconds by default. On a large world the save is when you feel the size: the server serialises everything, allocates while doing it, and players see a short hitch or a full freeze. The log records it:
World saved ( 1243.512ms )That number is a useful health indicator. A few hundred milliseconds on a young world is normal. Several seconds on a mature one means the world is big, and it is also the moment memory use peaks, because the server is holding the world and the serialised copy at once.
Two consequences for sizing:
- Leave headroom above the steady state. A server that idles at 90% of its limit can be pushed over by a save. On RE:NODE a server that reaches its memory limit is stopped and restarted clean rather than left to swap, which is the right behaviour for the machine but means losing everything since the previous save. Shorter save intervals reduce what that costs.
- Shorten the interval on a big world.
-saveinterval 600makes each save happen more often, not more expensively, and caps the loss at ten minutes if the process ever stops uncleanly. The Valheim dedicated server guide lists every launch argument.
The automatic backups set by -backups, -backupshort and -backuplong are copies of the .db on disk, not memory. They cost disk space and nothing else.
Watching the server's own numbers#
Valheim does not have much in the way of performance commands, but it does tell you how big the world is.
- The log's connection line. Recent server builds periodically print a status line with the number of connections and the current ZDO count. Watching that count rise over weeks is watching memory rise. If your build prints it, note the figure once a week.
- The `.db` file size. Visible in the file manager or over SFTP, in
worlds_local. The cheapest trend line you can keep. - The memory graph. On a panel it sits next to the CPU graph, measured against the limit. A healthy Valheim server climbs for some hours after a restart as players visit areas and the runtime settles, then levels off. A line that keeps rising for days without levelling is either a growing world or a mod.
What you will not see is a clean out-of-memory error. When a Valheim server runs out of memory inside a container, the log stops. If the last lines are mid-save, the save may be damaged; the server will fall back to the previous file next time. Valheim backups and world corruption covers recovering from that.
Mods and memory#
BepInEx itself is light: the framework and a handful of quality-of-life plugins add perhaps a couple of hundred megabytes. What changes the picture is content and world mods.
- Server-side utility mods (backups, Discord bridges, admin tools, Server Devcommands) cost little.
- Content mods that add creatures, items, biomes or dungeons add their assets to every client and their spawned objects to the world. Creature packs in particular put more persistent objects on the map.
- Rule and spawn mods that raise drop rates, spawn rates or stack sizes indirectly add objects - more drops, more creatures, larger chest contents.
- World expansion mods such as Expand World Size enlarge the map itself, and with it the number of zones that can be generated and stored. These change the sizing by more than any other kind of mod.
- Player-count mods that raise the ten-player cap add connection overhead and, more importantly, more builders.
A practical rule: add 1 to 2 GB for a modest content mod list and size by the world after that. A heavily modded server with expanded world size and twenty players wants 8 GB or more, and is a different project from a vanilla server. Valheim mods with BepInEx on a server covers installation and which mods must be on both sides.
Making a world cheaper#
There is no built-in way to shrink a Valheim world, but there are honest options when one has grown too large.
- Remove what nobody uses. Abandoned outposts, failed builds, duplicate portals, a dock full of rotting karves. Deconstructing with the hammer removes the objects; it does not undo terraforming.
- Thin the animal pens. A hundred tamed animals are a hundred persistent objects with AI the zone owner must run. Twenty is plenty for any farm.
- Stop mass terraforming once a base is laid out. Paving the road to every portal is beautiful and expensive.
- Use a cleanup mod carefully. Upgrade World, a server-side mod, can remove specific objects and reset zones nobody has built in, which also lets new content generate there after a game update. It is powerful and permanent; take a backup first and read its documentation for the exact commands.
- Start a new world for a new chapter. Characters are stored on each player's machine, so a fresh world keeps everyone's gear and skills. Many groups do this when they finish the current content rather than carrying a 300 MB world forward.
CPU, disk and the rest#
Memory is rarely the first limit people hit on Valheim; lag is. Because zones are simulated by clients, most Valheim lag is a player with a poor connection owning a busy zone, not the server running out of anything. The server needs one fast core for relaying state and a second for saves and networking; 1.5 to 2 vCPU covers a full group. Valheim server performance and lag explains zone ownership and how to tell server lag from client lag, and CPU or RAM: which one is holding your server back covers reading the graphs.
Disk is modest: about 2 GB for the server, plus the world and its backups. Even a heavily built world with four automatic backups fits easily in 10 to 15 GB, and fast storage shortens the save freeze.
Valheim plans on RE:NODE run from 2 GB to 8 GB, from $6 a month, with both UDP ports allocated and crossplay already on. Moving up a tier raises the memory limit on the server you already have, so the world stays where it is when it outgrows the plan.
FAQ#
Is 2 GB enough for a Valheim server?
For one to three players on a new or lightly built world, yes. It stops being enough as the world grows rather than as players join, typically once the group has several bases across a few biomes. Watch the .db size and the memory graph, and move up when the peak during saves gets close to the limit.
Does a Valheim server need more RAM for more players?
Only slightly. Each connection adds a little, and the cap is ten in vanilla. What costs memory is what those players build, explore and terraform. Ten players who share one base cost less than four who each build their own on a levelled hilltop.
Why does my Valheim server freeze every half hour?
That is the world save, on the default 1800-second interval. On a large world it takes long enough to notice. The save itself cannot be avoided, but a shorter -saveinterval and fast storage keep each one short, and a server with memory headroom saves more smoothly than one at its limit.
Do mods make a Valheim server use more RAM?
Quality-of-life and admin mods barely do. Content mods that add creatures and items, mods that raise spawn or drop rates, and especially mods that enlarge the world all do. Add 1 to 2 GB for a typical content list, and more for world expansion.
Will restarting the server reduce memory use?
It returns the process to its baseline, which can recover a few hundred megabytes on a server that has run for a week. It does not make the world smaller, because everything is loaded back from the save. To reduce the world's cost you have to remove objects or terraforming, or start a new world.




Comments
Completely anonymous: no account, no email, no cookie. We store the name you type, the text and the time - nothing else. Links are limited and markup is not rendered.