Preface
I have been using the docker method to deploy openwebui, but this thing was upgraded every few days. I used the docker image hard disk space to take up the docker image. I couldn't stand it. Today I changed it to direct deployment. The following is the deployment process record.
1. Stop and delete the hard disk space occupied by useless docker images
docker stop openweb-ui docker image prune -a #Delete unused and unreliable images
2. Start deployment
cd /data #My custom Python environment is /data/openwebui-env. Please note that this path should be replaced by your actual one.apt install python3-venv python3-full python3 -m venv openwebui-env source openwebui-env/bin/activate #Activate a standalone python environmentpip install open-webui cat > /usr/local/bin/ << 'EOF' #!/bin/bash export HOME=/root cd /data/openwebui-env source /data/openwebui-env/bin/activate exec /data/openwebui-env/bin/open-webui serve --port 80 # Change it to the service port you want to listen toEOF chmod +x /usr/local/bin/ cat > /etc/systemd/system/ << 'EOF' [Unit] Description=OpenWebUI Service After= [Service] Type=simple User=root Group=root Environment=HOME=/root Environment=PATH=/data/openwebui-env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin WorkingDirectory=/data/openwebui-env ExecStart=/usr/local/bin/ Restart=always RestartSec=3 # Log configurationStandardOutput=append:/var/log/ StandardError=append:/var/log/ [Install] WantedBy= EOF systemctl daemon-reload systemctl restart openwebui systemctl status openwebui
Access the service port and register the administrator account, and this is available.
The program file path is: /data/openwebui-env/lib/python3.12/site-packages/open_webui
The data file path is: /data/openwebui-env/lib/python3.12/site-packages/open_webui/data
If you upgrade later, you can execute it
source /data/openwebui-env/bin/activate pip install --upgrade open-webui
Summarize
This is all about this article about deploying openwebui in non-docker way. For more related content on non-docker way to deploy openwebui, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!