Skip to content

Instantly share code, notes, and snippets.

@AnonymerNiklasistanonym
Last active July 27, 2025 15:07
Show Gist options
  • Save AnonymerNiklasistanonym/fb9f4eb28b60c7d836aaa5badf0404b4 to your computer and use it in GitHub Desktop.
Save AnonymerNiklasistanonym/fb9f4eb28b60c7d836aaa5badf0404b4 to your computer and use it in GitHub Desktop.
Local (open-webui & ollama) LLM setup

Installed programs:

sudo pacman -S ollama
# AUR
yay -S open-webui
# > provides system service to start on Port 8080

Installed models:

Create script:

  • start open-webui
  • start ollama
  • open open-webui

webui.sh e.g. in HOME directory (~/webui.sh)

Create .desktop file:

webui.desktop e.g. in user directory (.local/share/applications/webui.desktop)

[Desktop Entry]
Name=Open WebUI
Comment=Start Open WebUI service and Ollama server, open Firefox, stop on close
Exec=$HOME/webui.sh
Terminal=true
Type=Application
Categories=Network;
#!/bin/bash
set -x
export OLLAMA_MODELS="$HOME/.local/share/ollama/models"
echo $OLLAMA_MODELS
# Start systemd service
pkexec systemctl start open-webui.service
# Start Ollama server (replace with your actual start command)
ollama serve &
ollama list
# Get Ollama server PID
OLLAMA_PID=$!
# Wait a second to not load a non existing page
sleep 1
# Use a new temporary Firefox profile so it runs in the foreground
TMP_PROFILE=$(mktemp -d)
firefox --no-remote --profile "$TMP_PROFILE" "http://localhost:8080"
# After Firefox window closes
pkexec systemctl stop open-webui.service
kill $OLLAMA_PID
# Clean up temp profile
rm -rf "$TMP_PROFILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment