doc: intro update

This commit is contained in:
Timothy J. Baek
2024-02-19 21:23:48 -08:00
parent 4bac7145f2
commit 25eb3e3341
2 changed files with 602 additions and 38 deletions

View File

@@ -1,48 +1,57 @@
---
sidebar_position: 0
slug: /
sidebar_position: 1
title: 🏡 Home
hide_title: true
---
# Tutorial Intro
# Open WebUI
Let's discover **Docusaurus in less than 5 minutes**.
**Open WebUI is ChatGPT-Style WebUI for various LLM runners**, supported LLM runners include Ollama and OpenAI-compatible APIs.
## Getting Started
![GitHub stars](https://img.shields.io/github/stars/open-webui/open-webui?style=social)
![GitHub forks](https://img.shields.io/github/forks/open-webui/open-webui?style=social)
![GitHub watchers](https://img.shields.io/github/watchers/open-webui/open-webui?style=social)
![GitHub repo size](https://img.shields.io/github/repo-size/open-webui/open-webui)
![GitHub language count](https://img.shields.io/github/languages/count/open-webui/open-webui)
![GitHub top language](https://img.shields.io/github/languages/top/open-webui/open-webui)
![GitHub last commit](https://img.shields.io/github/last-commit/open-webui/open-webui?color=red)
![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Follama-webui%2Follama-wbui&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)
[![Discord](https://img.shields.io/badge/Discord-Open_WebUI-blue?logo=discord&logoColor=white)](https://discord.gg/5rJgQTnV4s)
[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/tjbck)
Get started by **creating a new site**.
#### Installing with Docker 🐳
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
- **Important:** When using Docker to install Open WebUI, make sure to include the `-v open-webui:/app/backend/data` in your Docker command. This step is crucial as it ensures your database is properly mounted and prevents any loss of data.
### What you'll need
- **If Ollama is on your computer**, use this command:
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
```bash
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
```
## Generate a new site
- **To build the container yourself**, follow these steps:
Generate a new Docusaurus site using the **classic template**.
```bash
docker build -t open-webui .
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always open-webui
```
The classic template will automatically be added to your project after you run the command:
- After installation, you can access Open WebUI at [http://localhost:3000](http://localhost:3000).
```bash
npm init docusaurus@latest my-website classic
```
#### Using Ollama on a Different Server
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
- To connect to Ollama on another server, change the `OLLAMA_API_BASE_URL` to the server's URL:
The command also installs all necessary dependencies you need to run Docusaurus.
```bash
docker run -d -p 3000:8080 -e OLLAMA_API_BASE_URL=https://example.com/api -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
```
## Start your site
Or for a self-built container:
Run the development server:
```bash
docker build -t open-webui .
docker run -d -p 3000:8080 -e OLLAMA_API_BASE_URL=https://example.com/api -v open-webui:/app/backend/data --name open-webui --restart always open-webui
```
```bash
cd my-website
npm run start
```
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
Continue with the full [getting started guide](./getting-started.md).