Open kamilgregorczyk opened 2 years ago
root@valheim-server-5b6bdc7646-8q5lq:/# echo $WORLD_NAME
ZadupieNowe3
root@valheim-server-5b6bdc7646-8q5lq:/config/worlds# ps ax | cat
PID TTY STAT TIME COMMAND
1 ? Ss 1:16 /usr/bin/python3 /usr/local/bin/supervisord -c /usr/local/etc/supervisord.conf
28 ? S 0:00 /usr/local/sbin/syslogd -n -S -t -O -
29 ? S 0:00 /usr/sbin/cron -f
40 ? S 0:29 /bin/bash /usr/local/bin/valheim-updater
73 ? S 0:12 /bin/bash /usr/local/bin/valheim-backup
165 pts/0 Ss+ 0:00 bash
45454 ? S 0:00 /bin/bash /usr/local/bin/valheim-server
45458 ? Sl 348:46 /opt/valheim/server/valheim_server.x86_64 -nographics -batchmode -name ZadupieNowe3 -port 2456 -world ZadupieNowe3 -public 1 -password online13
45464 ? S 0:00 /bin/bash /usr/local/bin/valheim-server
45465 ? Sl 0:01 /usr/local/bin/valheim-logfilter -logtostderr -v 2
66836 pts/1 Ss 0:00 /bin/bash
68057 ? S 0:00 sleep 20
68061 ? S 0:00 sleep 9
68062 pts/1 R+ 0:00 ps ax
68063 pts/1 S+ 0:00 cat
got it working by doing
chmod 777 ./Zadupie*
and
chwown valheim ./Zadupie*
weird that there are no permissions issues/warnings
root@valheim-server-5b6bdc7646-6bnrt:/config/worlds# ls -lah
total 15M
drwxr-xr-x 2 root root 4.0K Dec 17 09:03 .
drwxr-xr-x 5 root root 4.0K Dec 17 09:01 ..
-rw-r--r-- 1 root root 15M Dec 17 09:03 ZadupieNowe3.db
-rw-r--r-- 1 root root 48 Dec 17 09:03 ZadupieNowe3.fwl
I actually found a bug, it is only possible to restore server from backup or import save from steam to dedicated server on a fresh instance that wasn't initialized with a new world previously. I tried putting my save into an existing server and it didn't work even though permissions were set. I had to delete whole sever, spin it up and very fast put my existing world into /worlds dir, before new one would be generated.
Can you check if #438 solves the issue for you?
I'm experiencing this right now, even with the backup of the .fwl files.
The way i resolved was: Delete the docker container entirely (i use unraid). I put my backups in place on my local storage, Started a new container, and whatever permissions the initial container changes it to on start up resolved my issues.
Note, i tried manually chmod/chowning the exact same permissions prior. So it must be something not visible from the host OS?.
Note during my debugging, i tested with chmod 666, 777, 770, and the nobody:users ownership. Still no dice. Only thing that worked was re-creating the actual container like kamilgregorczyk did
########## PRE-NEW CONTAINER, ONLY COPIED MY BACKUPS IN HERE. DID NOT CHMOD'S
root@unraid:/mnt/fastcache/appdata/valheim/.config/unity3d/IronGate/Valheim/worlds# ls -alth
total 66M
drwxrwx--- 1 nobody users 116 Apr 1 05:28 ./
-rw-r--r-- 1 nobody users 33M Apr 1 05:28 Dedicated.db.old
-rw-r--r-- 1 nobody users 45 Apr 1 05:28 Dedicated.fwl
-rw-r--r-- 1 nobody users 45 Apr 1 05:28 Dedicated.fwl.old
-rw-r--r-- 1 nobody users 33M Apr 1 05:28 Dedicated.db
drwxrwx--- 1 nobody users 110 Mar 22 20:02 ../
######### NEW CONTAINER STARTED, PERMISSIONS AUTOMATICALLY CHANGED - WORKING!
root@unraid:/mnt/fastcache/appdata/valheim/.config/unity3d/IronGate/Valheim/worlds# ls -alth
total 66M
drwxrwx--- 1 nobody users 116 Apr 1 05:28 ./
-rwxrwx--- 1 nobody users 33M Apr 1 05:28 Dedicated.db.old*
-rwxrwx--- 1 nobody users 45 Apr 1 05:28 Dedicated.fwl*
-rwxrwx--- 1 nobody users 45 Apr 1 05:28 Dedicated.fwl.old*
-rwxrwx--- 1 nobody users 33M Apr 1 05:28 Dedicated.db*
drwxrwx--- 1 nobody users 110 Mar 22 20:02 ../
-rwxrwx--- 1 nobody users 33M Apr 1 05:28 Dedicated.db.old -rwxrwx--- 1 nobody users 45 Apr 1 05:28 Dedicated.fwl -rwxrwx--- 1 nobody users 45 Apr 1 05:28 Dedicated.fwl.old* -rwxrwx-
Hey I believe I am having the same issue as you, despite hours of trying to fix it. I've tried transferring over an old .db .fwl file and no luck. I've created a new one and transferred them over, no luck. I've tried to change permissions before and no luck. I've deleted all containers, restarted new one using docker compose and did not change any permissions, also no luck. Only thing that seems to work is letting container startup make its own .db and .fwl file. Any ideas how I could fix it so I could import my own world? Thanks!
Had the same problem yesterday, I've managed to find the real location of the save files at /home/valheim/.config/unity3d/IronGate/Valheim/worlds_local
inside the docker container. Deleted the files in there and replaced with a different world and it worked!
https://github.com/lloesche/valheim-server-docker/discussions/414
I've been trying to restore server from backup. I delete all /worlds files and place those from backup (.db and .fwl) and the world gets overriden with empty one. My files from backup get renamed to .db.old and .fwl.old and new world is generated.
I also tried to use my steam's save as a server, same issue, I couldn't find the reason why it's happening in logs
After putting old world from steam:
and then after reboot of the pod