当前位置:首页 » 《随便一记》 » 正文

幻兽帕鲁Docker服务端搭建

13 人参与  2024年02月19日 16:46  分类 : 《随便一记》  评论

点击全文阅读


幻兽帕鲁Docker服务端搭建

各种命令

https://bbs.saraba1st.com/2b/thread-2168983-1-1.html

存档恢复

这里直接看这个工程的readme就行:https://github.com/yoko-murasame/palworld-host-save-fix
其他参考:https://forum.gamer.com.tw/C.php?bsn=71458&snA=90

用这个一键启动

https://github.com/thijsvanloef/palworld-server-docker

# 建议不使用默认端口,防止被攻击mkdir /root/palworld && chmod 777 palworld \&& firewall-cmd --add-port=58211/udp --zone=public --permanent \&& firewall-cmd --add-port=27015/udp --zone=public --permanent \&& firewall-cmd --reload# 启动docker run -d \    --name palworld-server \    -p 58211:58211/udp \    -p 27015:27015/udp \    -v /root/palworld/:/palworld/ \    -e PLAYERS=8 \    -e PORT=58211 \    -e PUID=1000 \    -e PGID=1000 \    -e COMMUNITY=false \    --restart unless-stopped \    thijsvanloef/palworld-server-docker

服务器自定义配置

建议设置服务器密码:ServerPassword、AdminPassword

https://forum.gamer.com.tw/C.php?bsn=71458&snA=227
https://www.entertainment14.net/blog/post/110990868-%E5%B9%BB%E7%8D%B8%E5%B8%95%E9%AD%AF-palworld-%E4%BC%BA%E6%9C%8D%E5%99%A8%E8%A8%AD%E5%AE%9A%E6%AA%94%E4%B8%AD%E6%96%87%E5%8C%96%E4%B8%80%E8%A6%BD

[/Script/Pal.PalGameWorldSettings]OptionSettings=(Difficulty=None,DayTimeSpeedRate=1.000000,NightTimeSpeedRate=1.000000,ExpRate=1.000000,PalCaptureRate=1.000000,PalSpawnNumRate=1.000000,PalDamageRateAttack=1.000000,PalDamageRateDefense=1.000000,PlayerDamageRateAttack=1.000000,PlayerDamageRateDefense=1.000000,PlayerStomachDecreaceRate=1.000000,PlayerStaminaDecreaceRate=1.000000,PlayerAutoHPRegeneRate=1.000000,PlayerAutoHpRegeneRateInSleep=1.000000,PalStomachDecreaceRate=1.000000,PalStaminaDecreaceRate=1.000000,PalAutoHPRegeneRate=1.000000,PalAutoHpRegeneRateInSleep=1.000000,BuildObjectDamageRate=1.000000,BuildObjectDeteriorationDamageRate=1.000000,CollectionDropRate=4.000000,CollectionObjectHpRate=1.000000,CollectionObjectRespawnSpeedRate=0.500000,EnemyDropItemRate=4.000000,DeathPenalty=None,bEnablePlayerToPlayerDamage=False,bEnableFriendlyFire=False,bEnableInvaderEnemy=True,bActiveUNKO=False,bEnableAimAssistPad=True,bEnableAimAssistKeyboard=False,DropItemMaxNum=6000,DropItemMaxNum_UNKO=100,BaseCampMaxNum=128,BaseCampWorkerMaxNum=15,DropItemAliveMaxHours=0.500000,bAutoResetGuildNoOnlinePlayers=False,AutoResetGuildTimeNoOnlinePlayers=72.000000,GuildPlayerMaxNum=20,PalEggDefaultHatchingTime=0.100000,WorkSpeedRate=2.000000,bIsMultiplay=False,bIsPvP=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=True,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=False,CoopPlayerMaxNum=4,ServerPlayerMaxNum=32,ServerName="Default Palworld Server",ServerDescription="",AdminPassword="",ServerPassword="",PublicPort=8211,PublicIP="",RCONEnabled=true,RCONPort=25575,Region="",bUseAuth=True,BanListURL="https://api.palworldgame.com/api/banlist.txt")

每天备份存档

创建一个名为palworldbackup.sh的脚本

#!/bin/bash# 指定你要备份的目录SOURCE_DIR="/root/palworld/Pal/Saved/SaveGames/0"# 指定备份文件存放的目录BACKUP_DIR="/root/opt/palworldbackup"mkdir -p ${BACKUP_DIR}# 获取当前的日期DATE=$(date +%Y-%m-%d)# 创建备份,使用tar命令tar -czf $BACKUP_DIR/backup-$DATE.tar.gz -C $SOURCE_DIR .

添加权限

chmod +x /root/opt/palworldbackup.sh

添加定时任务

crontab -e# 添加以下行 每天(0点0分)执行0 0 * * * /root/opt/palworldbackup.sh

手动部署

https://cloud.tencent.com/developer/article/2382000

command -v docker &> /dev/null && echo "Docker 已安装,请进行下一步." || curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun# 下载steamcmddocker run -dit --name steamcmd --net host  cm2network/steamcmd# 如果网络问题多试几次,然后 validate 可选docker exec -it steamcmd bash -c "/home/steam/steamcmd/steamcmd.sh +login anonymous +app_update 2394010 validate +quit"# 非静默启动服务docker exec -it steamcmd bash -c "/home/steam/Steam/steamapps/common/PalServer/PalServer.sh"# 静默-最好进去容器内启动docker exec -it steamcmd bashcd /home/steam/Steam/steamapps/common/PalServer/home/steam/Steam/steamapps/common/PalServer/PalServer.sh > log.log 2>&1 &tail -f log.log# 存档路径cd /home/steam/Steam/steamapps/common/PalServer/Pal/Saved# 端口 8211firewall-cmd --add-port=8211/udp --zone=public --permanent \&& firewall-cmd --add-port=27015/udp --zone=public --permanent \&& firewall-cmd --reload

点击全文阅读


本文链接:http://m.zhangshiyu.com/post/69092.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1