mbround18 / valheim-docker

Valheim Docker powered by Odin. The Valheim dedicated gameserver manager which is designed with resiliency in mind by providing automatic updates, world backup support, and a user friendly cli interface.
https://hub.docker.com/r/mbround18/valheim
BSD 3-Clause "New" or "Revised" License
772 stars 82 forks source link

Server files owned by systemd-timesync (111), ignoring PUID=1000 #870

Closed Tander closed 5 months ago

Tander commented 5 months ago

Server files owned by systemd-timesync (111), ignoring PUID=1000, which leads to all sorts of errors during creating contatiner when PUID explicitely set. When I don't set it, ALL files are owned by that user.

2024-06-10 11:04:40 - [Valheim][INFO]: Pulling BepInEx from https://thunderstore.io/package/download/denikson/BepInExPack_Valheim/5.4.2202/
[ODIN][INFO]: Installing https://thunderstore.io/package/download/denikson/BepInExPack_Valheim/5.4.2202/
[ODIN][INFO]: Installing Framework...
[ODIN][ERROR]: Failed to install: https://gcdn.thunderstore.io/live/repository/packages/denikson-BepInExPack_Valheim-5.4.2202.zip
Downloaded Archive: "/home/steam/staging/mods/denikson-BepInExPack_Valheim-5.4.2202.zip"
i/o error: Operation not permitted (os error 1)

At first I created container withouth PUID and it worked normally. Then I noticed wrong user in owners, added PUID and PGID, recreated container, and got permission-related error. I tried to remove content of all volumes and container itself, but issue persists.

My docker-compose.yml

version: "3"
services:
  valheim:
    image: mbround18/valheim:latest
    stop_signal: SIGINT
    ports:
      - "25550:25550/udp"
      - "25551:25551/udp"
      - "25552:25552/udp"
    environment:
      PUID: 1000
      PGID: 1000
      PORT: 25550
      TZ: "Europe/Moscow"
      NAME: "elittle.net #sovngard"
      WORLD: "elittle"
      PRESET: "Normal"
      PASSWORD: "(redacted)"
      PUBLIC: 1
      TYPE: "BepInEx"
      SET_KEY: playerevents
      MODS: "https://gcdn.thunderstore.io/live/repository/packages/CW_Jesse-BetterNetworking_Valheim-2.3.2.zip"
      AUTO_UPDATE: 1
      AUTO_UPDATE_SCHEDULE: "0 4 * * *"
      AUTO_BACKUP: 1
      AUTO_BACKUP_SCHEDULE: "0 */5 * * *"
      AUTO_BACKUP_REMOVE_OLD: 1
      AUTO_BACKUP_DAYS_TO_LIVE: 7
      AUTO_BACKUP_ON_UPDATE: 1
      AUTO_BACKUP_ON_SHUTDOWN: 1
      WEBHOOK_URL: "https://discord.com/api/webhooks/(redacted)"
      WEBHOOK_INCLUDE_PUBLIC_IP: 0
      UPDATE_ON_STARTUP: 1
      HTTP_PORT: "mc.elittle.net"
      HTTP_PORT: (redacted)
    volumes:
      - ./saves:/home/steam/.config/unity3d/IronGate/Valheim
      - ./server:/home/steam/valheim
      - ./backups:/home/steam/backups
Tander commented 5 months ago

Now I can't create container even after I remove container and all volumes:

sudo rm -rf server saves backups
docker rm valheim_valheim_1
docker-compose up -d

leads to:

...
Success! App '896660' fully installed.
[ODIN][INFO]: Successfully installed Valheim!
2024-06-10 11:38:47 - [Valheim][INFO]: Initializing Variables....
[ODIN][INFO]: Checking directory permissions: "/home/steam/valheim"
[ODIN][INFO]: Checking directory permissions: "/home/steam/scripts"
[ODIN][INFO]: Checking file permissions: "/home/steam/.bashrc"
[ODIN][ERROR]: Failed to find server executable! Please run `odin install`

How it's even possible? Shouldn't start script download server if there is literally no files in volumes?

Tander commented 5 months ago

I have no idea what is broken and how it can be broken with your image. Switched to https://github.com/lloesche/valheim-server-docker and it works flawlessly. Closing issue.