Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying Existing Container's set-key Values Ignored #1048

Open
stricklandrbls opened this issue Jan 21, 2025 · 8 comments
Open

Modifying Existing Container's set-key Values Ignored #1048

stricklandrbls opened this issue Jan 21, 2025 · 8 comments

Comments

@stricklandrbls
Copy link

I have a server that I initially created with a docker-compose file with the environment attribute of set-key=nomap. I wanted to change this so that I could use the map ingame but after editing the docker-compose.yaml file and running docker-compose up --detach, the server still does not allow the map to open.

@mbround18
Copy link
Owner

mbround18 commented Jan 23, 2025

Huh, @stricklandrbls when you launch in the logs do you see that flag turned off?
Also, try running the command removekey nomap while in-game as an admin

@stricklandrbls
Copy link
Author

stricklandrbls commented Jan 23, 2025

@mbround18 I'll have to try the process and initializing, editing the set-key value, and re-initiializing the container again and I'll get the logs output for you.

If I recall correctly, the value would be set appropriately but the game still did not respond the opening the map.

I even tried copying a local map and it's associated map cache files to the container without the nomap value and it still did not work.

@stricklandrbls
Copy link
Author

@mbround18
So it seems that anytime the map configuration changes from disabled -> enabled is when it stays disabled for good.

I have an instance of the container that built a map, with the map enabled. I changed the docker-compose.yaml environment attribute to have - SET_KEY="nomap" and started the container again (docker-compose up -d). The map was successfully disabled but when I changed it back to the original yaml file, the map continued to be disabled.

Initial `docker-compose.yaml`
version: "3"
services:
  valheim:
    image: mbround18/valheim:latest
    ports:
      - 2456:2456/udp
      - 2457:2457/udp
      - 2458:2458/udp
    environment:
      - PORT=2456
      - NAME=(REDACTED)
      - WORLD="Dedicated"
      - PASSWORD=(REDACTED)
      - TZ=America/Chicago
      - PUBLIC=1
      - AUTO_UPDATE=0
      - AUTO_UPDATE_SCHEDULE="0 1 * * *"
      - AUTO_BACKUP=1
      - AUTO_BACKUP_SCHEDULE="*/15 * * * *"
      - AUTO_BACKUP_REMOVE_OLD=1
      - AUTO_BACKUP_DAYS_TO_LIVE=3
      - AUTO_BACKUP_ON_UPDATE=1
      - AUTO_BACKUP_ON_SHUTDOWN=1
      - MODIFIERS="combat=hard,portals=veryhard,resources=more"
    volumes:
    - ./saves:/home/steam/.config/unity3d/IronGate/Valheim
    - ./server:/home/steam/valheim
