Skip to content

Instantly share code, notes, and snippets.

@barseghyanartur
Last active October 23, 2025 12:29
Show Gist options
  • Select an option

  • Save barseghyanartur/90ca2999c90abbc9041c49520da030b0 to your computer and use it in GitHub Desktop.

Select an option

Save barseghyanartur/90ca2999c90abbc9041c49520da030b0 to your computer and use it in GitHub Desktop.
Run open-webui at start on macOS
cat > ~/Library/LaunchAgents/com.user.openwebui.plist <<'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
  <key>Label</key><string>com.user.openwebui</string>
  <key>ProgramArguments</key><array>
    <string>/Users/me/.local/share/uv/tools/open-webui/bin/open-webui</string>
    <string>serve</string>
    <string>--port</string>
    <string>8081</string>
  </array>
  <key>WorkingDirectory</key><string>/Users/me</string>
  <key>EnvironmentVariables</key><dict>
    <key>HOME</key><string>/Users/me</string>
    <key>WEBUI_SECRET_KEY_FILE</key><string>/Users/me/.webui_secret_key</string>
  </dict>
  <key>RunAtLoad</key><true/>
  <key>KeepAlive</key><true/>
  <key>StandardOutPath</key><string>/Users/me/Library/Logs/openwebui.log</string>
  <key>StandardErrorPath</key><string>/Users/me/Library/Logs/openwebui.err</string>
</dict></plist>
PLIST
openssl rand -base64 16 > ~/.webui_secret_key && chmod 600 ~/.webui_secret_key
launchctl load ~/Library/LaunchAgents/com.user.openwebui.plist
launchctl start com.user.openwebui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment