# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Neko
spec:
    description: |
        Neko is a self-hosted virtual browser that runs in Docker and uses WebRTC.
        Collaborative watch parties, remote support, throwaway browsing, and jump-host access —
        stream a real browser to anyone with near real-time latency.
    coverImage: https://neko.m1k1o.net/img/intro.gif
    icon: https://raw.githubusercontent.com/m1k1o/neko/master/docs/static/img/neko-logo.svg
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: Public domain for the Neko web UI (HTTPS via Zeabur)
        - key: NEKO_USER_PASSWORD
          type: STRING
          name: User password
          description: Password for normal room members (default neko)
        - key: NEKO_ADMIN_PASSWORD
          type: STRING
          name: Admin password
          description: Password for room admin (default admin)
    tags:
        - Tool
        - Browser
        - WebRTC
        - Collaboration
    readme: "# Neko (n.eko)\n\nOfficial project: [neko.m1k1o.net](https://neko.m1k1o.net/) · [GitHub m1k1o/neko](https://github.com/m1k1o/neko)\n\nSelf-hosted virtual browser over WebRTC. Use cases:\n\n- Watch parties / co-browsing\n- Remote support & teaching\n- Throwaway / isolated browsing\n- Jump host for internal tools (session stays on server)\n\n## After deploy\n\n1. Open `https://<your-domain>`\n2. Login with the **user** or **admin** password you set\n3. Share the link with teammates for collaborative control\n\n## Default credentials (if you left variables empty)\n\n| Role  | Password |\n|-------|----------|\n| User  | `neko`   |\n| Admin | `admin`  |\n\n**Change passwords immediately** on public domains.\n\n## WebRTC note\n\nNeko needs WebRTC media paths (UDP/TCP mux). This template enables:\n\n- `NEKO_WEBRTC_ICELITE=true` (public IP servers)\n- `NEKO_WEBRTC_UDPMUX` / `TCPMUX` on port `52000`\n- Public STUN (`stun.l.google.com:19302`)\n\nIf video freezes behind strict NAT, expose UDP/TCP **52000** on the host firewall\nor attach a TURN server (see [WebRTC docs](https://neko.m1k1o.net/docs/v3/configuration/webrtc)).\n\n## Resource recommendation\n\n- **Min**: 2 vCPU / 2 GB RAM  \n- **Comfortable**: 2–4 vCPU / 4 GB RAM (Firefox + desktop)\n\n## Image\n\n`ghcr.io/m1k1o/neko/firefox:latest` — other browsers: chromium, google-chrome (see upstream docs).\n\n## License\n\nApache-2.0 — upstream project, not affiliated with any crypto token scams.\n"
    services:
        - name: neko
          icon: https://raw.githubusercontent.com/m1k1o/neko/master/docs/static/img/neko-logo.svg
          template: PREBUILT_V2
          spec:
            id: neko
            source:
                image: ghcr.io/m1k1o/neko/chromium:latest
            ports:
                - id: web
                  port: 8080
                  type: HTTP
                - id: webrtc
                  port: 52000
                  type: TCP
            instructions:
                - title: Neko URL
                  content: https://${ZEABUR_WEB_DOMAIN}
                - title: User password
                  content: ${NEKO_USER_PASSWORD}
                - title: Admin password
                  content: ${NEKO_ADMIN_PASSWORD}
            env:
                NEKO_DESKTOP_SCREEN:
                    default: 1920x1080@30
                NEKO_MEMBER_MULTIUSER_ADMIN_PASSWORD:
                    default: ${NEKO_ADMIN_PASSWORD}
                NEKO_MEMBER_MULTIUSER_USER_PASSWORD:
                    default: ${NEKO_USER_PASSWORD}
                NEKO_WEBRTC_ICELITE:
                    default: "true"
                NEKO_WEBRTC_ICESERVERS_FRONTEND:
                    default: '[{"urls":["stun:stun.l.google.com:19302"]}]'
                NEKO_WEBRTC_ICETRICKLE:
                    default: "true"
                NEKO_WEBRTC_IP_RETRIEVAL_URL:
                    default: https://checkip.amazonaws.com
                NEKO_WEBRTC_TCPMUX:
                    default: "52000"
                NEKO_WEBRTC_UDPMUX:
                    default: "52000"
            healthCheck:
                type: HTTP
                port: web
                http:
                    path: /
          domainKey: PUBLIC_DOMAIN
localization:
    zh-CN:
        description: |
            Neko 是自托管虚拟浏览器（Docker + WebRTC）。支持一起看片、协同浏览、远程协助、一次性隔离浏览等场景。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 域名
              description: 访问 Neko 网页端的公网域名（Zeabur 自动 HTTPS）
            - key: NEKO_USER_PASSWORD
              type: STRING
              name: 普通用户密码
              description: 房间普通成员密码（默认 neko）
            - key: NEKO_ADMIN_PASSWORD
              type: STRING
              name: 管理员密码
              description: 房间管理员密码（默认 admin）
        readme: |
            # Neko 虚拟浏览器

            官网：[neko.m1k1o.net](https://neko.m1k1o.net/) · GitHub：[m1k1o/neko](https://github.com/m1k1o/neko)

            ## 部署后

            1. 打开 `https://你的域名`
            2. 使用部署时设置的用户 / 管理员密码登录
            3. 分享链接给队友即可协同控制

            ## 默认密码

            - 用户：`neko`
            - 管理员：`admin`

            公网部署后请立刻修改。

            ## WebRTC 说明

            若画面卡住，请放行主机防火墙 **TCP/UDP 52000**，或配置 TURN。详见上游 WebRTC 文档。

            ## 资源建议

            最低 2C/2G，推荐 2–4C / 4G 内存。
