6cd49f4aacbf80d028bd18f85198d93df1c71b96
X-WebUI
A comprehensive setup script for deploying a secure server environment with nginx, Docker, X proxy, and Open WebUI.
Overview
This repository contains a bash script that automates the setup of a complete server environment on a Debian system. The script sets up:
- nginx web server
- SSL/TLS certificates via acme.sh
- Docker and Docker Compose
- Open WebUI (running in Docker)
- X proxy server with secure configuration
- Automatic certificate renewal
Requirements
- Debian/Ubuntu 64-bit system
- Sudo privileges
- Domain name pointing to your server
- Inbound traffic on TCP ports 80 and 443 from 0.0.0.0/0 allowed
Usage
Log in as a non-root user and update your system:
sudo apt update && sudo apt upgrade -y
Run the script:
curl -L https://github.com/xixu-me/X-WebUI/raw/main/setup.sh | bash -s <username> <domain> <id>
Replace the following:
<username>: Your login username<domain>: Your domain name (must be pointed to this server)<id>: A unique ID for the X proxy configuration
If you encounter the following error:
bash: curl: command not found
Please install curl and bash first:
sudo apt update && sudo apt install -y curl bash
Features
Web Server
- Configures nginx
- Sets up automatic HTTPS redirection
- Implements proper security headers
SSL/TLS Certificates
- Automatically obtains and configures Let's Encrypt certificates
- Sets up automatic renewal via cron job
Docker Environment
- Installs Docker and Docker Compose
- Configures Open WebUI in a Docker container
- Sets up proper restart policies
Proxy Configuration
- Installs and configures X proxy
- Implements secure TLS settings
- Configures proper routing rules
Security Considerations
This script implements several security best practices:
- Uses TLS 1.2+ for all connections
- Implements proper certificate handling
- Configures firewall rules to block unwanted traffic
- Sets up proper user permissions
Disclaimer
- This repository is strictly for educational and research purposes.
- Use at your own risk. The repository assumes no responsibility for potential issues.
- No guarantee of accuracy, completeness, or reliability.
- Not liable for data loss or damages.
- Ensure compliance with relevant licenses and legal regulations.
- No endorsement of third-party hardware/software.
- User modifications are their own responsibility.
- Terms may change at any time. By using this repository, you agree to these terms.
License
Copyright © Xi Xu
Licensed under the GPL-3.0 license.
Description
Comprehensive setup script for deploying a secure server environment
89 KiB
0 Stars
1 Watchers
0 Forks
Languages
HTML
55.2%
Shell
44.8%