Your Name commited on
Commit Β·
e4867ad
1
Parent(s): a79ea2b
clear
Browse files7 unmodified lines8910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091927 unmodified linesapp_port: 7860---# Open WebUI with Cloudflare TunnelThis is a secure deployment of Open WebUI that uses Cloudflare Tunnel for enhanced privacy and security.## Architecture- **Frontend**: Simple HTML page displayed on Hugging Face Spaces (port 7860)- **Backend**: Open WebUI service running internally (port 8080)- **Tunnel**: Cloudflare Tunnel for secure external access- **Backup**: WebDAV synchronization for data persistence## Environment Variables### Required for Cloudflare Tunnel- `TUNNEL_TOKEN`: Your Cloudflare Tunnel token### Optional for Data Backup- `WEBDAV_URL`: WebDAV server URL- `WEBDAV_USERNAME`: WebDAV username- `WEBDAV_PASSWORD`: WebDAV password- `WEBDAV_BACKUP_PATH`: Backup path (optional)- `SYNC_INTERVAL`: Sync interval in seconds (default: 600)## Security Features- β End-to-end encrypted tunnel- β Private backend deployment- β Automatic data backup- β No direct exposure of Open WebUI## Setup Instructions1. Create a Cloudflare Tunnel and get your token2. Set the `TUNNEL_TOKEN` environment variable3. Configure WebDAV settings for backup (optional)4. Deploy to Hugging Face SpacesThe frontend will show a status page while the actual Open WebUI runs securely through the tunnel.## Troubleshooting### Common Issues and Fixes#### 1. Permission Denied Errors- **Problem**: `/var/www/html/index.html: Permission denied`- **Fix**: The script now automatically falls back to `/tmp/www/` if `/var/www/html/` is not writable#### 2. Open WebUI Not Starting- **Problem**: `./start.sh: No such file or directory`- **Fix**: The script now checks multiple possible locations for the Open WebUI startup script:- `/app/backend/start.sh`- `/app/start.sh`- `open-webui` command- Direct Python execution#### 3. Service Status MonitoringThe script provides detailed status monitoring:- β Nginx (Frontend): Running- β Open WebUI: Stopped- β Cloudflare Tunnel: Running#### 4. Debug ToolsRun the test script to check your environment:```bash./runtime_test.sh```### Logs Location- Nginx logs: `/tmp/nginx_error.log`, `/tmp/nginx_access.log`- Cloudflare Tunnel logs: `/tmp/cloudflared.log`## Version History### v2.1 (Current)- β **FIXED**: Syntax error in start.sh (line 104)- β **FIXED**: Permission issues with HTML file creation- β **FIXED**: HERE document syntax in bash script- β Improved Open WebUI startup detection with multiple fallback methods- β Added automatic fallback from `/var/www/html` to `/tmp/www`- β Enhanced error handling and logging- β Added runtime environment testing tools- β Improved HTML content with proper service information7 unmodified lines8910117 unmodified linesapp_port: 7860---clear
README.md+1-82