**# AI-Server-Installer 1-Click Self-Hosted AI Server Installer **# β‘ 1-Click Self-Hosted AI Server Installer
A production-ready, interactive Bash script to deploy a complete, secure, and private AI infrastructure on your local machine or remote VPS in under 2 minutes.
No complex manual configurations, no exposed ports, and zero trust by default.
This script automates the deployment of a containerized AI stack using Docker Compose and wraps it in a secure network layer:
- Ollama: The backend engine running open-source LLMs (Llama 3, Mistral, Phi-3, etc.) locally with automatic GPU/CPU acceleration detection.
- Open WebUI: A feature-rich, beautiful ChatGPT-like user interface connected directly to your Ollama instance.
- zrok (by NetFoundry): A next-generation peer-to-peer sharing platform. It creates a secure Zero-Trust public tunnel to your Open WebUI interface, allowing you to access your private AI from your phone or share it with friends without public IP, port forwarding, or firewall changes.
- π True 1-Click Deployment: Automatically checks, installs, and configures Docker, Docker Compose, and necessary dependencies if missing.
- π Secure Remote Access: Integrates
zrokout of the box to expose your WebUI safely without risking your home network security. - π§ Hardware Auto-Detection: Automatically configures Docker to utilize NVIDIA GPUs (via
nvidia-container-toolkit) for fast AI generation, falling back to optimized CPU threads if no GPU is found. - π³ Isolated Microservices: Everything runs in a dedicated Docker network with strict volume mappings for persistent data (your chats and downloaded models won't disappear).
Run the following command in your Linux terminal (Ubuntu/Debian/CentOS supported):
curl -sSL https://githubusercontent.com | bash- A Linux machine or VPS (Ubuntu 22.04+ recommended).
- A free zrok token (Get it in 30 seconds at zrok.io to enable remote access).
When you execute the script, it guides you through a clean, foolproof interactive CLI setup:
- Dependency Check: Validates OS,
curl,git,docker, anddocker-compose. - Hardware Check: Scans for NVIDIA CUDA drivers to enable GPU pass-through.
- zrok Configuration: Prompts you to paste your
zrokenvironment token (optional, but recommended for remote access). - Boot Up: Generates the optimized
docker-compose.ymlfile dynamically and fires up the containers. - Output Summary: Prints local access URLs and your unique secure public
zroklink.
install.shβ The main interactive Bash orchestrator (dependency checks, env generation, validation).templates/docker-compose.template.ymlβ Clean multi-container architecture template.config/β Configuration directories for Ollama and zrok environments.
If you found this script useful, please give it a β Star! It helps other self-hosted and AI enthusiasts discover this tool.
Feel free to open an Issue or submit a Pull Request if you want to add more tools to the stack (e.g., Stable Diffusion, Vector DBs, or monitoring tools).
License: MIT