帕鲁服务器怎么开,palworld,palserver,steamcmd,内存泄露解决
2024/2/12最后修改:
这是网络大佬做的docker,我贴一下用法,具体参数配置点进去自己看:
docker的github链接
Getting Started
Create a game sub-directory on your Docker node in your game-server-directory (Example: /srv/palworld). Give it full permissions with chmod 777 game or use chown -R 1000:1000 game/.Set up Port-Forwarding or NAT for the ports in the Docker-Compose file.Pull the latest version of the image with docker pull jammsen/palworld-dedicated-server:latest.Set up your own docker-compose.yml as per your requirements. Refer to the Docker-Compose examples section and the Environment-Variables section for more information.Start the container via docker-compose up -d && docker-compose logs -f. Watch the log, if no errors occur you can close the logs with ctrl+c.Happy gaming!
服务器ubuntu20.04
第一步,随便找一个目录,创建文件夹game,然后chmod 777 game
第二步,给你的服务器打开端口8211,UDP,UDP,UDP,不是TCP,看好了
第三步,docker pull jammsen/palworld-dedicated-server,上面原始的命令可能跑不起来,你复制我这个。
第四步,在game文件夹旁创建一个docker-compose.yml,写docker-compose.yml,可以vim docker-compose.yml,然后复制下面的内容:
version: '3.3' # 可能报错,原版写的3.9,我改成3.3好了
services:
palworld-dedicated-server:
#build: .
container_name: palcon # 容器名字随便写
image: jammsen/palworld-dedicated-server:latest
restart: unless-stopped
ports:
- target: 8211 # 别动
published: 8211 # 别动
protocol: udp
mode: host
- target: 25575 # RCON port inside of the container
published: 25575 # RCON port on your host
protocol: tcp
mode: host
environment:
- TZ=Europe/Berlin # Change this for logging and backup, see "Environment-Variables"
- ALWAYS_UPDATE_ON_START=true # 服务器自动更新到最新版本,盗版玩家注意
- MULTITHREAD_ENABLED=true
- COMMUNITY_SERVER=true
- BACKUP_ENABLED=true
- BACKUP_CRON_EXPRESSION=0 * * * *
- STEAMCMD_VALIDATE_FILES=true
- SERVER_SETTINGS_MODE=manual # auto/manual,auto则参数由yml决定且不可修改,manual则参数由ini文件决定,且可修改
- NETSERVERMAXTICKRATE=120
- DIFFICULTY=None
- DAYTIME_SPEEDRATE=1.000000
- NIGHTTIME_SPEEDRATE=1.000000
- EXP_RATE=1.000000
- PAL_CAPTURE_RATE=1.000000
- PAL_SPAWN_NUM_RATE=1.000000
- PAL_DAMAGE_RATE_ATTACK=1.000000
- PAL_DAMAGE_RATE_DEFENSE=1.000000
- PLAYER_DAMAGE_RATE_ATTACK=1.000000
- PLAYER_DAMAGE_RATE_DEFENSE=1.000000
- PLAYER_STOMACH_DECREASE_RATE=1.000000
- PLAYER_STAMINA_DECREACE_RATE=1.000000
- PLAYER_AUTO_HP_REGENE_RATE=1.000000
- PLAYER_AUTO_HP_REGENE_RATE_IN_SLEEP=1.000000
- PAL_STOMACH_DECREACE_RATE=1.000000
- PAL_STAMINA_DECREACE_RATE=1.000000
- PAL_AUTO_HP_REGENE_RATE=1.000000
- PAL_AUTO_HP_REGENE_RATE_IN_SLEEP=1.000000
- BUILD_OBJECT_DAMAGE_RATE=1.000000
- BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=1.000000
- COLLECTION_DROP_RATE=1.000000
- COLLECTION_OBJECT_HP_RATE=1.000000
- COLLECTION_OBJECT_RESPAWN_SPEED_RATE=1.000000
- ENEMY_DROP_ITEM_RATE=1.000000
- DEATH_PENALTY=All # All/None None就是死亡不掉落,官网有更多参数配置可选,比如只掉落帕鲁,只掉落装备什么的
- ENABLE_PLAYER_TO_PLAYER_DAMAGE=false
- ENABLE_FRIENDLY_FIRE=false
- ENABLE_INVADER_ENEMY=true # 村庄袭击
- ACTIVE_UNKO=false
- ENABLE_AIM_ASSIST_PAD=true
- ENABLE_AIM_ASSIST_KEYBOARD=false
- DROP_ITEM_MAX_NUM=3000 # 服务器配置太拉的话就写小一点,堆叠的物品算一个物品
- DROP_ITEM_MAX_NUM_UNKO=100
- BASE_CAMP_MAX_NUM=128
- BASE_CAMP_WORKER_MAXNUM=15 # 这个参数改了没用,目前是bug
- DROP_ITEM_ALIVE_MAX_HOURS=1.000000
- AUTO_RESET_GUILD_NO_ONLINE_PLAYERS=false
- AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS=72.000000
- GUILD_PLAYER_MAX_NUM=20
- PAL_EGG_DEFAULT_HATCHING_TIME=72.000000 # 孵蛋基准时间,我自己玩的时候写的是0.062500,小蛋十秒大蛋一分钟
- WORK_SPEED_RATE=1.000000 # 打工基准速度
- IS_MULTIPLAY=false
- IS_PVP=false
- CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP=false
- ENABLE_NON_LOGIN_PENALTY=true
- ENABLE_FAST_TRAVEL=true
- IS_START_LOCATION_SELECT_BY_MAP=true
- EXIST_PLAYER_AFTER_LOGOUT=false
- ENABLE_DEFENSE_OTHER_GUILD_PLAYER=false
- COOP_PLAYER_MAX_NUM=4
- MAX_PLAYERS=32 # 服务器最大人数
- SERVER_NAME=nameAAAAAAA # 服务器名字
- SERVER_DESCRIPTION=Palworld-Dedicated-Server # 服务器介绍,好像不能写中文
- ADMIN_PASSWORD=adminPasswordHere # 服务器管理员密码
- SERVER_PASSWORD=serverPasswordHere # 服务器密码
- PUBLIC_PORT=8211 # 别改
- PUBLIC_IP= # 不写没事,建议别写
- RCON_ENABLED=false
- RCON_PORT=25575
- REGION= # 别改
- USEAUTH=true
- BAN_LIST_URL=https://api.palworldgame.com/api/banlist.txt
volumes:
- ./game:/palworld
第五条,不要用root用户,用普通用户,输入sudo docker-compose up -d && sudo docker-compose logs -f
第六条,耐心等待大概五分钟,中间log会卡一会,别急。
如果以后要改配置(创建docker时SERVER_SETTINGS_MODE=manual,否则以后改不了,必须重新开容器,存档会保留别担心),从docker外直接修改game文件夹内的PalWorldSettings.ini(/home/steam/game/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini) 然后直接重启容器,就会生效了。
如果还有问题转不起来,直接下面评论。
目前本人测试,4核8G三个人高强度玩高强度跑图两个小时会崩,4核16G三个人高强度跑图没事,不会崩,如果你的配置太拉了崩了,啥也不要管等他docker容器自启动就行。