---
title: Deploy Open WebUI
url: "/guides/open-webui/"
canonical_url: https://docs.blossom88.com/guides/open-webui/
markdown_url: https://docs.blossom88.com/guides/open-webui.md
summary: Deploy private AI chat with your model API, managed data, and files in your
  own R2 or S3 bucket.
categories:
- deployment
- ai
---

# Deploy Open WebUI

[Open WebUI](https://openwebui.com/) is a self-hosted chat interface for AI
models, including models you connect through an API. It gives your team a
shared place to chat and revisit saved conversations.

Run a private chat interface on Blossom with saved conversations and files
that stay available when the app updates or you add Containers.

[Install the Blossom CLI and skill](/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)](/learn/getting-started/choose-your-cloud/#blossom-byoc).
Have your model provider's API key and a private file bucket ready.

## 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.

## Ask Your Agent


> **Ask your AI agent:** Set up private AI chat on Blossom with Open WebUI. Use my model API and R2
> bucket for uploads.

> Follow this guide: https://docs.blossom88.com/guides/open-webui/



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

| Part | Purpose |
|---|---|
| Open WebUI Containers | Run the chat interface on regular App Capacity |
| Managed PostgreSQL | Keeps users, settings, and conversations |
| Managed Redis | Coordinates live updates across Containers |
| Your private R2 or S3 bucket | Keeps uploaded files accessible across Containers |
| Your model API | Runs model inference |
| Private HTTPS access | Account membership followed by your Open WebUI login |

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.

<details class="optional-reading" markdown="1">
<summary>Commands behind the deployment</summary>

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>

## Send a Chat and Keep It Across Updates


> **Ask your AI agent:** Help me test a chat and file upload, then check they survive a redeploy.

> Follow this guide: https://docs.blossom88.com/guides/open-webui/



Select a model, send a chat, and upload a test file. After the update, reopen
the conversation and download the file. When running multiple Containers,
check that each can read the same saved chat and file.

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

<details class="optional-reading" markdown="1">
<summary>Commands to inspect and update the App</summary>

    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
