thijsvanloef / palworld-server-docker

A Docker Container to easily run a Palworld dedicated server.
https://hub.docker.com/r/thijsvanloef/palworld-server-docker
MIT License
2.43k stars 295 forks source link

Modifying server settings doesn't work #161

Closed jexterliangsufe closed 9 months ago

jexterliangsufe commented 9 months ago

Describe the bug

I modify PalWorldSettings.ini and then use docker compose restart to reboot. But the PalWorldSettings.ini doesn't change after rebooting.

To Reproduce

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

docker-compose.yml contents

services:
   palworld:
      image: palworld-server-docker:latest
      restart: unless-stopped
      container_name: palworld-server
      ports:
        - 8211:8211/udp
        - 27015:27015/udp # Required if you want your server to show up in the community servers tab 
      environment:
         - PUID=1000
         - PGID=1000
         - PORT=8211 # Optional but recommended
         - PLAYERS=16 # Optional but recommended
         - SERVER_PASSWORD="123" # Optional but recommended
         - MULTITHREADING=true
         - RCON_ENABLED=true
         - RCON_PORT=25575
         - TZ=UTC
         - ADMIN_PASSWORD="123456"
         - COMMUNITY=true  # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
         - SERVER_NAME="111"
      volumes:
         - /root/Palworld:/palworld/

Container/Host Logs

Additional context

Add any other context about the problem here.

hjkim commented 9 months ago

I've also been struggling with the same issue for 10 hours. I thought it would be resolved once this PR was merged: 120, but it hasn't been resolved at all.

mwessman commented 9 months ago

https://github.com/thijsvanloef/palworld-server-docker/issues/29#issuecomment-1911169646

I made a comment on this in another thread. Try it out and see if it works for you.

jexterliangsufe commented 9 months ago

#29 (comment)

I made a comment on this in another thread. Try it out and see if it works for you.

Will the game data and user data be deleted after docker compose down and docker compose up -d?

mwessman commented 9 months ago

No, it will be fine. Docker compose down only removes the container and network. The volume will be fine as long as you don't run it with the --volumes flag.

Twinki14 commented 9 months ago

You may need to use a persistent volume instead of volume binding, persistent volumes aren't unique to the container or docker-compose but always live in Docker, and any container can attach to them

https://dev.to/darkmavis1980/how-to-persist-data-with-docker-compose-ik8 shows and example of the differences

jexterliangsufe commented 9 months ago

No, it will be fine. Docker compose down only removes the container and network. The volume will be fine as long as you don't run it with the --volumes flag.

It works. Thank you

jexterliangsufe commented 9 months ago

You may need to use a persistent volume instead of volume binding, persistent volumes aren't unique to the container or docker-compose but always live in Docker, and any container can attach to them

https://dev.to/darkmavis1980/how-to-persist-data-with-docker-compose-ik8 shows and example of the differences

Thank you. I will try.

imyxiao commented 9 months ago

Stop Docker service first, then try modifying config files? I have also encountered this problem before.

Dashboy1998 commented 9 months ago

Ran into this issue while testing some other enhancements.

It appears the game saves the settings when it shuts down. So any changes you make while the server is live will be overridden.

Try editing the file with the container down.

Neilake commented 9 months ago

Ran into this issue while testing some other enhancements.

It appears the game saves the settings when it shuts down. So any changes you make while the server is live will be overridden.

Try editing the file with the container down.

it works,thx

clarkent86 commented 9 months ago

@hjkim did the updated steps solve your issue?