How to Set a Password on Your Valheim Server

Password protect your Valheim dedicated server. Includes the 5-character minimum and the world-name restriction.

Valheim servers require a password by default. There are two important rules:

  1. The password must be at least 5 characters
  2. The password cannot match the world name — Valheim will refuse to start if it does

Open Startup

In the XGamingServer Panel, click Startup in the sidebar.

Change the Server Password

Find the Server Password variable (maps to -password) and enter your password.

MySecretPass

The password must be at least 5 characters and must not match the world name set in the World variable.

Restart the server

Go to Console and restart.

Removing the Password

Valheim does not officially support password-less servers — the server will refuse to start without a password. If you want a public-feeling server:

  • Use a simple, well-known password and share it openly
  • Combine with -public 1 so it appears in the Community browser
  • Or use the join code approach for crossplay servers

Common Errors

ErrorCauseFix
"Password too short"Password under 5 charactersUse at least 5 characters
"Password matches world name"-password and -world are the same stringMake them different
Server won't startOne of the aboveCheck Console output for the exact error

How is this guide?

40% Off — Limited TimeGet your Valheim server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page