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

Open Beginner friendly
#4,930 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
bash, shell
Domain
cli, devops

Research direction

Start with _default.cfg and the vhserver startparameters definition, then inspect how the existing crossplay config variable is handled. Run ./vhserver start and ./vhserver details with crossplay="false" to verify that -crossplay is absent from the command-line parameters; done means the setting controls whether the flag is passed.

Written by the indexing model from the issue text.

Description

command: start distro: Ubuntu engine: unity3d game: Valheim regression: yes reproducible: always severity: low type: bug
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

Dominant language
Shell
Stars
4.9k
Forks
863
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GameServerManagers/LinuxGSM

All issues in GameServerManagers/LinuxGSM

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.