Skip to content

[BUG] Wrong port value in sfserver alerts in discord #3765

Closed

Description

@shalak

User Story

As a sfserver user, I want queryport to be used in discord alerts.

Basic info

  • Distro: N/A
  • Game: [Satisfactory]
  • Command: [N/A]
  • LinuxGSM version: [v21.5.0]

Further Information

The alerts on discord are printing port, which for satisfactory is not the port a player should use in their game client (that one being queryport).

Expected behaviour

With default sfserver config values, I should see 15777 instead of 7777 in the alert below:
image

Activity

  1. shalak commented on Jan 26, 2022

    @shalak
    Author

    The issue originales from the naming convention that Satisfactory uses.

    The simplest solution, would be something like this:

    diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg
    index 45ca1151..7fc3d39f 100644
    --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg
    +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg
    @@ -10,12 +10,12 @@
     
     ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
     ip="0.0.0.0"
    -queryport="15777"
    +port="15777"
     beaconport="15000"
    -port="7777"
    +gameport="7777"
     
     ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
    -startparameters="FactoryGame -multihome=${ip} -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -Port=${port} -log -unattended"
    +startparameters="FactoryGame -multihome=${ip} -ServerQueryPort=${port} -BeaconPort=${beaconport} -Port=${gameport} -log -unattended"
     
     #### LinuxGSM Settings ####
     

    Unfortunately, this introduces inconsistency, because now parameter names would not reflect the variable names, which may be confusing.

    Alternatively, there could be a completely new variable introduced, just for alert messages:

    diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg
    index 45ca1151..75672fe7 100644
    --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg
    +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg
    @@ -37,6 +37,7 @@ postalert="off"
     # Discord Alerts | https://docs.linuxgsm.com/alerts/discord
     discordalert="off"
     discordwebhook="webhook"
    +gameclientport=${queryport}
     
     # Email Alerts | https://docs.linuxgsm.com/alerts/email
     emailalert="off"
    diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh
    index 9db56da3..1e83b4a4 100755
    --- a/lgsm/functions/alert_discord.sh
    +++ b/lgsm/functions/alert_discord.sh
    @@ -31,7 +31,7 @@ json=$(cat <<EOF
     			},
     			{
     				"name": "Server IP",
    -				"value": "[${alertip}:${port}](https://www.gametracker.com/server_info/${alertip}:${port})",
    +				"value": "[${alertip}:${gameclientport:-${port}}](https://www.gametracker.com/server_info/${alertip}:${gameclientport:-${port}})",
     				"inline": true
     			},
     			{

    But that, as I understand, won't make sense for gametracker service...

    As a sidenote, I believe a user should be able to disable the overall gametracker link embedding above, as it exposes a risk of leaking a private server's address.

  2. dgibbs64 commented on Jan 26, 2022

    @dgibbs64
    Member

    I can confirm this unusual behavior. Others servers you would enter the gameport to connect to in the game server browser. However it this instance you connect to the query port.

    Since this is different from every other game I am unsure on how best to adapt it currently. There might have to be a connectport variable added for these sorts of issues

  3. vinanrra commented on Dec 20, 2023

    @vinanrra

    Hi, any news about this?

    Just asking, because this it's a low priority.

  4. johnoclockdk commented on Dec 24, 2023

    @johnoclockdk
    Contributor

    I can confirm this unusual behavior. Others servers you would enter the gameport to connect to in the game server browser. However it this instance you connect to the query port.

    Since this is different from every other game I am unsure on how best to adapt it currently. There might have to be a connectport variable added for these sorts of issues

    maybe in alerts have a check like
    if{sfserver) { code goes here }

  5. vinanrra commented on Dec 24, 2023

    @vinanrra

    Or maybe set the port at the config and if set don't use the default maybe?

  6. dgibbs64 commented on Oct 17, 2026

    @dgibbs64
    Member

    Closing because the reported port mismatch no longer applies to current Satisfactory versions. Since Satisfactory 1.0, the old query port 15777 is unused; the game and server API use the configured game port, 7777 by default.

    #4976, merged and assigned to v26.3.0, updates LinuxGSM's Satisfactory port configuration and is now linked in Development. Discord alerts display ${port}, which matches the current connection port. The old GameTracker embedding mentioned above has also been removed.

    The current configuration and alert code were checked; a live Discord alert/client connection test was not performed for this review. If a current installation still advertises the wrong address, please open a new report with the relevant configuration and alert output.

  7. added this to the v26.3.0 milestone on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions