Skip to content

official-imvoiid/Ollama-OpenWebUI-Portable-Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ฆ Portable Ollama + OpenWebUI Setup

A sophisticated portable AI solution with two distinct usage modes: Solo Ollama for lightweight portability and OpenWebUI Project for full web interface experience.

๐Ÿ“‹ Table of Contents

๐ŸŽฏ Quick Overview

Two Usage Modes:

Mode Portability Use Case Requirements
Solo Ollama โœ… Move anywhere Lightweight AI, CLI interaction Just 2 files
OpenWebUI Project โš ๏ธ Static path initially Full web interface, team projects Full conda setup

๐Ÿš€ Solo Ollama Usage (Anywhere, Anytime)

Perfect for: Quick deployment, testing, moving between systems

๐Ÿ“ Required Files (Only 2!)

GetOllama.bat # used to download ollama.exe 
OllamaCMD.bat # CLI wrapper to interact with ollama.exe
๐Ÿ“‚ ollama/
โ”œโ”€โ”€ models/           # Directory for model files 
โ”œโ”€โ”€ lib/              # for any dependencies or libraries
โ”œโ”€โ”€ ollama.exe        # Main executable 

๐ŸŽฏ Usage Steps

  1. Install: Run GetOllama.bat (downloads Ollama automatically)
  2. Use: Run OllamaCMD.bat (interactive AI chat)
  3. Move: Copy entire ollama/ folder anywhere you want!

๐Ÿ’ก Solo Ollama Features

  • โœ… True Portability: Works from USB, cloud drives, any location
  • โœ… No Dependencies: No Python, no conda, no system installation
  • โœ… Interactive CLI: Chat with AI models directly
  • โœ… Auto Server Management: Starts/stops automatically
  • โœ… Local Model Storage: Models saved in ollama/models/

๐ŸŽฎ OllamaCMD Commands

ollama run llama2        # Chat with Llama2
ollama list             # Show installed models  
ollama pull mistral     # Download new models
ollama ps               # Show running models
exit                    # Quit and cleanup

๐ŸŒŸ OpenWebUI Project Setup (Famous Project)

Perfect for: Professional use, web interface, data persistence, team collaboration

Important: OpenWebUI has static paths initially - requires proper setup for portability

๐Ÿ“‹ Prerequisites

  1. Clone/download the OpenWebUI project
  2. Place ALL scripts directly in the OpenWebUI root folder (not in subfolders)

๐Ÿ“ Required Structure

๐Ÿ“‚ OpenWebUI-Project/           # Main OpenWebUI project folder
โ”œโ”€โ”€ ๐Ÿ“‚ ollama/                  # Ollama files
โ”œโ”€โ”€ ๐Ÿ“‚ installer_files/         # Miniconda + environments  
โ”œโ”€โ”€ GetConda.bat               # Miniconda installer
โ”œโ”€โ”€ SetEnv.bat                 # Path configurator
โ”œโ”€โ”€ online_openwebui_manager.bat # Online installation
โ”œโ”€โ”€ offline_openwebui_manager.bat # Offline installation (wheel-based)
โ”œโ”€โ”€ launch_openwebui.bat       # Combined launcher
โ”œโ”€โ”€ requirement.txt            # All Python dependencies
โ””โ”€โ”€ [OpenWebUI project files...]

๐Ÿš€ Setup Process

Step 1: Basic Setup

# 1. Install portable Miniconda
GetConda.bat

# 2. Configure environment paths  
SetEnv.bat

# 3. Install Ollama
GetOllama.bat

Step 2: Create Conda Environment

# Creates conda environment named 'open-webui' with Python 3.11
# This is REQUIRED - the environment must be named exactly 'open-webui'

Step 3: Choose Installation Method

You have 2 options for OpenWebUI installation:


๐Ÿ› ๏ธ Installation Methods

๐ŸŒ Method 1: Online Manager

online_openwebui_manager.bat

Features:

  • โœ… Always gets latest versions
  • โœ… Automatic dependency resolution
  • โŒ Requires internet during installation
  • โŒ Slower (downloads everything)