Initial Container Startup Logs
2025-01-23 14:43:07 - [Valheim][INFO]: Total memory: 7.6i GB
2025-01-23 14:43:07 - [Valheim][INFO]: Setting up file systems
usermod: no changes
2025-01-23 14:43:08 - [Valheim][INFO]: Configuring Preset Env
export ODIN_CONFIG_FILE="/home/steam/valheim/config.json"
export ODIN_DISCORD_FILE="/home/steam/valheim/discord.json"
export SAVE_LOCATION="/home/steam/.config/unity3d/IronGate/Valheim"
export MODS_LOCATION="/home/steam/staging/mods"
export GAME_LOCATION="/home/steam/valheim"
export BACKUP_LOCATION="/home/steam/backups"
export NAME=(REDACTED)
export PORT="2456"
export PUBLIC="1"
export UPDATE_ON_STARTUP="1"
export MODIFIERS="combat=hard,portals=veryhard,resources=more"
export WEBHOOK_STATUS_SUCCESSFUL="1"
export WEBHOOK_STATUS_FAILED="1"
export AUTO_UPDATE="0"
export AUTO_BACKUP="1"
export AUTO_BACKUP_REMOVE_OLD="1"
export AUTO_BACKUP_DAYS_TO_LIVE="3"
export AUTO_BACKUP_ON_UPDATE="1"
export AUTO_BACKUP_ON_SHUTDOWN="1"
export AUTO_BACKUP_PAUSE_WITH_NO_PLAYERS="0"
export AUTO_BACKUP_SCHEDULE="*/15 * * * *"
export BEPINEX_RELEASES_URL="https://thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/"
export WEBHOOK_STATUS_JOINED="1"
export WEBHOOK_STATUS_LEFT="1"
export SCHEDULED_RESTART_SCHEDULE="0 2 * * *"
export WORLD="Dedicated"
export PASSWORD="(REDACTED)
export TYPE="Vanilla"
export TZ="America/Chicago"
export PUID="111"
export PGID="1000"
2025-01-23 14:43:08 - [Valheim][INFO]: Preset Env Configured
Setting up cron job: auto-backup
*/15 * * * * BASH_ENV=/env.sh /bin/bash /home/steam/scripts/auto_backup.sh >> /home/steam/valheim/logs/auto-backup.out 2>&1
2025-01-23 14:43:08 - [Valheim][INFO]: Checking if cron directory and files exist...
2025-01-23 14:43:08 - [Valheim][INFO]: Navigating to steam home...
2025-01-23 14:43:08 - [Valheim][INFO]: Launching server...
2025-01-23 14:43:08 - [Valheim][INFO]: -------------------------------------------------------------
2025-01-23 14:43:08 - [Valheim][INFO]: Valheim Server - Thu Jan 23 02:43:08 PM CST 2025
2025-01-23 14:43:08 - [Valheim][INFO]: STEAM_UID 111 - STEAM_GID 1000
2025-01-23 14:43:08 - [Valheim][INFO]: Installing Valheim via odin 2.1.0...
2025-01-23 14:43:08 - [Valheim][INFO]: -------------------------------------------------------------
2025-01-23 14:43:08 - [Valheim][INFO]: Variables loaded.....
2025-01-23 14:43:08 - [Valheim][INFO]: Port: 2456
2025-01-23 14:43:08 - [Valheim][INFO]: Name: (REDACTED)
2025-01-23 14:43:08 - [Valheim][INFO]: World: Dedicated
2025-01-23 14:43:08 - [Valheim][INFO]: Public: 1
2025-01-23 14:43:08 - [Valheim][INFO]: With Crossplay:
2025-01-23 14:43:08 - [Valheim][INFO]: Password: (REDACTED)
2025-01-23 14:43:08 - [Valheim][INFO]: Preset:
2025-01-23 14:43:08 - [Valheim][INFO]: Modifiers: combat=hard,portals=veryhard,resources=more
2025-01-23 14:43:08 - [Valheim][INFO]: Set Key:
2025-01-23 14:43:08 - [Valheim][INFO]: Has Webhook: false
2025-01-23 14:43:08 - [Valheim][INFO]: Auto Update: 0
2025-01-23 14:43:08 - [Valheim][INFO]: Auto Backup: 1
2025-01-23 14:43:08 - [Valheim][INFO]: Auto Backup On Update: 1
2025-01-23 14:43:08 - [Valheim][INFO]: Auto Backup On Shutdown: 1
2025-01-23 14:43:08 - [Valheim][INFO]: Auto Backup Pause With No Players: 0
2025-01-23 14:43:08 - [Valheim][INFO]: Auto Backup Pause With Players:
2025-01-23 14:43:08 - [Valheim][INFO]: Auto Backup Remove Old: 1
2025-01-23 14:43:08 - [Valheim][INFO]: Auto Backup Days To Live: 3
2025-01-23 14:43:08 - [Valheim][INFO]: Auto Backup Nice Level:
2025-01-23 14:43:08 - [Valheim][INFO]: Update On Startup: 1
2025-01-23 14:43:08 - [Valheim][INFO]: Mods:
2025-01-23 14:43:08 - [Valheim][INFO]: -------------------------------------------------------------
2025-01-23 14:43:08 - [Valheim][INFO]: Running Install...

