palworld-server-docker icon indicating copy to clipboard operation
palworld-server-docker copied to clipboard

Unable to start after modifying server settings through docker environment variables

Open flyingnight opened this issue 1 year ago • 8 comments
trafficstars

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

image

flyingnight avatar Feb 01 '24 01:02 flyingnight

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

Cp0204 avatar Feb 01 '24 03:02 Cp0204

Can you provide the commands you executed?

win5923 avatar Feb 01 '24 04:02 win5923

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.

josipledic avatar Feb 01 '24 09:02 josipledic

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.

flyingnight avatar Feb 01 '24 11:02 flyingnight

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.

win5923 avatar Feb 01 '24 18:02 win5923

@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

thijsvanloef avatar Feb 02 '24 08:02 thijsvanloef

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

Dissssy avatar Feb 03 '24 00:02 Dissssy

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.

win5923 avatar Feb 03 '24 14:02 win5923

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

thijsvanloef avatar Feb 05 '24 18:02 thijsvanloef