SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Source-checkedWorld generation

PortalMetalLock

by Baka_Gaijin · for Valheim

Metals/ores/bars/scrap (vanilla AND mod-added) can't be carried through wood portals; the Ashlands stone portal still carries everything. Server-enforced for all clients; config is server-authoritative (locked).

733Downloads
5 mo agoLast updated
BepInExLoaders
ThunderstoreSource

About PortalMetalLock

From Thunderstore

Metals/ores/bars/scrap (vanilla AND mod-added) can't be carried through wood portals; the Ashlands stone portal still carries everything. Server-enforced for all clients; config is server-authoritative (locked).

PortalMetalLock

Keep metals where they belong. **Metals, ores, bars, and scrap — vanilla and mod-added — can no longer be carried through normal (wood) portals. The Ashlands stone portal** (the "advanced" portal) still carries everything, exactly like vanilla.

Why

Vanilla already blocks vanilla metals from wood portals, but many content mods add their own ores/bars and leave them teleportable, quietly undoing that restriction. PortalMetalLock closes that gap: it scans the item database (including items registered late by Jotunn-based mods) and flags matching materials as non-teleportable, so wood portals refuse them again.

How it works

Valheim wood portals refuse to teleport a player whose inventory holds any non-teleportable item. The Ashlands stone portal sets m_allowAllItems, which the game checks before the per-item test, so it keeps carrying everything with no extra handling.

This mod simply sets m_teleportable = false on matching items. Matching is restricted to items of type Material, so weapons, armour, tools, and jewellery (e.g. SwordBronze, SilverNecklace) are never affected — only raw metal/ore/bar/scrap.

Configuration (server-authoritative — locked on clients)

All settings are admin-only and synchronised from the server via Jötunn. When connected to a server, the server's values are pushed to every client and locked — players cannot edit their local config to make metals teleportable again. Only the server admin can change these (edit baka.PortalMetalLock.cfg on the server while it is stopped, or via the in-game Configuration Manager as an admin):

| Setting | Default | Description | | --- | --- | --- | | Enabled | true | Master switch. When on, matching materials are made non-teleportable. | | MetalKeywords | copper,tin,bronze,iron,silver,blackmetal,flametal,ore,scrap,ingot | Comma-separated, case-insensitive substrings. Any Material whose prefab name or localized name contains one is blocked. | | ExtraPrefabs | (empty) | Comma-separated EXACT prefab names to also block, for mod metals the keywords miss. Use VNEI in-game to find exact names. | | ExcludePrefabs | BronzeNails,LeatherScraps | Comma-separated EXACT prefab names to never touch (false-positive guard). |

After changing keywords/prefabs on the server, reload the world (or restart) so the item database is re-scanned.

Server enforcement

This mod uses Jötunn's NetworkCompatibility at level EveryoneMustHaveMod with Minor version strictness. When it runs on a dedicated server, every connecting client must also have PortalMetalLock installed at a matching major.minor version — clients that are missing the mod or on a mismatched version are rejected at the connection handshake with an error screen. This guarantees the rule is enforced for everyone on the server, not just players who happen to have it.

(The teleport gate itself is evaluated client-side, so without this enforcement a vanilla/missing-mod client could otherwise carry mod metals through. EveryoneMustHaveMod closes that gap.)

Requirements

  • BepInEx
  • Jötunn (for the server-side enforcement handshake)

Notes

This is a personal quality-of-life / rules mod. It only flips a per-item teleport flag; no world data, recipes, or items are otherwise changed. Safe to add or remove at any time.

Highlights

From source data

Loaders

Runs on BepInEx.

Footprint

Rated a light load on a server.

Last update

Its author last shipped an update 5 mo ago.

PortalMetalLock on Nxeon

From our catalogue
One-click install
Supported on Nxeon Valheim servers, for BepInEx servers. We download it from Thunderstore, place it, and restart the server.
Server side
Optional on the server
Server type needed
BepInEx
Server load
light
Smallest plan we suggest
Valheim — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
1.5.1, released 2026-06-15

Game versions by loader

LoaderGame versionsNewest
BepInEx

From 7 recorded builds of PortalMetalLock.

Recent builds

BuildReleasedGame versionsLoaders
1.5.12026-06-15n/aBepInEx
1.5.02026-06-14n/aBepInEx
1.4.02026-06-14n/aBepInEx
1.3.02026-06-14n/aBepInEx
1.2.02026-06-13n/aBepInEx
1.1.02026-06-13n/aBepInEx

Dependencies

Declared by the newest build that lists any. Required ones are installed with it on one-click installs.

Run PortalMetalLock on a Valheim server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on Thunderstore as “Content”

World generation

Changes or adds to how new terrain, biomes and structures are created.

Works on a server

From source side support

Thunderstore lists server-side support for PortalMetalLock as optional: it can run on a server, but isn’t required there.

Compatibility

Game
Valheim
Loaders
BepInEx
Runs on
Serveroptional on the server
Requires
One-click install needs a BepInEx server.

Verified at the source

  • ✓ThunderstoreOfficial listing, checked 2026-10-16Open ↗
  • ✓AuthorBaka_Gaijin, as published on Thunderstore
  • ✓LicenseNot published by the sourceFree

PortalMetalLock, answered

Generated from the mod’s own source data.

Do my players need to install PortalMetalLock?

Thunderstore lists server-side support for PortalMetalLock as optional: it can run on a server, but isn’t required there.

Which loaders does it support?

BepInEx.

Is it free?

Yes. PortalMetalLock is free to download from Thunderstore.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run PortalMetalLock on a Valheim server.

Deploy in about a minute from $6.50 a month, then add PortalMetalLock in one click.