NoMap `docker-compose.yaml`
version: "3"
services:
  valheim:
    image: mbround18/valheim:latest
    ports:
      - 2456:2456/udp
      - 2457:2457/udp
      - 2458:2458/udp
    environment:
      - SET_KEY="nomap"
      - PORT=2456
      - NAME=(REDACTED)
      - WORLD="Dedicated"
      - PASSWORD=(REDACTED)
      - TZ=America/Chicago
      - PUBLIC=1
      - AUTO_UPDATE=0
      - AUTO_UPDATE_SCHEDULE="0 1 * * *"
      - AUTO_BACKUP=1
      - AUTO_BACKUP_SCHEDULE="*/15 * * * *"
      - AUTO_BACKUP_REMOVE_OLD=1
      - AUTO_BACKUP_DAYS_TO_LIVE=3
      - AUTO_BACKUP_ON_UPDATE=1
      - AUTO_BACKUP_ON_SHUTDOWN=1
      - MODIFIERS="combat=hard,portals=veryhard,resources=more"
    volumes:
    - ./saves:/home/steam/.config/unity3d/IronGate/Valheim
    - ./server:/home/steam/valheim
NoMap Container Startup Logs
2025-01-23 14:49:50 - [Valheim][INFO]: Total memory: 7.6i GB
2025-01-23 14:49:50 - [Valheim][INFO]: Setting up file systems
usermod: no changes
2025-01-23 14:49:53 - [Valheim][INFO]: Configuring Preset Env
export ODIN_CONFIG_FILE="/home/steam/valheim/config.json"
export ODIN_DISCORD_FILE="/home/steam/valheim/discord.json"
export SAVE_LOCATION="/home/steam/.config/unity3d/IronGate/Valheim"
export MODS_LOCATION="/home/steam/staging/mods"
export GAME_LOCATION="/home/steam/valheim"
export BACKUP_LOCATION="/home/steam/backups"
export NAME=(REDACTED)
export PORT="2456"
export PUBLIC="1"
export UPDATE_ON_STARTUP="1"
export MODIFIERS="combat=hard,portals=veryhard,resources=more"
export SET_KEY="nomap"
export WEBHOOK_STATUS_SUCCESSFUL="1"
export WEBHOOK_STATUS_FAILED="1"
export AUTO_UPDATE="0"
export AUTO_BACKUP="1"
export AUTO_BACKUP_REMOVE_OLD="1"
export AUTO_BACKUP_DAYS_TO_LIVE="3"
export AUTO_BACKUP_ON_UPDATE="1"
export AUTO_BACKUP_ON_SHUTDOWN="1"
export AUTO_BACKUP_PAUSE_WITH_NO_PLAYERS="0"
export AUTO_BACKUP_SCHEDULE="*/15 * * * *"
export BEPINEX_RELEASES_URL="https://thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/"
export WEBHOOK_STATUS_JOINED="1"
export WEBHOOK_STATUS_LEFT="1"
export SCHEDULED_RESTART_SCHEDULE="0 2 * * *"
export WORLD="Dedicated"
export PASSWORD=(REDACTED)
export TYPE="Vanilla"
export TZ="America/Chicago"
export PUID="111"
export PGID="1000"
2025-01-23 14:49:53 - [Valheim][INFO]: Preset Env Configured
Setting up cron job: auto-backup
*/15 * * * * BASH_ENV=/env.sh /bin/bash /home/steam/scripts/auto_backup.sh >> /home/steam/valheim/logs/auto-backup.out 2>&1
2025-01-23 14:49:53 - [Valheim][INFO]: Checking if cron directory and files exist...
2025-01-23 14:49:53 - [Valheim][INFO]: Navigating to steam home...
2025-01-23 14:49:53 - [Valheim][INFO]: Launching server...
2025-01-23 14:49:53 - [Valheim][INFO]: -------------------------------------------------------------
2025-01-23 14:49:53 - [Valheim][INFO]: Valheim Server - Thu Jan 23 02:49:53 PM CST 2025
2025-01-23 14:49:53 - [Valheim][INFO]: STEAM_UID 111 - STEAM_GID 1000
2025-01-23 14:49:53 - [Valheim][INFO]: Installing Valheim via odin 2.1.0...
2025-01-23 14:49:53 - [Valheim][INFO]: -------------------------------------------------------------
2025-01-23 14:49:53 - [Valheim][INFO]: Variables loaded.....
2025-01-23 14:49:53 - [Valheim][INFO]: Port: 2456
2025-01-23 14:49:53 - [Valheim][INFO]: Name: (REDACTED)
2025-01-23 14:49:53 - [Valheim][INFO]: World: Dedicated
2025-01-23 14:49:53 - [Valheim][INFO]: Public: 1
2025-01-23 14:49:53 - [Valheim][INFO]: With Crossplay:
2025-01-23 14:49:53 - [Valheim][INFO]: Password: (REDACTED)
2025-01-23 14:49:53 - [Valheim][INFO]: Preset:
2025-01-23 14:49:53 - [Valheim][INFO]: Modifiers: combat=hard,portals=veryhard,resources=more
2025-01-23 14:49:53 - [Valheim][INFO]: Set Key: nomap
2025-01-23 14:49:53 - [Valheim][INFO]: Has Webhook: false
2025-01-23 14:49:53 - [Valheim][INFO]: Auto Update: 0
2025-01-23 14:49:53 - [Valheim][INFO]: Auto Backup: 1
2025-01-23 14:49:53 - [Valheim][INFO]: Auto Backup On Update: 1
2025-01-23 14:49:53 - [Valheim][INFO]: Auto Backup On Shutdown: 1
2025-01-23 14:49:53 - [Valheim][INFO]: Auto Backup Pause With No Players: 0
2025-01-23 14:49:53 - [Valheim][INFO]: Auto Backup Pause With Players:
2025-01-23 14:49:53 - [Valheim][INFO]: Auto Backup Remove Old: 1
2025-01-23 14:49:53 - [Valheim][INFO]: Auto Backup Days To Live: 3
2025-01-23 14:49:53 - [Valheim][INFO]: Auto Backup Nice Level:
2025-01-23 14:49:53 - [Valheim][INFO]: Update On Startup: 1
2025-01-23 14:49:53 - [Valheim][INFO]: Mods:
2025-01-23 14:49:53 - [Valheim][INFO]: -------------------------------------------------------------
2025-01-23 14:49:53 - [Valheim][INFO]: Running Install...
2025-01-23 14:49:53 - [Valheim][INFO]: Attempting to update before launching the server!
[Valheim][steam]: ###########################################################################

