# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Chibisafe
spec:
    description: |
        Chibisafe is a blazing fast, self-hosted file vault. Upload files and share them via short links. Supports public, user-account, or invite-only modes. Built with TypeScript, with an embedded database — no external dependencies.
    coverImage: https://chibisafe.moe/xjoghu.png
    icon: https://chibisafe.moe/xjoghu.png
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: The domain to access Chibisafe
    tags:
        - Tool
        - Files
    readme: |
        # Chibisafe

        A blazing fast, self-hosted file upload and sharing service. Upload files and generate shareable links instantly. No external database required.

        ## What You Can Do After Deployment

        Visit your domain to access Chibisafe. Create an admin account on first visit, then start uploading files.

        **File uploads:** Upload any file type with drag & drop or file picker. Generates short shareable links automatically.

        **Albums:** Organize uploads into albums (galleries). Share entire albums with a single link.

        **User management:** Run as public (anyone can upload), user accounts (registration required), or invite-only. Admin panel for managing users and files.

        **Snippets:** Create and share text snippets with syntax highlighting.

        **API:** Full REST API for programmatic uploads. Compatible with ShareX, Flameshot, and other screenshot tools.

        ## Configuration

        - Default admin account is created on first visit
        - **Access modes:** Configure public, user-account, or invite-only in the admin panel
        - **File size limits:** Configurable via admin panel
        - **Storage:** All files stored in `/app/uploads` volume

        ## License

        MIT — [GitHub](https://github.com/chibisafe/chibisafe)
    services:
        - name: chibisafe_server
          icon: https://chibisafe.moe/xjoghu.png
          template: PREBUILT_V2
          spec:
            source:
                image: chibisafe/chibisafe-server:latest
            ports:
                - id: server
                  port: 8001
                  type: HTTP
            volumes:
                - id: database
                  dir: /app/database
                - id: uploads
                  dir: /app/uploads
                - id: logs
                  dir: /app/logs
        - name: chibisafe
          icon: https://chibisafe.moe/xjoghu.png
          template: PREBUILT_V2
          spec:
            source:
                image: chibisafe/chibisafe:latest
            ports:
                - id: web
                  port: 8000
                  type: HTTP
            env:
                BASE_API_URL:
                    default: http://chibisafe_server:8000
                    expose: true
            healthCheck:
                type: HTTP
                port: web
                http:
                    path: /
        - name: caddy
          icon: https://cdn.zeabur.com/caddy.png
          template: PREBUILT
          spec:
            source:
                image: caddy:2-alpine
            ports:
                - id: web
                  port: 80
                  type: HTTP
            configs:
                - path: /etc/caddy/Caddyfile
                  template: |
                    {
                        servers {
                            trusted_proxies static private_ranges
                            client_ip_headers X-Forwarded-For X-Real-IP
                        }
                    }
                    :80 {
                        route {
                            file_server * {
                                    root /app/uploads
                                    pass_thru
                            }

                            @api path /api/*
                            reverse_proxy @api http://chibisafe-server.zeabur.internal:8000 {
                                    header_up Host {http.reverse_proxy.upstream.hostport}
                                    header_up X-Real-IP {http.request.header.X-Real-IP}
                            }

                            @docs path /docs*
                            reverse_proxy @docs http://chibisafe-server.zeabur.internal:8000 {
                                    header_up Host {http.reverse_proxy.upstream.hostport}
                                    header_up X-Real-IP {http.request.header.X-Real-IP}
                            }

                            reverse_proxy http://chibisafe.zeabur.internal:8001 {
                                    header_up Host {http.reverse_proxy.upstream.hostport}
                                    header_up X-Real-IP {http.request.header.X-Real-IP}
                            }
                        }
                    }
                  permission: null
                  envsubst: null
          domainKey: PUBLIC_DOMAIN
localization:
    es-ES:
        description: |
            Chibisafe and almacén de archivos autoalojado ultrarrápido. Sube archivos and compártelos median enlaces cortos. Soporta modos público, con cuenta o por invitación.
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: Dominio
              description: El dominio para acceder a Chibisafe
        readme: |
            # Chibisafe

            Servicio de subida y compartición de archivos autoalojado ultrarrápido. Sin base de datos externa.

            ## Qué puedes hacer después del despliegue

            Visita tu dominio. Crea una cuenta de administrator en la primera visita y comienza a subir archivos.

            **Subidas:** Arrastra y suelta cualquier tipo de archivo. Genera enlaces cortos automáticamente.

            **Álbumes:** Organiza archivos en álbumes. Comparte álbumes completos con un solo enlace.

            **Gestión de usuarios:** Configura como público, con registro o solo por invitación.

            **API:** API REST completa.

            ## Licencia

            MIT — [GitHub](https://github.com/chibisafe/chibisafe)
    id-ID:
        description: |
            Chibisafe adalah vault file self-hosted yang sangat cepat. Unggah file dan bagikan melalui tautan pendek. Mendukung mode publik, akun, atau undangan. Tanpa dependensi eksternal.
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: Domain
              description: Domain untuk mengakses Chibisafe
        readme: |
            # Chibisafe

            Layanan unggah dan berbagi file self-hosted yang sangat cepat. Tanpa database eksternal.

            ## Apa yang bisa dilakukan setelah deploy

            Buka domain Anda. Buat akun admin pada kunjungan pertama dan mulai mengunggah file.

            **Unggah:** Drag and drop semua jenis file. Tautan pendek dibuat otomatis.

            **Album:** Organisir file ke dalam album. Bagikan seluruh album dengan satu tautan.

            **Manajemen pengguna:** Konfigurasi sebagai publik, akun, atau hanya undangan.

            **API:** REST API lengkap. Kompatibel dengan ShareX dan alat tangkapan layar lainnya.

            ## Lisensi

            MIT — [GitHub](https://github.com/chibisafe/chibisafe)
    ja-JP:
        description: |
            Chibisafe is a super high-speed storage facility.ファイルをアップロードし and short いリンクで share できます.パブリック, アカウント system, hospitality system に対応. No external parts are required.
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: ドメイン
              description: Chibisafeにアクセスするためのドメイン
        readme: |
            # Chibisafe

            Super high speed のセルフホスト type ファイルアップロード・Shared サービス. No external parts are required.

            ## デプロイ后にできること

            The use of ドメインにアクセスして starts. When I first returned to Akasu, I started with the managers Akakosuzu and Fukuda.

            **アップロード：**ドラッグ&ドロップでarbitraryのファイルをアップロード. A total of リンクを is automatically generated.

            **アルバム：** Organized by アップロードをアルバムに. All 1つのリンクでアルバム may be shared.

            **Function Management:** It is possible to choose between the パブリック, Akakono System, and Hospitality System.

            **API:** フルREST API. ShareX and other exchanges.

            ## ライセンス

            MIT — [GitHub](https://github.com/chibisafe/chibisafe)
    ko-KR:
        description: |
            Chibisafe는초고속셀프호스팅파일보관소입니다. 공개, 계정또는초대모드를지원합니다. 외부데이터베이스불필요.
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: 도메인
              description: Chibisafe에접속할도메인
        readme: |
            # Chibisafe

            초고속셀프호스팅파일업로드및공유서비스.

            ## 배포후할수있는것

            첫방문시관리자계정을생성하고파일업로드를시작하세요.

            **업로드:** 드래그앤드롭으로모든파일업로드. 공유링크자동생성.

            **앨범:** 업로드를앨범으로정리. 하나의링크로전체앨범공유가능.

            **사용자관리:** 공개, 계정제, 초대제중선택가능.

            **API:** 풀REST API. ShareX 등스크린샷도구와호환.

            ## 라이선스

            MIT — [GitHub](https://github.com/chibisafe/chibisafe)
    th-TH:
        description: |
            Chibisafe คือ vault ไฟล์แบบ self-hosted ที่เร็วมาก อัปโหลดไฟล์และแชร์ผ่านลิงก์สั้น รองรับโหมดสาธารณะ บัญชีผู้ใช้ หรือเชิญเท่านั้น ไม่ต้องพึ่งพาภายนอก
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: โดเมน
              description: โดเมนสำหรับเข้าถึง Chibisafe
        readme: |
            # Chibisafe

            self-hosted ที่เร็วมาก ไม่ต้องใช้ฐานข้อมูลภายนอก

            ## สิ่งที่ทำได้หลังจากติดตั้ง

            เข้าสู่โดเมน สร้างบัญชีแอดมินเมื่อเข้าครั้งแรก แล้วเริ่มอัปโหลดไฟล์

            **อัปโหลด:** ลากและวางไฟล์ทุกประเภท สร้างลิงก์สั้นอัตโนมัติ

            **อัลบั้ม:** จัดระเบียบไฟล์เป็นอัลบั้ม แชร์ทั้งอัลบั้มด้วยลิงก์เดียว

            **จัดการผู้ใช้:** ตั้งค่าเป็นสาธารณะ ต้องลงทะเบียน หรือเชิญเท่านั้น

            **API:** REST API เต็มรูปแบบ ใช้ร่วมกับ ShareX และเครื่องมือจับภาพหน้าจอ

            ## สัญญาอนุญาต

            MIT — [GitHub](https://github.com/chibisafe/chibisafe)
    zh-CN:
        description: |
            Chibisafe is a fast, self-hosted file safe. Upload files and share them via shortened links. Supports public, account, or invitation-only modes. Uses an embedded database, requiring no external dependencies.
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: domain name
              description: ""
        readme: |
            # Chibisafe

            A fast, self-hosted file upload and sharing service. Uploaded files automatically generate short, shareable links. No external database required.

            ## What can be done after deployment?

            Simply open the domain to use it. On your first visit, create an administrator account and then begin uploading files.

            **File Upload:** Supports drag-and-drop upload of any file type, automatically generating short links.

            **Albums:** Organize uploaded files into albums, which can be shared using a single link.

            **User Management:** Can be set to public, require account registration, or be by invitation only.

            **API:** A complete REST API, compatible with screenshot tools such as ShareX.

            ## Authorization

            MIT — [GitHub](https://github.com/chibisafe/chibisafe)
    zh-TW:
        description: |
            Chibisafe is a fast, self-hosted file vault. Upload files and share them via short links. Supports public, account, or invitation-only modes. Uses an embedded database, requiring no external dependencies.
        variables:
            - key: PUBLIC_DOMAIN
              type: STRING
              name: domain
              description: ""
        readme: |
            # Chibisafe

            A fast, self-hosted file upload and sharing service. Uploaded files automatically generate short, shareable links. No external databases are required.

            ## What can be done after deployment?

            Once the domain is open, it can be used. On first visit, create an administrator account and then start uploading files.

            **File Upload:** Supports drag-and-drop upload of any file type, automatically generating short links.

            **Albums:** Organize uploaded files into albums, which can be shared using a single link.

            **User Management:** Users can be set to public, require account registration, or be by invitation only. The administrator panel manages users and files.

            **API:** A complete REST API, compatible with screenshot tools such as ShareX.

            ## Authorization

            MIT — [GitHub](https://github.com/chibisafe/chibisafe)
