> For the complete documentation index, see [llms.txt](https://docs.linuxgsm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.linuxgsm.com/game-servers/valheim.md).

# Valheim

<figure><img src="https://1934041264-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LJf1_IiU2L1vVxT7iNe%2Fuploads%2FOrAY7D18sh8DtSfxGWq3%2Fvhserver_header.jpg?alt=media&amp;token=bec3e7db-7326-44d1-a3b1-a91a9c5034c5" alt=""><figcaption></figcaption></figure>

## Server Resources

* [Official Dedicated Server Guide](https://valheim.fandom.com/wiki/Valheim_Dedicated_Server)

## Valheim Servers require Passwords

Valheim servers require a server password to start a server. This means it is not possible to connect to a Valheim server unless you know the password.

## Direct connect to a Valheim Server

The Valheim in-game browser can be slow, as a workaround you can directly connect to a server in-game through the Join Game tab by pressing the Join IP button, or by adding a server to your Steam server browser favorites. To access the Steam server list, at the top left of the Steam library window go `View > Game Servers > Favorites`, and click the `blue +` button. Use `./vhserver details` to list the current query port. The default port is 2457.

## Crossplay

LinuxGSM starts Valheim with the `-crossplay` parameter by default. Crossplay routes connections through the PlayFab relay so that Xbox and PC Game Pass players can join alongside Steam players.

If your server is Steam-only and players connect by direct IP or through the Steam server browser, you may want to disable crossplay. With crossplay enabled, players may not be able to reach the server directly.

To disable crossplay, copy the `startparameters` line from `lgsm/config-lgsm/vhserver/_default.cfg` into your instance config (for example `lgsm/config-lgsm/vhserver/vhserver.cfg`) and remove `-crossplay`:

```bash
startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${worldname} -public ${public} -savedir '${savedir}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong} -instanceid ${instanceid} ${logFile:+ -logFile '${logFile}'} ${worldmodifiers:+ ${worldmodifiers}}"
```

{% hint style="info" %}
Copy the line from your current `_default.cfg` rather than this page, in case the defaults have changed. Restart the server for the change to take effect.
{% endhint %}

With crossplay disabled and the server public, deeper monitoring is available by setting `querymode="2"` and `querytype="protocol-valve"` in your instance config.

See [Start Parameters](/configuration/start-parameters.md) for more on overriding `startparameters`.

## Long Server Names

Valheim has been previously known to have problems with long server names and special characters, if you are having trouble connecting to a server try making its name shorter or remove special characters.

## Other Resources:

Add admins to Valheim server:

<https://nodecraft.com/support/games/valheim/adding-admins-to-your-valheim-server>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.linuxgsm.com/game-servers/valheim.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
