# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Pterodactyl
spec:
    description: The open-source game server management panel — build, deploy, and manage game servers with ease.
    coverImage: https://camo.githubusercontent.com/c4afa402e939b5a4619dfbd7d31864c30e21c6655566a9d60ecd2d48fa5683ac/68747470733a2f2f63646e2e707465726f64616374796c2e696f2f736974652d6173736574732f707465726f64616374796c5f76315f64656d6f2e676966
    icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/pterodactyl.png
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: The domain name for your Pterodactyl panel
        - key: APP_SERVICE_AUTHOR
          type: STRING
          name: Service Author Email
          description: Email address used as the sender for panel notifications
    tags:
        - gaming
        - game-server
    readme: |-
        # Pterodactyl

        > Stop settling for less. Make game servers a first class citizen on your platform.

        Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Every game server runs inside an isolated Docker container, keeping your host environment clean and capping resource usage per server.
        Pterodactyl has been in active development since 2015 and powers game server hosting for individual users, networks, and large hosting enterprises alike. It is MIT-licensed and completely free.

        ## Supported Games

        Pterodactyl ships with official support for a wide range of games, including:

        - Minecraft (Java, Bedrock, and variants)
        - Rust, Terraria, ARK: Survival Evolved
        - Team Fortress 2, Counter-Strike: Global Offensive
        - Factorio, Squad, and many more via community eggs

        ## After Deployment

        Once the panel is up, visit your domain and run the following command inside the Pterodactyl container to create your first admin account:

        ```
        php artisan p:user:make
        ```

        Then head to **Admin → Nodes** and connect a [Wings](https://github.com/pterodactyl/wings) node — Wings is the Go-based daemon that actually runs and manages your game server containers on a host machine.

        > **Important:** Back up the `APP_KEY` value from your container's `/app/.env` immediately after setup. Losing it makes encrypted data (such as API keys) unrecoverable.

        ## What This Template Deploys

        | Service | Role |
        |---|---|
        | Pterodactyl Panel | Web UI & API |
        | MariaDB | Relational database |
        | Redis | Cache, sessions, and job queue |

        ## Links

        - Website: https://pterodactyl.io/
        - Documentation: https://pterodactyl.io/panel/1.0/getting_started.html
        - GitHub (Panel): https://github.com/pterodactyl/panel
        - GitHub (Wings): https://github.com/pterodactyl/wings
    resourceRequirement:
        minConfig:
            cpu: 1
            ram: 2
        recommendedConfig:
            cpu: 2
            ram: 4
    services:
        - name: Pterodactyl
          icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/pterodactyl.png
          dependencies:
            - redis
            - mariadb
          template: PREBUILT_V2
          spec:
            source:
                image: ghcr.io/pterodactyl/panel:v1.12.2
            ports:
                - id: http
                  port: 80
                  type: HTTP
            volumes:
                - id: var
                  dir: /app/var
                - id: logs
                  dir: /app/storage/logs
            env:
                APP_ENV:
                    default: production
                APP_ENVIRONMENT_ONLY:
                    default: "false"
                APP_SERVICE_AUTHOR:
                    default: ${APP_SERVICE_AUTHOR}
                APP_TIMEZONE:
                    default: UTC
                APP_URL:
                    default: https://${PUBLIC_DOMAIN}
                CACHE_DRIVER:
                    default: redis
                DB_CONNECTION:
                    default: mysql
                DB_DATABASE:
                    default: ${MARIADB_DATABASE}
                DB_HOST:
                    default: ${MARIADB_HOST}
                DB_PASSWORD:
                    default: ${MARIADB_PASSWORD}
                DB_PORT:
                    default: ${MARIADB_PORT}
                DB_USERNAME:
                    default: ${MARIADB_USER}
                QUEUE_CONNECTION:
                    default: redis
                SESSION_DRIVER:
                    default: redis
            healthCheck:
                type: HTTP
                port: http
                http:
                    path: /
          domainKey: PUBLIC_DOMAIN
        - name: mariadb
          icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/mariadb.png
          template: PREBUILT_V2
          spec:
            source:
                image: mariadb:11.8.6
            ports:
                - id: database
                  port: 3306
                  type: TCP
            volumes:
                - id: data
                  dir: /var/lib/mysql
            env:
                MARIADB_DATABASE:
                    default: panel
                    expose: true
                MARIADB_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                MARIADB_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                MARIADB_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
                MARIADB_ROOT_PASSWORD:
                    default: ${PASSWORD}
                MARIADB_USER:
                    default: pterodactyl
                    expose: true
            healthCheck:
                type: TCP
                port: database
            portForwarding:
                enabled: false
        - name: redis
          icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/redis.png
          template: PREBUILT_V2
          spec:
            source:
                image: redis/redis-stack-server:7.4.0-v8
            ports:
                - id: database
                  port: 6379
                  type: TCP
            volumes:
                - id: data
                  dir: /data
            env:
                REDIS_ARGS:
                    default: --requirepass ${PASSWORD}
                REDIS_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                REDIS_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                REDIS_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
            healthCheck:
                type: TCP
                port: database
            portForwarding:
                enabled: false
localization:
    zh-CN:
        description: 开源游戏服务器管理面板，轻松构建、部署并管理游戏服务器。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 域名
              description: 你想将 Pterodactyl 管理面板绑定到哪个域名上？
            - key: APP_SERVICE_AUTHOR
              type: STRING
              name: 服务作者邮箱
              description: 面板通知发件人的电子邮件地址
        readme: |-
            # Pterodactyl

            > 别再将就，让游戏服务器成为你平台上的一等公民。

            Pterodactyl® 是免费开源的游戏服务器管理面板，由 PHP、React 与 Go 构建。每台游戏服务器都在独立的 Docker 容器内运行，保持宿主环境整洁，并精确限制各服务器的资源用量。

            Pterodactyl 自 2015 年持续开发至今，为个人用户、游戏网络到大型主机商提供稳定、高效、安全的服务器管理解决方案。采用 MIT 授权，完全免费。

            ## 支持的游戏

            Pterodactyl 原生支持多款热门游戏，包括：

            - Minecraft（Java、Bedrock 及各类变体）
            - Rust、Terraria、ARK: Survival Evolved
            - Team Fortress 2、Counter-Strike: Global Offensive
            - Factorio、Squad，以及更多社区 Egg 支持的游戏

            ## 部署后配置

            面板启动后，前往你的域名，并在 Pterodactyl 容器内执行以下命令创建第一个管理员账号：

            ```
            php artisan p:user:make
            ```

            然后前往 **管理 → 节点**，连接一台安装了 [Wings](https://github.com/pterodactyl/wings) 的主机——Wings 是用 Go 编写的 Daemon，负责实际运行与管理游戏服务器容器。

            > **重要：** 配置完成后，请立即备份容器内 `/app/.env` 中的 `APP_KEY`。一旦丢失，所有加密数据（如 API 密钥）将无法恢复。

            ## 此 Template 部署的服务

            | 服务 | 用途 |
            |---|---|
            | Pterodactyl Panel | 管理界面与 API |
            | MariaDB | 关系型数据库 |
            | Redis | 缓存、Session 与任务队列 |

            ## 相关链接

            - 官方网站：https://pterodactyl.io/
            - 官方文档：https://pterodactyl.io/panel/1.0/getting_started.html
            - GitHub（Panel）：https://github.com/pterodactyl/panel
            - GitHub（Wings）：https://github.com/pterodactyl/wings
    zh-TW:
        description: 開源遊戲伺服器管理面板，輕鬆建立、部署並管理遊戲伺服器。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 網域
              description: 你想將 Pterodactyl 管理面板綁在哪個網域上？
            - key: APP_SERVICE_AUTHOR
              type: STRING
              name: 服務作者信箱
              description: 面板通知寄件人的電子郵件地址
        readme: |-
            # Pterodactyl

            > 別再將就，讓遊戲伺服器成為你平台上的一等公民。

            Pterodactyl® 是免費開源的遊戲伺服器管理面板，由 PHP、React 與 Go 建構。每台遊戲伺服器都在獨立的 Docker 容器內運行，確保主機環境乾淨，並能精確限制各伺服器的資源用量。

            Pterodactyl 自 2015 年持續開發至今，為個人用戶、遊戲網絡到大型主機商提供穩定、高效、安全的伺服器管理解決方案。採用 MIT 授權，完全免費。

            ## 支援的遊戲

            Pterodactyl 原生支援多款熱門遊戲，包括：

            - Minecraft（Java、Bedrock 及各類變體）
            - Rust、Terraria、ARK: Survival Evolved
            - Team Fortress 2、Counter-Strike: Global Offensive
            - Factorio、Squad，以及更多社群 Egg 支援的遊戲

            ## 部署後設定

            面板啟動後，前往你的網域，並在 Pterodactyl 容器內執行以下指令建立第一個管理員帳號：

            ```
            php artisan p:user:make
            ```

            接著前往 **管理 → 節點**，連接一台安裝了 [Wings](https://github.com/pterodactyl/wings) 的主機——Wings 是以 Go 撰寫的 Daemon，負責實際運行與管理遊戲伺服器容器。

            > **重要：** 設定完成後，請立即備份容器內 `/app/.env` 中的 `APP_KEY`。一旦遺失，所有加密資料（例如 API 金鑰）將無法還原。

            ## 此 Template 部署的服務

            | 服務 | 用途 |
            |---|---|
            | Pterodactyl Panel | 管理介面與 API |
            | MariaDB | 關聯式資料庫 |
            | Redis | 快取、Session 與工作佇列 |

            ## 相關連結

            - 官方網站：https://pterodactyl.io/
            - 官方文件：https://pterodactyl.io/panel/1.0/getting_started.html
            - GitHub（Panel）：https://github.com/pterodactyl/panel
            - GitHub（Wings）：https://github.com/pterodactyl/wings
