[PR #724] [CLOSED] Snap packaging #20433

Closed
opened 2026-04-20 02:57:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/724
Author: @mz2
Created: 2/13/2024
Status: Closed

Base: devHead: snap


📝 Commits (3)

  • 5dd61b1 Rebuild of the snap addition branch on top of current head of open-webui/open-webui dev branch
  • 461f41b Set STATIC_DIR
  • e65accf Adjustments to the launcher

📊 Changes

7 files changed (+174 additions, -1 deletions)

View changed files

📝 backend/start.sh (+1 -1)
snap/hooks/configure (+4 -0)
snap/hooks/install (+14 -0)
snap/hooks/post-refresh (+2 -0)
snap/local/info.sh (+30 -0)
snap/local/run-snap.sh (+18 -0)
snap/snapcraft.yaml (+105 -0)

📄 Description

Adds strictly confined snap packaging of ollama-webui for x86-64 as an alternative to docker & k8s, presently published on the channel latest/beta (sudo snap install ollama-webui --beta).

This is proposed as a nice alternative to docker (no need to install and configure the nvidia docker runtime for example, systemd service is set up automatically, over-the-air updates, straightforward to access resources and data from user's host system within the limits of the application's confinement) and safer of course than bare installation onto host system.

Installable with:

sudo snap install ollama --channel beta # or ollama installed any other method, or on another host
sudo snap install ollama-webui --channel beta

As you might guess from above I also packaged up ollama as a snap (this snapped version of ollama-webui does not require it, demonstrating this mostly just to note the ease of installing both).

  • strict confinement used with network, network-bind, home, removable-media, opengl interfaces in use, i.e. it can access and serve a port, access home directory and /media, and access the GPU (the opengl interface also grants access to CUDA etc).
  • starts up a systemd service automatically for the service.
  • if removable media access is needed (e.g. user prefers storing data under a disk mounted under /media), sudo snap connect ollama:removable-media achieves that (for security reasons, removable media access not granted without user action).

If this looks interesting, I'm happy to hand over the package on snapcraft.io to a maintainer, and can contribute CI integration to make it easy to keep the snap package up to date whenever you release.

If you want to build this locally, after installing snapcraft and either the multipass or LXD provider for it go to the root directory of the repository, and ...:

snapcraft

Configuration

Offers the following configuration keys and default values, configurable with sudo snap set ollama-webui key=value:


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/724 **Author:** [@mz2](https://github.com/mz2) **Created:** 2/13/2024 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `snap` --- ### 📝 Commits (3) - [`5dd61b1`](https://github.com/open-webui/open-webui/commit/5dd61b141d8e7d41515ec194cddcb1463e079143) Rebuild of the snap addition branch on top of current head of open-webui/open-webui dev branch - [`461f41b`](https://github.com/open-webui/open-webui/commit/461f41bdd3a81e53e7c1869536cd32080ed3d2a7) Set STATIC_DIR - [`e65accf`](https://github.com/open-webui/open-webui/commit/e65accf65c7d6a8b881355234b811519c3b7c7a4) Adjustments to the launcher ### 📊 Changes **7 files changed** (+174 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/start.sh` (+1 -1) ➕ `snap/hooks/configure` (+4 -0) ➕ `snap/hooks/install` (+14 -0) ➕ `snap/hooks/post-refresh` (+2 -0) ➕ `snap/local/info.sh` (+30 -0) ➕ `snap/local/run-snap.sh` (+18 -0) ➕ `snap/snapcraft.yaml` (+105 -0) </details> ### 📄 Description Adds strictly confined snap packaging of ollama-webui for x86-64 as an alternative to docker & k8s, presently published on the channel `latest/beta` (`sudo snap install ollama-webui --beta`). This is proposed as a nice alternative to docker (no need to install and configure the nvidia docker runtime for example, systemd service is set up automatically, over-the-air updates, straightforward to access resources and data from user's host system within the limits of the application's confinement) and safer of course than bare installation onto host system. Installable with: ```bash sudo snap install ollama --channel beta # or ollama installed any other method, or on another host sudo snap install ollama-webui --channel beta ``` As you might guess from above I also packaged up [ollama](https://github.com/ollama/ollama/pull/2432) as a snap (this snapped version of ollama-webui does not require it, demonstrating this mostly just to note the ease of installing both). - strict confinement used with [`network`](https://snapcraft.io/docs/network-interface), [`network-bind`](https://snapcraft.io/docs/network-bind-interface), [`home`](https://snapcraft.io/docs/home-interface), [`removable-media`](https://snapcraft.io/docs/removable-media-interface), [`opengl`](https://snapcraft.io/docs/opengl-interface) interfaces in use, i.e. it can access and serve a port, access home directory and `/media`, and access the GPU (the `opengl` interface also grants access to CUDA etc). - starts up a systemd service automatically for the service. - if removable media access is needed (e.g. user prefers storing data under a disk mounted under `/media`), `sudo snap connect ollama:removable-media` achieves that (for security reasons, removable media access not granted without user action). If this looks interesting, I'm happy to hand over the package on snapcraft.io to a maintainer, and can contribute CI integration to make it easy to keep the snap package up to date whenever you release. If you want to build this locally, [after installing `snapcraft` and either the multipass or LXD provider for it](https://snapcraft.io/docs/snapcraft-setup) go to the root directory of the repository, and ...: ```bash snapcraft ``` ## Configuration Offers the following configuration keys and default values, configurable with `sudo snap set ollama-webui key=value`: - `data-dir`: /var/snap/ollama-webui/common/data - `enable-signup`: true - `host`: 0.0.0.0 - `ollama-api-base-url`: http://localhost:11434/api - `openai-api-base-url`: https://api.openai.com/v1 - `openai-api-key`: (blank) - `port`: 8080 - `secret-key` (randomized) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 02:57:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#20433