---
title: Deploy Open WebUI with AI on Blossom
url: "/deploy/open-webui/"
canonical_url: https://blossom88.com/deploy/open-webui/
markdown_url: https://blossom88.com/deploy/open-webui.md
summary: Deploy Open WebUI with AI on Blossom. Self-host private AI chat with your
  model API, managed data, and files in your R2 or S3 bucket.
categories:
- deployment
- ai
stack:
- Python
- FastAPI
- Svelte
- PostgreSQL
- Redis
---

# Deploy Open WebUI with AI on Blossom

[Open WebUI](https://openwebui.com/) gives your team a private chat interface
for AI models, with saved conversations and file uploads.

## Ask Your Agent

> **Ask your AI agent:** Deploy Open WebUI on Blossom for private chat with my model provider.
>
> Follow this guide: https://blossom88.com/deploy/open-webui/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and choose a Blossom Cloud Location when you log in. You can also use [Blossom BYOC (bring your own cloud)](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#blossom-byoc).

## Your Chat Setup

| Part | Purpose |
|---|---|
| Open WebUI | Chat interface on regular App Capacity |
| Managed PostgreSQL | Users, settings and conversations |
| Managed Redis | Coordination across Containers |
| Your private R2 or S3 bucket | Shared file uploads |

Bring a model API key and a private bucket in your own provider account.
Give your agent the credential-file path. Keep the bucket private and its
storage credential restricted to that bucket.

The dashboard uses Blossom Account access and an Open WebUI login. For
knowledge search across Containers, add a shared vector database too.

![Open WebUI showing a saved model response.](/deploy/assets/images/open-webui/chat.webp)

<details class="optional-reading" markdown="1">
<summary>Deployment setup and commands</summary>

### Prepare Your File Bucket

Use a bucket in your own Cloudflare R2 or Amazon S3 account:

1. [Create a private R2 bucket](https://developers.cloudflare.com/r2/buckets/create-buckets/),
   such as `my-openwebui-files`. Keep public access disabled.
2. Create an [Object Read and Write credential](https://developers.cloudflare.com/r2/api/tokens/)
   restricted to that bucket.
3. Save the bucket name, S3 endpoint, and credentials in a private environment
   file for your agent. Choose credentials that last for the deployment's
   lifetime, or arrange automatic renewal.

For Amazon S3, supply your private AWS bucket, region, and credentials.

Your agent selects compatible maintained releases and saves the chosen
versions in your deployment configuration.

Your agent keeps a stable `WEBUI_SECRET_KEY` across Containers and app
updates, and runs database migrations once before starting multiple replicas.
The first Open WebUI account is the administrator; add teammates through
its user management.

This guide focuses on API chat and file storage. For knowledge search across
replicas, have your agent add a shared vector database. Open WebUI's
[deployment documentation](https://docs.openwebui.com/getting-started/quick-start/)
and [scaling guide](https://docs.openwebui.com/getting-started/advanced-topics/scaling/)
cover image choices and additional services for document processing and voice.

### Commands behind the deployment

Your agent prepares the files using current CLI help and Open WebUI's
requirements. Use the resource IDs returned by Blossom in these examples.

### Create the App and Managed Data

    blossom profile:show
    blossom app:create --data '{"app":{"name":"open-webui"}}'

The agent writes environment.yml with your App ID and an official image
suited to your features and Location's architecture:

```yaml
environment:
  app_id: app-100
  name: production
  source_type: prebuilt_image
  prebuilt_image: <official image pinned by your agent>
  access_mode: members
```

It selects compatible database releases, sizes, storage, and backups in
database_instance.yml and cache_instance.yml.

    blossom environment:create --data environment.yml
    blossom database_instance:create --data database_instance.yml --follow
    blossom database:list --database_instance database_instance-100
    blossom cache_instance:create --data cache_instance.yml --follow
    blossom environment_link:create --data '{"environment_link":{"environment_id":"environment-100","target_type":"Database","target_id":"database-100","var_name":"DATABASE_URL"}}'
    blossom environment_link:create --data '{"environment_link":{"environment_id":"environment-100","target_type":"CacheInstance","target_id":"cache_instance-100","var_name":"REDIS_URL"}}'

### Connect the Model and File Bucket

The agent configures the model API, shared secret, Redis coordination, and
bucket connection in a private .env.production file. It checks the selected
release's settings before deploying. For R2, the storage settings include:

```dotenv
STORAGE_PROVIDER=s3
S3_BUCKET_NAME=my-openwebui-files
S3_ENDPOINT_URL=https://<account-id>.r2.cloudflarestorage.com
S3_REGION_NAME=auto
S3_ADDRESSING_STYLE=path
S3_ENABLE_TAGGING=false
S3_KEY_PREFIX=open-webui/
STORAGE_LOCAL_CACHE=false
AWS_ACCESS_KEY_ID=<bucket credential access key ID>
AWS_SECRET_ACCESS_KEY=<bucket credential secret access key>
```

The AWS variables use the storage SDK's default credential chain. Temporary
credentials also require `AWS_SESSION_TOKEN`; leave `S3_ACCESS_KEY_ID` and
`S3_SECRET_ACCESS_KEY` unset for that mode. For Amazon S3, use your AWS region
and omit the custom endpoint.

    blossom env_var:push --environment environment-100 --file .env.production

### Deploy and Scale the Web Service

The agent writes service.yml with the selected image's startup command,
port, health check, and resources. Shared data lets the web Service run
without an attached Volume. Initialize the database with one process, then
keep startup migrations disabled on the replicated web Service.

    blossom service:create --data service.yml
    blossom environment:deploy --id environment-100 --follow
    blossom environment:show --id environment-100

After initialization, set `ENABLE_DB_MIGRATIONS=false` in the private runtime
file. Push those settings and redeploy with the chosen replica count. For
example, to run two Containers:

    blossom env_var:push --environment environment-100 --file .env.production
    blossom service:update --id service-100 --data '{"service":{"desired_size":2}}'
    blossom environment:deploy --id environment-100 --follow

For image upgrades, run the new version's migrations once before starting
multiple replicas. Keep the shared secret and bucket connection stable.

</details>

## Start a Conversation

Select a model, send a message and upload a file. Reopen the conversation to
continue where you left off. PostgreSQL keeps chat history; the bucket keeps
uploaded files across Container replacement.

<details class="optional-reading" markdown="1">
<summary>Updates and shared storage</summary>

Keep `WEBUI_SECRET_KEY` and bucket settings stable. Run each image upgrade's
database migrations once before starting multiple web Containers. Check a
saved conversation and file from each Container after an update.

### Commands to inspect and update the App

    blossom service:show --id service-100
    blossom environment:deploy --id environment-100 --follow

</details>

## What You Get

- Private AI chat connected to your model API
- Web Containers you can scale on regular App Capacity
- Users and conversations in managed PostgreSQL, coordinated through Redis
- Uploaded files in your own private bucket across app updates
