Advertisement
fakesamgregory

Untitled

Jul 17th, 2025 (edited)
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.95 KB | None | 0 0
  1. # Paste these commands line by line.
  2. # You don't need to paste anything after the hash (#) like this, here text
  3. # they are just helpful comments
  4.  
  5. #                '.'--.--'.-'
  6. #   .,_------.___,   \' r'
  7. #  ', '-._a      '-' .'
  8. #   '.    '-'Y \._  /
  9. #     '--;____'--.'-,
  10. #      /..'       '''
  11. ########################
  12. # $200 CREDIT WITH DIGITAL OCEAN: https://m.do.co/c/9beb563908a1
  13. ########################
  14.  
  15. # Run OpenWebUI with Docker (copy everything here)
  16. docker run -d \
  17.   --name open-webui \
  18.   -p 3000:8080 \
  19.   -v open-webui:/app/backend/data \
  20.   --restart unless-stopped \
  21.   ghcr.io/open-webui/open-webui:main
  22.  
  23. # Enable firewall
  24. ufw enable
  25.  
  26. # Allow SSH
  27. ufw allow 22
  28.  
  29. # Allow OpenWebUI port
  30. ufw allow 3000
  31.  
  32. # Allow HTTP/HTTPS (if setting up reverse proxy later)
  33. ufw allow 80
  34. ufw allow 443
  35.  
  36. # You should have OpenWebUI running on the IP address given to you by your Digital Ocean Droplet
  37.  
  38. # Install Nginx
  39. apt install -y nginx
  40.  
  41. # Create Nginx configuration. Change your_domain.com as the domain you wish to run this from
  42. cat > /etc/nginx/sites-available/openwebui << 'EOF'
  43. server {
  44.     listen 80;
  45.     server_name your_domain.com;
  46.  
  47.     location / {
  48.         proxy_pass http://localhost:3000;
  49.         proxy_set_header Host $host;
  50.         proxy_set_header X-Real-IP $remote_addr;
  51.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  52.         proxy_set_header X-Forwarded-Proto $scheme;
  53.     }
  54. }
  55. EOF
  56.  
  57. # Enable the site
  58. ln -s /etc/nginx/sites-available/openwebui /etc/nginx/sites-enabled/
  59.  
  60. # Test the settings
  61. nginx -t
  62.  
  63. # Restart
  64. systemctl restart nginx
  65.  
  66. # install ssl. Change you-domain.com and [email protected] to relevant values
  67. apt install -y certbot python3-certbot-nginx
  68. certbot --nginx -d your-domain.com --non-interactive --agree-tos --email your@email.com
  69.  
  70. # Run this in your console to disable all models
  71. document.querySelectorAll('#model-list button[data-switch-root]').forEach(input => input.click())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement