From 4816a1d4d247967e6d3ffb0eae0d68d070b6458e Mon Sep 17 00:00:00 2001 From: Matthew Hand Date: Wed, 6 Nov 2024 20:01:43 +0000 Subject: [PATCH 1/4] fix: config SITE_URL and BASE_URL --- .github/workflows/gh-pages.yml | 3 +++ docusaurus.config.ts | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 2a97016..868b89b 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -36,6 +36,9 @@ jobs: - name: Install dependencies run: npm ci - name: Build + env: + BASE_URL: ${{ vars.BASE_URL }} + SITE_URL: ${{ vars.SITE_URL }} run: npm run build - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/docusaurus.config.ts b/docusaurus.config.ts index ad581fe..8c6a12d 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -8,11 +8,8 @@ const config: Config = { tagline: "ChatGPT-Style WebUI for LLMs (Formerly Ollama WebUI)", favicon: "img/favicon.png", - // Set the production url of your site here - url: "https://openwebui.com", - // Set the // pathname under which your site is served - // For GitHub pages deployment, it is often '//' - baseUrl: "/", + url: process.env.SITE_URL || "https://openwebui.com", + baseUrl: process.env.BASE_URL || "/", // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. From 2dda9752216c800af04a7d0b9b86d19ae2122102 Mon Sep 17 00:00:00 2001 From: Matthew Hand Date: Wed, 6 Nov 2024 20:05:53 +0000 Subject: [PATCH 2/4] docs: reorder gh-pages sequence --- docs/tutorials/tips/contributing-tutorial.md | 25 ++++++++++---------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/tutorials/tips/contributing-tutorial.md b/docs/tutorials/tips/contributing-tutorial.md index 4ea2432..6c3e200 100644 --- a/docs/tutorials/tips/contributing-tutorial.md +++ b/docs/tutorials/tips/contributing-tutorial.md @@ -18,7 +18,19 @@ We appreciate your interest in contributing tutorials to the Open WebUI document - Navigate to the [Open WebUI Docs Repository](https://github.com/open-webui/docs) on GitHub. - Click the **Fork** button at the top-right corner to create a copy under your GitHub account. -2. **Configure GitHub Environment Variables** +2. **Enable GitHub Actions** + + - In your forked repository, navigate to the **Actions** tab. + - If prompted, enable GitHub Actions by following the on-screen instructions. + +3. **Enable GitHub Pages** + + - Go to **Settings** > **Pages** in your forked repository. + - Under **Source**, select the branch you want to deploy (e.g., `main`) and the folder (e.g.,`/docs`). + - Click **Save** to enable GitHub Pages. + + +4. **Configure GitHub Environment Variables** - In your forked repository, go to **Settings** > **Secrets and variables** > **Actions** > **Variables**. - Add the following environment variables: @@ -53,17 +65,6 @@ b. **Modify `docusaurus.config.ts` to Use Environment Variables** ``` - This setup ensures consistent deployment behavior for forks and custom setups. -3. **Enable GitHub Actions** - - - In your forked repository, navigate to the **Actions** tab. - - If prompted, enable GitHub Actions by following the on-screen instructions. - -4. **Enable GitHub Pages** - - - Go to **Settings** > **Pages** in your forked repository. - - Under **Source**, select the branch you want to deploy (e.g., `main`) and the folder (e.g.,`/docs`). - - Click **Save** to enable GitHub Pages. - 5. **Run the `gh-pages` GitHub Workflow** - In the **Actions** tab, locate the `gh-pages` workflow. From 09fbf334a3c4c4e3435028031bbe530c6de053bd Mon Sep 17 00:00:00 2001 From: Matthew Hand Date: Thu, 7 Nov 2024 20:37:11 +0000 Subject: [PATCH 3/4] docs: update ManualDocker.md with detailed Docker setup and configurations - Added instructions for persistent data storage, port mapping, and GPU support - Included notes on user roles, privacy, and single-user mode configuration - Expanded Docker command examples for various setups (local, GPU, Ollama connection) --- .../quick-start/tab-docker/ManualDocker.md | 89 +++++++++++++++++-- 1 file changed, 84 insertions(+), 5 deletions(-) diff --git a/docs/getting-started/quick-start/tab-docker/ManualDocker.md b/docs/getting-started/quick-start/tab-docker/ManualDocker.md index 9454a23..ce6c1a4 100644 --- a/docs/getting-started/quick-start/tab-docker/ManualDocker.md +++ b/docs/getting-started/quick-start/tab-docker/ManualDocker.md @@ -1,12 +1,91 @@ -# Docker Setup +# Manual Docker Setup + +If you prefer to set up Docker manually, follow these steps for Open WebUI. + +## Step 1: Pull the Open WebUI Image + +Start by pulling the latest Open WebUI Docker image from the GitHub Container Registry. + +```bash +docker pull ghcr.io/open-webui/open-webui:main +``` + +## Step 2: Run the Container + +Run the container with default settings. This command includes a volume mapping to ensure persistent data storage. + ```bash docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main ``` -**Note:** For Nvidia GPU support, add `--gpus all`. You can also use the `:cuda` tag for CUDA or `:ollama` for the bundled Ollama variant. -For the latest bleeding-edge features, with potential bugs or occasional instability, use the `:dev` tag: +### Important Flags +- **Volume Mapping (`-v open-webui:/app/backend/data`)**: Ensures persistent storage of your data. This prevents data loss between container restarts. +- **Port Mapping (`-p 3000:8080`)**: Exposes the WebUI on port 3000 of your local machine. + +### Using GPU Support +For Nvidia GPU support, add `--gpus all` to the `docker run` command: + ```bash -docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:dev +docker run -d -p 3000:8080 --gpus all -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:cuda ``` -Access Open WebUI at: [http://localhost:3000](http://localhost:3000) \ No newline at end of file +## User Roles and Privacy + +:::info **Important Note on User Roles and Privacy:** + +- **Admin Creation**: The first account created on Open WebUI will have **Administrator privileges**, managing user access and system settings. +- **User Registrations**: Additional accounts start with a **Pending** status, requiring Administrator approval for access. +- **Data Security**: **All your data** is stored locally on your device, ensuring **privacy** and **no external requests**. Open WebUI does not transmit data externally by default. + +::: + +## Single-User Mode (Disabling Login) + +To bypass the login page for a single-user setup, set the `WEBUI_AUTH` environment variable to `False`: + +```bash +docker run -d -p 3000:8080 -e WEBUI_AUTH=False -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main +``` + +:::warning +You cannot switch between single-user mode and multi-account mode after this change. +::: + +## Quick Start with Docker 🐳 + +### Essential Docker Command Options + +For Docker installation, consider the following options: + +- **Persistent Storage**: Use the `-v open-webui:/app/backend/data` option to ensure all application data remains available across sessions. +- **Exposing Ports**: Use the `-p` flag to map internal container ports to your system. + +For example, if you're installing Open WebUI with data persistence and local-only port exposure, the command would be: + +```bash +docker run -d -p 127.0.0.1:3000:8080 -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main +``` + +### Advanced Configuration: Connecting to Ollama on a Different Server + +To connect Open WebUI to an Ollama server located on another host, add the `OLLAMA_BASE_URL` environment variable: + +```bash +docker run -d -p 3000:8080 -e OLLAMA_BASE_URL=https://example.com -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main +``` + +### GPU Support with Nvidia + +For running Open WebUI with Nvidia GPU support, use: + +```bash +docker run -d -p 3000:8080 --gpus all -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:cuda +``` + +## Access the WebUI + +After the container is running, access Open WebUI at: + +[http://localhost:3000](http://localhost:3000) + +For detailed help on each Docker flag, see [Docker's documentation](https://docs.docker.com/engine/reference/commandline/run/). From 10a50bc5c135863d3a23fb7f750624191613420c Mon Sep 17 00:00:00 2001 From: Matthew Hand Date: Thu, 7 Nov 2024 20:51:46 +0000 Subject: [PATCH 4/4] chore: reset gh-pages.yml and docusaurus.config.ts to match upstream main --- .github/workflows/gh-pages.yml | 3 --- docusaurus.config.ts | 7 +++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 868b89b..2a97016 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -36,9 +36,6 @@ jobs: - name: Install dependencies run: npm ci - name: Build - env: - BASE_URL: ${{ vars.BASE_URL }} - SITE_URL: ${{ vars.SITE_URL }} run: npm run build - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 8c6a12d..ad581fe 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -8,8 +8,11 @@ const config: Config = { tagline: "ChatGPT-Style WebUI for LLMs (Formerly Ollama WebUI)", favicon: "img/favicon.png", - url: process.env.SITE_URL || "https://openwebui.com", - baseUrl: process.env.BASE_URL || "/", + // Set the production url of your site here + url: "https://openwebui.com", + // Set the // pathname under which your site is served + // For GitHub pages deployment, it is often '//' + baseUrl: "/", // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these.