One-command NaiveProxy + Caddy installer for Debian/Ubuntu VPS.
- Downloads prebuilt Caddy with
klzgrad/forwardproxy@naiveon amd64, with source-build fallback - Supports local static cover site or reverse-proxy cover site
- Automatically obtains a Let's Encrypt TLS certificate
- Generates NaiveProxy credentials, URI, QR code, CLI config, and sing-box outbound JSON
- Installs and manages
caddy.service
- Debian 12 or Ubuntu 22.04+
- Public IPv4 VPS
- Domain A record pointing to the VPS
- Cloudflare proxy disabled / DNS-only
- Ports
80/tcpand443/tcpopen - Root access
wget -qO- https://raw.githubusercontent.com/ColorSource/naive-caddy-installer/main/setup.sh | sudo bashThe installer asks for confirmation before making changes.
Unauthenticated visits to your domain are served by a normal cover site.
Default mode. Caddy serves files from:
/var/www/naive-cover
If index.html does not exist, the installer creates a small placeholder page.
Caddy reverse-proxies unauthenticated visits to an external cover site.
Example:
https://www.lovense.com
Set NAIVE_CADDY_INSTALL=build to force local xcaddy source build instead of the default prebuilt amd64 binary.
Static cover:
wget -qO- https://raw.githubusercontent.com/ColorSource/naive-caddy-installer/main/setup.sh | \
sudo NAIVE_DOMAIN=proxy.example.com \
NAIVE_COVER_MODE=static \
NAIVE_STATIC_ROOT=/var/www/naive-cover \
bashReverse-proxy cover:
wget -qO- https://raw.githubusercontent.com/ColorSource/naive-caddy-installer/main/setup.sh | \
sudo NAIVE_DOMAIN=proxy.example.com \
NAIVE_COVER_MODE=proxy \
NAIVE_MASK_SITE=https://www.lovense.com \
bash| Path | Purpose |
|---|---|
/etc/caddy/Caddyfile |
Caddy + NaiveProxy config |
/etc/caddy/credentials.txt |
Credentials and URI |
/root/naive-client-config.json |
Naive CLI config |
/root/naive-singbox.json |
sing-box outbound JSON |
/var/www/naive-cover/index.html |
Static cover page, if static mode is used |
systemctl status caddy
systemctl reload caddy
systemctl restart caddy
journalctl -u caddy -f
cat /etc/caddy/credentials.txtIf Caddy is already installed, rerun the installer and choose the uninstall option from the existing-install menu.
The uninstall option removes:
caddy.service/usr/bin/caddy/etc/caddy//root/naive-client-config.json/root/naive-singbox.json- the static cover directory, usually
/var/www/naive-cover
It does not remove Go, DNS records, or firewall rules.
- Do not enable Cloudflare orange-cloud proxy for the NaiveProxy domain.
- Do not use sensitive paths as the static site root.
- This script does not configure firewall rules.
- This script does not enable BBR or tune kernel networking.