metadata
title: OpenWebUI
emoji: π€
colorFrom: blue
colorTo: purple
sdk: docker
pinned: true
app_port: 8080
suggested_hardware: cpu-basic
suggested_storage: medium
short_description: OpenWebUI with automated GitHub data sync
tags:
- openwebui
- chat
- llm
- ai
- docker
- data-sync
- backup
OpenWebUI with Data Synchronization
A self-hosted OpenWebUI instance with automated data backup and synchronization to GitHub.
Features
- π€ Full OpenWebUI: Chat interface for AI models
- π Auto Sync: Backs up
webui.db,uploads/,vector_db/to GitHub - π‘οΈ Safe Backups: SQLite hot backups prevent corruption
- π¦ Git LFS: Handles large files in uploads/vector_db
- β° Configurable: Custom sync intervals and timezone
- π WebDAV Support: Optional secondary backup location
Environment Variables
Set these in your Space's Repository Secrets:
Required
| Variable | Description | Example |
|---|---|---|
G_NAME |
GitHub repo | username/openwebui-db |
G_TOKEN |
GitHub PAT | github_pat_xxx... |
Optional
| Variable | Description | Default |
|---|---|---|
SYNC_INTERVAL |
Sync frequency (seconds) | 3600 |
SYNC_TIMEZONE |
Timezone for logs | Asia/Kolkata |
GIT_USER_NAME |
Commit author | AutoSync Bot |
GIT_USER_EMAIL |
Commit email | autosync@bot.com |
WEBDAV_URL |
WebDAV server URL | - |
WEBDAV_USERNAME |
WebDAV user | - |
WEBDAV_PASSWORD |
WebDAV password | - |
GitHub Token Setup
- Go to GitHub Token Settings
- Create a Fine-grained token
- Select your backup repository
- Grant Contents: Read and Write
Setup
- Create a private GitHub repository for backups
- Generate a GitHub Personal Access Token
- Add
G_NAMEandG_TOKENto Space secrets - Deploy and enjoy persistent storage!
How It Works
- Startup: Clones your GitHub repo and restores data
- Runtime: Syncs every
SYNC_INTERVALseconds - Backup: Creates SQLite hot backup, syncs uploads/vector_db
- Push: Commits and pushes changes to GitHub
- WebDAV: Optionally uploads timestamped backup to WebDAV
Check out the configuration reference for more details.