Options:

  1. Create new environment + install OpenWebUI
  2. Update existing installation
  3. Delete and reinstall (fresh start)

๐Ÿ“ฆ Method 2: Offline Manager (Recommended)

offline_openwebui_manager.bat

Features:

  • โœ… Pre-downloaded wheels: All dependencies stored locally
  • โœ… Fast installation: No waiting for downloads
  • โœ… Works offline: Install anywhere without internet
  • โœ… Moving friendly: Perfect for portable setups

How it works:

  1. Downloads ALL .whl files from requirement.txt to local folder
  2. Installs everything from local wheels (super fast!)
  3. After moving project: Just run again, installs from local wheels

๐Ÿ’พ Data Preservation Guide

๐Ÿ”’ Protecting Your Data Before Moving

OpenWebUI stores all your data (users, chats, settings) in webui.db. Here's how to preserve it:

๐Ÿ“ Database Location

\installer_files\Environments\open-webui\Lib\site-packages\open_webui\data\webui.db

๐Ÿ”„ Safe Moving Process

# BEFORE MOVING:
# 1. Backup your database
copy "webui.db" to safe location

# 2. Move entire OpenWebUI project folder

# 3. Run setup again (online/offline manager)

# 4. AFTER SETUP:
# Replace new webui.db with your old webui.db
# Your data is restored!

โš ๏ธ What webui.db Contains

  • ๐Ÿ‘ฅ User accounts (emails, usernames, passwords)
  • ๐Ÿ’ฌ Chat history (all conversations)
  • โš™๏ธ Settings (configurations, preferences)
  • ๐ŸŽจ Customizations (themes, layouts)

Critical: Always backup webui.db before moving or reinstalling!


๐ŸŽฏ Usage Scenarios

๐Ÿƒโ€โ™‚๏ธ Quick AI Access (Solo Ollama)

# Perfect for:
- Testing AI models quickly
- USB stick deployment  
- Temporary installations
- No-setup-required usage

# Just run:
GetOllama.bat    # Once
OllamaCMD.bat    # Every time

๐Ÿข Professional Setup (OpenWebUI Project)

# Perfect for:
- Web-based AI interface
- Team collaboration
- Data persistence
- Custom workflows

# Setup once:
GetConda.bat โ†’ SetEnv.bat โ†’ offline_manager.bat

# Use daily:
launch_openwebui.bat
# Opens: http://localhost:8080

๐Ÿ”ง Advanced Tips

๐Ÿš€ Making OpenWebUI Truly Portable

  1. Initial setup: Use offline manager to download all wheels
  2. Before moving: Backup webui.db
  3. After moving: Run SetEnv.bat + offline manager
  4. Restore data: Replace new webui.db with backed up one

๐ŸŽช Performance Optimization

  • SSD: Install on SSD for faster model loading
  • RAM: 16GB+ for larger models
  • GPU: Enable GPU acceleration in Ollama settings

๐Ÿ› Troubleshooting

Solo Ollama Issues

# Ollama won't start
- Check if ollama.exe exists in ollama/ folder
- Run GetOllama.bat again
- Check antivirus blocking

# Models not loading  
- Check ollama/models/ folder exists
- Try: ollama pull llama2

OpenWebUI Issues

# Environment not found
- Ensure conda environment named 'open-webui' exists
- Run SetEnv.bat after moving

# Installation fails
- Use offline manager for reliability
- Check requirement.txt is present
- Try reinstall option (option 3)

# Data lost after moving
- Check webui.db backup/restore process
- Verify database file permissions

Port Conflicts

# OpenWebUI uses port 8080
- Check: netstat -an | find "8080"
- Close conflicting applications
- Or modify launch script for different port

๐ŸŽ–๏ธ ๐ŸŒŸ Perfect For

  • Developers: Portable AI for coding assistance
  • Researchers: Consistent environment across machines
  • Teams: Shared AI interface with data persistence
  • Enterprise: Offline deployment with security
  • Students: Learn AI without complex installations

About

Clean set of scripts for using Ollama or OpenWebUI portably, PC to PC.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published