After I remove the nomap env var the logs and yaml file are extactly the same as the initial but the map remains disabled.

@mbround18
Copy link
Owner

This would be expected and is by design from Valheim, when you turn a setkey on in the console it gets stored in the servers save files. You have to remove the setkey via the admin console inside the game when connected.

  • Right-click on 'Valheim' in your Steam library.
  • Select 'Properties'.
  • In the 'General' tab, locate the 'Launch Options' field.
  • Type -console into this field.
  • Close the properties window.
  • Launch Valheim.
  • Press F5 in-game to open the console.

Enter the command removekey nomap and be sure its removed from your docker compose. The issue is once the key is enabled valheim doesnt provide a way for you to disable it besides removing it via a command in game. Be sure your steam64 id is added to saves/adminlist.txt

@stricklandrbls
Copy link
Author

Is there a way to do this from within the container or the server than is hosted the running container? I often play on a Steam deck and unsure as to whether I can execute this or not.

@mbround18
Copy link
Owner

I can look into server side but from the steam deck side you could try

To enable and access the admin console in Valheim on your Steam Deck, follow these steps:

  1. Add the -console Launch Option:
  • Press the Steam button to open the sidebar.
  • Navigate to your Library and locate Valheim.
  • Press the Options button (≡) to open the game options.
  • Select Properties.
  • In the General tab, find the Launch Options field.
  • Enter -console into this field.
  1. Launch Valheim
  2. Open the Console In-Game:
  • Once in-game, press LB + LT + Menu button (the middle right button) simultaneously on your Steam Deck.
  1. Enable Developer Commands:
  • In the console window that appears, type devcommands and press Enter.

Source: https://valheim.com/support/how-to-enable-developer-mode

@stricklandrbls
Copy link
Author

stricklandrbls commented Jan 23, 2025

So now I'm having another issue where my character is not recognized as an admin even those the character name is in the ./saves/adminlist.txt with both all lowercase and the first letter capitalized, as it appears in the server log output when I login to the server.

Update: It seems that you have to put your Steam ID in that file and not your character name. I'm going to try this again.

@mbround18
Copy link
Owner

To be an admin it shouldnt be your character name it needs to be your steam 64id https://www.steamidfinder.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants