diff --git a/apps/palworld-server/README.md b/apps/palworld-server/README.md new file mode 100644 index 00000000..2733f3d1 --- /dev/null +++ b/apps/palworld-server/README.md @@ -0,0 +1,59 @@ +# 使用说明 + +## 数据文件夹授权 + +- 1、**必要操作:** 首次安装完成后,进入已安装应用界面,点击跳转数据目录,修改目录下的`data`文件夹为`1000`用户和用户组。 + +命令行修改则类似如下,路径按需修改: +``` +chown -R 1000:1000 /opt/1panel/apps/local/palworld-server/palworld-server/data +``` + +- 2、回到已安装应用界面,重建应用。 + +# 原始相关 +*** + +# palworld-docker + +[![Check Update](https://github.com/KagurazakaNyaa/palworld-docker/actions/workflows/update.yml/badge.svg)](https://github.com/KagurazakaNyaa/palworld-docker/actions/workflows/update.yml) +[![Build Docker Image](https://github.com/KagurazakaNyaa/palworld-docker/actions/workflows/build.yml/badge.svg)](https://github.com/KagurazakaNyaa/palworld-docker/actions/workflows/build.yml) +![Docker Pulls](https://img.shields.io/docker/pulls/kagurazakanyaa/palworld) +![Docker Stars](https://img.shields.io/docker/stars/kagurazakanyaa/palworld) +![Image Size](https://img.shields.io/docker/image-size/kagurazakanyaa/palworld/latest) + +Palworld dedicated server with docker + +## Environments + +The variables in the table below affect the server's startup command, see and +| Variable | Describe | Default Values | Allowed Values | +|--------------------|-------------------------------------------------------------|----------------|----------------------| +| MAX_PLAYERS | Change the maximum number of participants on the server. | 32 | 1-32 | +| GAME_PORT | Change the port number used to listen to the server. | 8211 | 1024-65535 | +| ENABLE_MULTITHREAD | Improves performance in multi-threaded CPU environments. | true | true/false | +| IS_PUBLIC | Setup server as a community server. | false | true/false | +| PUBLIC_IP | If not specified, it will be detected automatically. | | all vaild ip address | +| PUBLIC_PORT | If not specified, it will be detected automatically. | | 1024-65535 | +| FORCE_UPDATE | Whether the server should be update each time start. | false | true/false | + +The variables in the table below only valid during initialization, if you need to make it valid, please delete `/opt/palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` and restart the container. +| Variable | Describe | Default Values | Allowed Values | +|--------------------|--------------------------|-------------------------|----------------| +| SERVER_NAME | Server name | Default Palworld Server | string | +| SERVER_DESC | Server description | Default Palworld Server | string | +| ADMIN_PASSWORD | AdminPassword | | string | +| SERVER_PASSWORD | Set the server password. | | string | +| RCON_ENABLED | Enable RCON | false | true/false | +| RCON_PORT | Port number for RCON | 25575 | 1024-65535 | + +For balance changes, please directly modify `/opt/palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini`, please refer to + +## Volumes + +|Path |Describe | +|--------------------------|----------------------| +|`/opt/palworld/Pal/Saved` |Game config and saves.| + +NOTE: If you use bind instead of volume to mount, you need to manually change the volume owner to uid=1000. +In the case of the docker-compose.yml of the example, you need to execute `chown -R 1000:1000 ./data` \ No newline at end of file diff --git a/apps/palworld-server/data.yml b/apps/palworld-server/data.yml new file mode 100644 index 00000000..9c8f22f1 --- /dev/null +++ b/apps/palworld-server/data.yml @@ -0,0 +1,20 @@ +name: Palworld Dedicated Server (幻兽帕鲁) +tags: + - 工具 +title: 幻兽帕鲁服务端 +type: 工具 +description: 幻兽帕鲁服务端 +additionalProperties: + key: palworld-server + name: Palworld Dedicated Server (幻兽帕鲁) + tags: + - Tool + shortDescZh: 幻兽帕鲁服务端 + shortDescEn: Palworld Dedicated Server (幻兽帕鲁) + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://hub.docker.com/r/kagurazakanyaa/palworld + github: https://github.com/KagurazakaNyaa/palworld-docker + document: https://github.com/KagurazakaNyaa/palworld-docker diff --git a/apps/palworld-server/latest/.env.sample b/apps/palworld-server/latest/.env.sample new file mode 100644 index 00000000..05543079 --- /dev/null +++ b/apps/palworld-server/latest/.env.sample @@ -0,0 +1,15 @@ +CONTAINER_NAME="palworld-server" +PANEL_APP_PORT_HTTP="8211" +PANEL_APP_PORT_RCON="25575" +DATA_PATH="./data" +MAX_PLAYERS="32" +MULTITHREAD_SWITCH="true" +PUBLIC_SWITCH="false" +PUBLIC_IP="" +PUBLIC_PORT="" +UPDATE_SWITCH="false" +SERVER_NAME="Default Palworld Server" +SERVER_DESC="Default Palworld Server" +ADMIN_PASSWORD="palworld" +SERVER_PASSWORD="" +RCON_SWITCH="false" diff --git a/apps/palworld-server/latest/data.yml b/apps/palworld-server/latest/data.yml new file mode 100644 index 00000000..c50c0f52 --- /dev/null +++ b/apps/palworld-server/latest/data.yml @@ -0,0 +1,107 @@ +additionalProperties: + formFields: + - default: 8211 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: 25575 + edit: true + envKey: PANEL_APP_PORT_RCON + labelEn: RCON Port + labelZh: RCON 端口 + required: true + rule: paramPort + type: number + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data folder path + labelZh: 数据文件夹路径 + required: true + type: text + - default: 32 + edit: true + envKey: MAX_PLAYERS + labelEn: Maximum number of participants on the server + labelZh: 玩家数量限制 + required: true + rule: paramPort + type: number + - default: true + edit: true + envKey: MULTITHREAD_SWITCH + labelEn: Improves performance in multi-threaded CPU environments (true / false) + labelZh: 是否启用 CPU 多线程优化 (true / false) + required: true + type: text + - default: false + edit: true + envKey: PUBLIC_SWITCH + labelEn: Setup server as a community server (true / false) + labelZh: 是否启将服务器设置为社区服务器 (true / false) + required: true + type: text + - default: '' + edit: true + envKey: PUBLIC_IP + labelEn: PUBLIC IP (If not specified, it will be detected automatically) + labelZh: 服务器 IP (留空自动检测) + required: false + type: text + - default: '' + edit: true + envKey: PUBLIC_PORT + labelEn: PUBLIC PORT (If not specified, it will be detected automatically) + labelZh: 服务器端口 (留空自动检测) + required: false + rule: paramPort + type: text + - default: false + edit: true + envKey: UPDATE_SWITCH + labelEn: Whether the server should be update each time start (true / false) + labelZh: 是否每次启动都更新服务器 (true / false) + required: true + type: text + - default: 'Default Palworld Server' + edit: true + envKey: SERVER_NAME + labelEn: Server name + labelZh: 服务器名 + required: true + type: text + - default: 'Default Palworld Server' + edit: true + envKey: SERVER_DESC + labelEn: Server description + labelZh: 服务器说明 + required: true + type: text + - default: palworld + edit: true + envKey: ADMIN_PASSWORD + labelEn: Admin password + labelZh: 管理员密码 + random: true + required: false + rule: paramComplexity + type: password + - default: '' + edit: true + envKey: SERVER_PASSWORD + labelEn: Server password + labelZh: 服务器密码 + required: false + rule: paramComplexity + type: password + - default: false + edit: true + envKey: RCON_SWITCH + labelEn: Enable RCON (true / false) + labelZh: 是否启用 RCON (true / false) + required: true + type: text diff --git a/apps/palworld-server/latest/docker-compose.yml b/apps/palworld-server/latest/docker-compose.yml new file mode 100644 index 00000000..75e31997 --- /dev/null +++ b/apps/palworld-server/latest/docker-compose.yml @@ -0,0 +1,34 @@ +version: '3.9' +services: + palworld-server: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}/udp + - ${PANEL_APP_PORT_RCON}:${PANEL_APP_PORT_RCON}/tcp + volumes: + - /etc/localtime:/etc/localtime:ro + - ${DATA_PATH}:/opt/palworld/Pal/Saved + environment: + - GAME_PORT=${PANEL_APP_PORT_HTTP} + - MAX_PLAYERS=${MAX_PLAYERS} + - ENABLE_MULTITHREAD=${MULTITHREAD_SWITCH} + - IS_PUBLIC=${PUBLIC_SWITCH} + - PUBLIC_IP=${PUBLIC_IP} + - PUBLIC_PORT=${PUBLIC_PORT} + - FORCE_UPDATE=${UPDATE_SWITCH} + - SERVER_NAME=${SERVER_NAME} + - SERVER_DESC=${SERVER_DESC} + - ADMIN_PASSWORD=${ADMIN_PASSWORD} + - SERVER_PASSWORD=${SERVER_PASSWORD} + - RCON_ENABLED=${RCON_SWITCH} + - RCON_PORT=${PANEL_APP_PORT_RCON} + image: kagurazakanyaa/palworld:latest + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/palworld-server/logo.png b/apps/palworld-server/logo.png new file mode 100644 index 00000000..966c228f Binary files /dev/null and b/apps/palworld-server/logo.png differ