[GH-ISSUE #10069] S3 Support-Cloudflare R2: InvalidRegionError with S3_REGION_NAME='auto' #86494

Closed
opened 2026-05-15 10:51:50 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @JoeChen2me on GitHub (Feb 15, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/10069

Bug Report

Important Notes

  • Before submitting a bug report: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project.

  • Collaborate respectfully: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours.

  • Contributing: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI.

  • Bug reproducibility: If a bug cannot be reproduced with a :main or :dev Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help!

Note: Please remove the notes above when submitting your post. Thank you for your understanding and support!


Installation Method

Docker, using docker-compose.yml as provided in the official repository.

Environment

  • Open WebUI Version: v0.5.12 (Latest Docker image as of report creation)

  • Ollama (if applicable): Not used

  • Operating System: Ubuntu 22.04

  • Browser (if applicable): Edge (This is a backend/container startup issue)

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of Open WebUI Docker image (v0.5.12).
  • I am on the latest version of Ollama. (Not applicable, Ollama is not used)
  • I have included the browser console logs. (Not applicable in this case)
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

When I uncomment the S3 storage configuration in docker-compose.yml, and provide valid Cloudflare R2 credentials and endpoint, the Open WebUI Docker container should start successfully and be configured to use Cloudflare R2 for storage.

Actual Behavior:

The Open WebUI Docker container fails to start and exits with an error. The logs show a botocore.exceptions.InvalidRegionError indicating an issue with the S3 region name. Specifically, it states: botocore.exceptions.InvalidRegionError: Provided region_name '"auto"' doesn't match a supported format.

Description

Bug Summary:
Open WebUI Docker container fails to start when S3 storage is enabled and S3_REGION_NAME is set to "auto" for Cloudflare R2, resulting in an InvalidRegionError. This seems to be due to boto3 (AWS SDK) not recognizing "auto" as a valid region name for Cloudflare R2.

Reproduction Details

Steps to Reproduce:

  1. Start with a fresh installation of Open WebUI using Docker Compose as per the official documentation.
  2. Open the docker-compose.yml file.
  3. Uncomment the following lines in the webui service's environment section:
          - STORAGE_PROVIDER='S3'  # 存储提供商设置为 S3
          - S3_ACCESS_KEY_ID="MY_ACCESS_KEY_ID" # 
          - S3_SECRET_ACCESS_KEY="MY_SECRET_ACCESS_KEY" 
          - S3_ENDPOINT_URL="https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com"  # 
          - S3_BUCKET_NAME="openwebui"  # S3 存储桶名称
          - S3_REGION_NAME="auto"  # S3 区域名称设置为自动
    
  4. Run docker-compose up -d in the directory containing docker-compose.yml.
  5. Observe the Docker container logs (using docker-compose logs webui) and see the error.

Logs and Screenshots

Browser Console Logs:
N/A - Backend container startup issue

Docker Container Logs:

  File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
    ... (rest of the traceback as provided before) ...
botocore.exceptions.InvalidRegionError: Provided region_name '"auto"' doesn't match a supported format.

Screenshots/Screen Recordings (if applicable):
N/A - Text-based error log is sufficient.

Additional Information

  • This issue occurs on Ubuntu 22.04 when attempting to use Cloudflare R2 as the S3 storage provider for Open WebUI (v0.5.12).
  • Cloudflare R2 is S3-compatible and generally doesn't require a specific region to be defined, especially when endpoint_url is provided.
  • The error indicates that the boto3 library used by Open WebUI for S3 interaction is not accepting "auto" as a valid region name.
Originally created by @JoeChen2me on GitHub (Feb 15, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/10069 # Bug Report ## Important Notes - **Before submitting a bug report**: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project. - **Collaborate respectfully**: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours. - **Contributing**: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI. - **Bug reproducibility**: If a bug cannot be reproduced with a `:main` or `:dev` Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help! Note: Please remove the notes above when submitting your post. Thank you for your understanding and support! --- ## Installation Method Docker, using `docker-compose.yml` as provided in the official repository. ## Environment - **Open WebUI Version:** v0.5.12 (Latest Docker image as of report creation) - **Ollama (if applicable):** Not used - **Operating System:** Ubuntu 22.04 - **Browser (if applicable):** Edge (This is a backend/container startup issue) **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of Open WebUI Docker image (v0.5.12). - [ ] I am on the latest version of Ollama. (Not applicable, Ollama is not used) - [ ] I have included the browser console logs. (Not applicable in this case) - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: When I uncomment the S3 storage configuration in `docker-compose.yml`, and provide valid Cloudflare R2 credentials and endpoint, the Open WebUI Docker container should start successfully and be configured to use Cloudflare R2 for storage. ## Actual Behavior: The Open WebUI Docker container fails to start and exits with an error. The logs show a `botocore.exceptions.InvalidRegionError` indicating an issue with the S3 region name. Specifically, it states: `botocore.exceptions.InvalidRegionError: Provided region_name '"auto"' doesn't match a supported format.` ## Description **Bug Summary:** Open WebUI Docker container fails to start when S3 storage is enabled and `S3_REGION_NAME` is set to `"auto"` for Cloudflare R2, resulting in an `InvalidRegionError`. This seems to be due to `boto3` (AWS SDK) not recognizing `"auto"` as a valid region name for Cloudflare R2. ## Reproduction Details **Steps to Reproduce:** 1. Start with a fresh installation of Open WebUI using Docker Compose as per the official documentation. 2. Open the `docker-compose.yml` file. 3. Uncomment the following lines in the `webui` service's `environment` section: ```yaml - STORAGE_PROVIDER='S3' # 存储提供商设置为 S3 - S3_ACCESS_KEY_ID="MY_ACCESS_KEY_ID" # - S3_SECRET_ACCESS_KEY="MY_SECRET_ACCESS_KEY" - S3_ENDPOINT_URL="https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com" # - S3_BUCKET_NAME="openwebui" # S3 存储桶名称 - S3_REGION_NAME="auto" # S3 区域名称设置为自动 ``` 4. Run `docker-compose up -d` in the directory containing `docker-compose.yml`. 5. Observe the Docker container logs (using `docker-compose logs webui`) and see the error. ## Logs and Screenshots **Browser Console Logs:** N/A - Backend container startup issue **Docker Container Logs:** ``` File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ... (rest of the traceback as provided before) ... botocore.exceptions.InvalidRegionError: Provided region_name '"auto"' doesn't match a supported format. ``` **Screenshots/Screen Recordings (if applicable):** N/A - Text-based error log is sufficient. ## Additional Information - This issue occurs on Ubuntu 22.04 when attempting to use Cloudflare R2 as the S3 storage provider for Open WebUI (v0.5.12). - Cloudflare R2 is S3-compatible and generally doesn't require a specific region to be defined, especially when `endpoint_url` is provided. - The error indicates that the `boto3` library used by Open WebUI for S3 interaction is not accepting `"auto"` as a valid region name.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#86494