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

Unable to start after modifying server settings through docker environment variables #249

Closed flyingnight closed 9 months ago

flyingnight commented 9 months ago

您好,我通过docker的环境变量修改服务器设置后(不是修改PalWorldSettings.ini文件),服务器无法启动了,日志报告如下,过一段时间后会自动退出重新出现这个日志报告,不断循环

image

Cp0204 commented 9 months ago

国际项目 提问题建议至少翻译成人家看得懂的语言,以示尊重。

win5923 commented 9 months ago

Can you provide the commands you executed?

josipledic commented 9 months ago

Can you post your env vars? I had a similar issue by mistakingly using quotes around float numbers which made the yaml unparsable. Maybe your config is corrupted in a similar way. Fixed it by deleting DefaultPalWorldSettings.ini, and manually editing PalWorldSettings.ini to remove the unwanted characters.

flyingnight commented 9 months ago

docker run -d \ --name palworld-server \ -p 8211:8211/udp \ -p 27015:27015/udp \ -v ./<palworld-folder>:/palworld/ \ -e PUID=100 \ -e PGID=100 \ -e PORT=8211 \ -e PLAYERS=16 \ -e MULTITHREADING=true \ -e RCON_ENABLED=true \ -e RCON_PORT=25575 \ -e TZ=Asia/Shanghai \ -e ADMIN_PASSWORD="adminPasswordHere" \ -e SERVER_PASSWORD="worldofpals" \ -e COMMUNITY=false \ -e SERVER_NAME="World of Pals" \ -e BACKUP_ENABLED=true \ -e BACKUP_CRON_EXPRESSION=0 2 * * *\ --restart unless-stopped \ thijsvanloef/palworld-server-docker:latest I deployed the above code, and when it was just deployed, the server was available and I could enter the server. But when I modified the parameters in the PalWorldSettings.ini file, the docker couldn't start. In order to prevent the code in the file from causing the problem, I manually only modified the numbers, but still couldn't enter.

win5923 commented 9 months ago

I don't think directly modifying the PalWorldSettings.ini file is a good approach. it's preferable to recreate the container using either docker run or docker-compose up.

thijsvanloef commented 9 months ago

@flyingnight Please make sure you've followed these steps: docker compose down --rmi all

Remove palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini

docker compose up -d

Dissssy commented 9 months ago

As modifying the ini isnt recommended, Is there possibly a way to force specifically the config to stay inside the container that way when you recreate with docker its regenerated? changing the env works but it should actually reflect when you recreate, imo

win5923 commented 9 months ago

As modifying the ini isnt recommended, Is there possibly a way to force specifically the config to stay inside the container that way when you recreate with docker its regenerated? changing the env works but it should actually reflect when you recreate, imo

In the context of Docker-compose.yml, when modifying the contents of the env_file and starting the container, the start.sh script will copy each parameter from the env file to PalWorldSettings.ini during server initialization.

Therefore, directly modifying the content of the ini file doesn't take effect when starting through Docker Compose.

thijsvanloef commented 9 months ago

@flyingnight if you still have these issues please reopen this issue