Skip to content

[Bug]: crossplay config variable has no effect. -crossplay hardcoded in startparameters with no way to disable via config #4930

@villur

Description

@villur

Severity

severity: low

Reproducibility

reproducible: always

Regression

regression: no

Affects latest release

latest-release: yes

User story

As a server owner running a Steam-only Valheim server, I want the crossplay config variable to actually control whether -crossplay is passed to the server binary, so that I can disable Playfab relay networking and allow players to connect via direct IP without having to manually override startparameters.

Script name

vhserver

Game

Valheim

Linux distro

Other, Ubuntu 26.04

Command

command: start

Expected behavior

-crossplay should not appear in the launch command when crossplay="false" is set.

Actual behavior

-crossplay is always present regardless of the crossplay config value. The server initialises Playfab/Xbox Live networking, routes all connections through Microsoft's relay network, and becomes unreachable via direct IP for Steam-only players.

Impact:
Steam-only dedicated servers are completely unreachable by IP. Clients see the server as permanently offline in the favourites browser. No connection attempts reach the server process at all.

Further information

Workaround:

Override startparameters in the instance config with -crossplay removed:
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}}"

Suggested fix:
Replace the hardcoded -crossplay in _default.cfg with a conditional so the existing crossplay config variable actually controls it:
${crossplay:+$([ "$crossplay" = "true" ] && echo "-crossplay")}

Or more simply, remove -crossplay from the default startparameters entirely and document that users who need crossplay should add it manually, making crossplay opt-in rather than opt-out, which is the safer default for Steam-only servers.

Pre-checks

  • I ran update and validate before reporting this issue.

Relevant log output

Image

Steps to reproduce

Steps to reproduce:

Install a fresh vhserver
Set crossplay="false" in lgsm/config-lgsm/vhserver/vhserver.cfg
Start the server with ./vhserver start
Run ./vhserver details and inspect the Command-line Parameters section

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    Status
    🆕 New Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions