You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a little guide I wrote to make it simpler to start Ollama+Open-webUI in the case that Open-webUI is installed in a conda environment. My suggestion is that this could be added to the documentation docs/getting-started/quick-start/starting-with-ollama, or to the tutorial section. While it works for me now, it can be that I missed something while writing it down.
One-click solution to start Ollama and Open-webUI
These instructions explain how to make a script and desktop entry in linux that will make it easy to start the Ollama service and the Open-webUI service as well as automatically open the browser at the right local address.
Start by making a separate shell script for stopping the Ollama service (this resolves an issue where Ollama will not start because the address it is trying to bind to is already in use - by itself). Call this file stop_ollama.sh and put the following into it:
#!/bin/bash
systemctl stop ollama
Now save this script in some directory of your choosing, for example /home/usr/ollama-open-webui/stop_ollama.sh. Replace usr by your username in these paths. This file needs to be made executable:
This will prompt you for your password once. Next, we make the main script that starts the services and opens a browser (tab) in the default program. Call it something like start_services.sh and put it in the same folder as the previous script.
#!/usr/bin/env bash
######################################################
# A little script to start up ollama and open-webui #
######################################################
# Stop ollama because of reasons...
sudo /home/usr/ollama-open-webui/stop_ollama.sh
# Start ollama in a new tab as an interactive bash shell
gnome-terminal --tab --title="Ollama" -- bash -i -c "
ollama serve;
exec bash
"
# Start open-webui in another new tab as an interactive bash shell
gnome-terminal --tab --title="Open-WebUI" -- bash -i -c "
conda activate openwebui;
open-webui serve;
exec bash
"
# Open browser tab with the right address
gnome-terminal --tab --title="Browser" -- bash -i -c "
sleep 5;
xdg-open http://localhost:8080/;
exec bash
"
It uses the first script to stop the Ollama service, then opens another terminal tab to start the Ollama service there. This assumes you are using a system with a gnome-terminal (I'm sure you'll be able to adapt it if this is not the case). It opens another tab to start the Open-webUI service: it is important that this is an interactive bash shell, as otherwise the right things (./bashrc, conda) will not be initialised. If you installed Open-webUI in another environment than with conda, edit the environment activation line in the script. The commands exec bash make sure the tabs don't automatically close after execution, so that any error messages can be seen. Lastly it opens another tab that waits 5 seconds for the services to start and then opens a browser tab to go to the localhost address for Open-webUI. This script has to be made executable, too.
We're almost there, we just need to make a desktop entry to make this truly a one-click solution. Make a file called start_ollama_webui.desktop or similar and save it in the folder /home/usr/.local/share/applications with the following content:
You should now be able to find this entry (by searching for 'ollama') in the 'start' menu and run the whole setup with one click! Optionally, download an Ollama icon and add the path /home/usr/ollama-open-webui/ollama_icon.png to the line Icon=. Using Categories=Development makes sure you can also find the entry in the 'Programming' category of the menu. You can add it to your panel or desktop if desired.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
This is a little guide I wrote to make it simpler to start Ollama+Open-webUI in the case that Open-webUI is installed in a conda environment. My suggestion is that this could be added to the documentation
docs/getting-started/quick-start/starting-with-ollama
, or to the tutorial section. While it works for me now, it can be that I missed something while writing it down.One-click solution to start Ollama and Open-webUI
These instructions explain how to make a script and desktop entry in linux that will make it easy to start the Ollama service and the Open-webUI service as well as automatically open the browser at the right local address.
Start by making a separate shell script for stopping the Ollama service (this resolves an issue where Ollama will not start because the address it is trying to bind to is already in use - by itself). Call this file
stop_ollama.sh
and put the following into it:Now save this script in some directory of your choosing, for example
/home/usr/ollama-open-webui/stop_ollama.sh
. Replaceusr
by your username in these paths. This file needs to be made executable:It also needs to be given the right privileges so that we don't need to type our password every time:
Add a line at the bottom:
This will prompt you for your password once. Next, we make the main script that starts the services and opens a browser (tab) in the default program. Call it something like
start_services.sh
and put it in the same folder as the previous script.It uses the first script to stop the Ollama service, then opens another terminal tab to start the Ollama service there. This assumes you are using a system with a gnome-terminal (I'm sure you'll be able to adapt it if this is not the case). It opens another tab to start the Open-webUI service: it is important that this is an interactive bash shell, as otherwise the right things (./bashrc, conda) will not be initialised. If you installed Open-webUI in another environment than with conda, edit the environment activation line in the script. The commands
exec bash
make sure the tabs don't automatically close after execution, so that any error messages can be seen. Lastly it opens another tab that waits 5 seconds for the services to start and then opens a browser tab to go to the localhost address for Open-webUI. This script has to be made executable, too.We're almost there, we just need to make a desktop entry to make this truly a one-click solution. Make a file called
start_ollama_webui.desktop
or similar and save it in the folder/home/usr/.local/share/applications
with the following content:You should now be able to find this entry (by searching for 'ollama') in the 'start' menu and run the whole setup with one click! Optionally, download an Ollama icon and add the path
/home/usr/ollama-open-webui/ollama_icon.png
to the lineIcon=
. UsingCategories=Development
makes sure you can also find the entry in the 'Programming' category of the menu. You can add it to your panel or desktop if desired.The text was updated successfully, but these errors were encountered: