# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Open WebUI
spec:
    description: An extensible, feature-rich, and user-friendly self-hosted LLM WebUI
    icon: https://docs.openwebui.com/sponsors/sponsor.png
    variables:
        - key: WEBUI_DOMAIN
          type: DOMAIN
          name: WebUI URL
          description: What is the URL of the WebUI you want to access to?
    tags:
        - Website
        - ChatGPT
    readme: |
        # Open WebUI

        Open WebUI is an [extensible](https://github.com/open-webui/pipelines), feature-rich, and user-friendly self-hosted WebUI designed to operate entirely offline. It supports various LLM runners, including Ollama and OpenAI-compatible APIs. For more information, be sure to check out our [Open WebUI Documentation](https://docs.openwebui.com).

        ## Deployment

        This Open WebUI's OpenAI capability is somewhat broken. Use at your own risk. It is better to use another UI if you need to use GPT models.

        Note that Zeabur services do not contain a GPU. To use the Ollama mode, you should run Ollama on another GPU-equipped server, and set `OLLAMA_BASE_URL` to your Ollama server. [Check the "If Ollama is on a Different Server" section for details](https://docs.openwebui.com/getting-started/#installation-with-default-configuration).

        For other settings, check the full configurable options here: <https://docs.openwebui.com/getting-started/env-configuration>.
    services:
        - name: open-webui
          icon: https://docs.openwebui.com/sponsors/sponsor.png
          template: PREBUILT
          spec:
            id: open-webui
            source:
                image: ghcr.io/open-webui/open-webui:main
            ports:
                - id: web
                  port: 8080
                  type: HTTP
            volumes:
                - id: data
                  dir: /app/backend/data
            env:
                ENABLE_OLLAMA_API:
                    default: "false"
                OPENAI_API_BASE_URL:
                    default: http://pipeline.zeabur.internal:9099
                OPENAI_API_KEY:
                    default: 0p3n-w3bu!
          domainKey: WEBUI_DOMAIN
        - name: pipeline
          icon: https://docs.openwebui.com/sponsors/sponsor.png
          template: PREBUILT
          spec:
            id: pipeline
            source:
                image: ghcr.io/open-webui/pipelines:main
            ports:
                - id: api
                  port: 9099
                  type: HTTP
            volumes:
                - id: data
                  dir: /app/pipelines
