mirror of
https://github.com/open-webui/docs.git
synced 2026-01-02 17:59:41 +07:00
podman
This commit is contained in:
@@ -10,6 +10,7 @@ import { TopBanners } from "@site/src/components/TopBanners";
|
||||
import DockerCompose from './tab-docker/DockerCompose.md';
|
||||
import Extension from './tab-docker/DockerDesktopExtension.md';
|
||||
import Podman from './tab-docker/Podman.md';
|
||||
import PodmanQuadlet from './tab-docker/PodmanQuadlet.md';
|
||||
import PodmanKubePlay from './tab-docker/PodmanKubePlay.md';
|
||||
import ManualDocker from './tab-docker/ManualDocker.md';
|
||||
import DockerSwarm from './tab-docker/DockerSwarm.md';
|
||||
@@ -68,6 +69,12 @@ Choose your preferred installation method below:
|
||||
</div>
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="podman-quadlet" label="Quadlets">
|
||||
<div className='mt-5'>
|
||||
<PodmanQuadlet />
|
||||
</div>
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="podman-kube-play" label="Kube Play">
|
||||
<div className='mt-5'>
|
||||
<PodmanKubePlay />
|
||||
|
||||
@@ -19,16 +19,32 @@ Podman is a daemonless container engine for developing, managing, and running OC
|
||||
|
||||
## Networking with Podman
|
||||
|
||||
If networking issues arise, use slirp4netns to adjust the pod's network settings to allow the container to access your computer's ports.
|
||||
If networking issues arise (specifically on rootless Podman), you may need to adjust the network bridge settings.
|
||||
|
||||
Ensure you have [slirp4netns installed](https://github.com/rootless-containers/slirp4netns?tab=readme-ov-file#install), remove the previous container if it exists using `podman rm`, and start a new container with
|
||||
:::warning Slirp4netns Deprecation
|
||||
Older Podman instructions often recommended `slirp4netns`. However, `slirp4netns` is being **deprecated** and will be removed in **Podman 6**.
|
||||
|
||||
The modern successor is **[pasta](https://passt.top/passt/about/)**, which is the default in Podman 5.0+.
|
||||
:::
|
||||
|
||||
### Accessing the Host (Local Services)
|
||||
|
||||
If you are running Ollama or other services directly on your host machine, use the special DNS name **`host.containers.internal`** to point to your computer.
|
||||
|
||||
#### Modern Approach (Pasta - Default in Podman 5+)
|
||||
No special flags are usually needed to access the host via `host.containers.internal`.
|
||||
|
||||
#### Legacy Approach (Slirp4netns)
|
||||
If you are on an older version of Podman and `pasta` is not available:
|
||||
1. Ensure you have [slirp4netns installed](https://github.com/rootless-containers/slirp4netns).
|
||||
2. Start the container with the following flag to allow host loopback:
|
||||
|
||||
```bash
|
||||
podman run -d --network=slirp4netns:allow_host_loopback=true --name openwebui -p 3000:8080 -v open-webui:/app/backend/data ghcr.io/open-webui/open-webui:main
|
||||
podman run -d --network=slirp4netns:allow_host_loopback=true --name openwebui -p 3000:8080 -v open-webui:/app/backend/data ghcr.io/open-webui/open-webui:main
|
||||
```
|
||||
|
||||
If you are using Ollama from your computer (not running inside a container),
|
||||
|
||||
Once inside open-webui, navigate to Settings > Admin Settings > Connections and create a new Ollama API connection to `http://10.0.2.2:[OLLAMA PORT]`. By default, the Ollama port is 11434.
|
||||
### Connection Configuration
|
||||
Once inside Open WebUI, navigate to **Settings > Admin Settings > Connections** and set your Ollama API connection to:
|
||||
`http://host.containers.internal:11434`
|
||||
|
||||
Refer to the Podman [documentation](https://podman.io/) for advanced configurations.
|
||||
|
||||
68
docs/getting-started/quick-start/tab-docker/PodmanQuadlet.md
Normal file
68
docs/getting-started/quick-start/tab-docker/PodmanQuadlet.md
Normal file
@@ -0,0 +1,68 @@
|
||||
# Podman Quadlets (systemd)
|
||||
|
||||
Podman Quadlets allow you to manage containers as native systemd services. This is the recommended way to run production containers on Linux distributions that use systemd (like Fedora, RHEL, Ubuntu, etc.).
|
||||
|
||||
## 🛠️ Setup
|
||||
|
||||
1. **Create the configuration directory:**
|
||||
For a rootless user deployment:
|
||||
```bash
|
||||
mkdir -p ~/.config/containers/systemd/
|
||||
```
|
||||
|
||||
2. **Create the container file:**
|
||||
Create a file named `~/.config/containers/systemd/open-webui.container` with the following content:
|
||||
|
||||
```ini title="open-webui.container"
|
||||
[Unit]
|
||||
Description=Open WebUI Container
|
||||
After=network-online.target
|
||||
|
||||
[Container]
|
||||
Image=ghcr.io/open-webui/open-webui:main
|
||||
ContainerName=open-webui
|
||||
PublishPort=3000:8080
|
||||
Volume=open-webui:/app/backend/data
|
||||
|
||||
# Networking: Pasta is used by default in Podman 5+
|
||||
# If you need to access host services (like Ollama on the host):
|
||||
AddHost=host.containers.internal:host-gateway
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
```
|
||||
|
||||
3. **Reload systemd and start the service:**
|
||||
```bash
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user start open-webui
|
||||
```
|
||||
|
||||
4. **Enable auto-start on boot:**
|
||||
```bash
|
||||
systemctl --user enable open-webui
|
||||
```
|
||||
|
||||
## 📊 Management
|
||||
|
||||
- **Check status:**
|
||||
```bash
|
||||
systemctl --user status open-webui
|
||||
```
|
||||
|
||||
- **View logs:**
|
||||
```bash
|
||||
journalctl --user -u open-webui -f
|
||||
```
|
||||
|
||||
- **Stop service:**
|
||||
```bash
|
||||
systemctl --user stop open-webui
|
||||
```
|
||||
|
||||
:::tip Updating
|
||||
To update the image, simply pull the new version (`podman pull ghcr.io/open-webui/open-webui:main`) and restart the service (`systemctl --user restart open-webui`).
|
||||
:::
|
||||
@@ -160,14 +160,14 @@ docker run -d -p 3000:8080 -e HF_ENDPOINT=https://hf-mirror.com/ --add-host=host
|
||||
|
||||
Running on MacOS with Podman? Here’s how to ensure connectivity:
|
||||
|
||||
1. **Enable Host Loopback**:
|
||||
Use `--network slirp4netns:allow_host_loopback=true` in your command.
|
||||
1. **Enable Host Access**:
|
||||
Podman 5.0+ uses **pasta** by default, which simplifies host loopback. If you are on an older version, you may need `--network slirp4netns:allow_host_loopback=true`.
|
||||
|
||||
2. **Set OLLAMA_BASE_URL**:
|
||||
Ensure it points to `http://host.containers.internal:11434`.
|
||||
Ensure it points to **`http://host.containers.internal:11434`**.
|
||||
|
||||
**Example Podman Command**:
|
||||
```bash
|
||||
podman run -d --network slirp4netns:allow_host_loopback=true -p 3000:8080 -e OLLAMA_BASE_URL=http://host.containers.internal:11434 -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
|
||||
podman run -d -p 3000:8080 -e OLLAMA_BASE_URL=http://host.containers.internal:11434 -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user