Guide
HTTPS website with Caddy in one command (beta)
Last updated: 1 December 2026
This free script installs Caddy and serves your static website with automatic HTTPS. It is new (beta): use it on a fresh server and read it first.
Instant VPS from $7.99 a month
- Sign up with an email address, a password and any nickname: no ID, no phone number.
- Pay with Monero, Bitcoin, Litecoin, USDT, USDC, SOL or TRX, or by card through MoonPay. Monero is the most private way to pay; USDT or USDC on Solana confirm in seconds, and we add no transfer fee on them.
- Orders are processed automatically and delivered in about 10 minutes.
- New VPS orders have a 24-hour guarantee (see the terms for what is covered).
See Instant VPS plansHow ordering worksRequirements and run
Ubuntu 22.04/24.04 or Debian 12/13 with root access, at any provider. Download, compare the SHA-256 (26883c6c7fca95e413ab999594d1aa8b5a9de006254fcf490c2468f652c8635d), read it, then run:
wget https://phantomvps.com/blog/caddy-site.sh
sha256sum caddy-site.sh
less caddy-site.sh
sudo DOMAIN=example.org bash caddy-site.sh
What it changes
- Installs Caddy from its official apt repository
- Writes a Caddyfile for your domain and keeps the old one as a copy
- Serves files from /var/www/site; opens 80 and 443 in ufw only if ufw is on
Good to know
- Point your domain's DNS to the server first
- Ports 80 and 443 must be free and open at your provider
- It stops if Caddy is already installed
Questions and answers
Do I need to buy a certificate?
No. Caddy gets one automatically.
Where do my files go?
Into /var/www/site.
Is it tested?
It is a beta. Please report problems to support@phantomvps.com.
Does it work on other providers?
Yes, on any server with a supported system and root access.
Ready to try it? Instant VPS from $7.99 a month
- Pick a plan: Instant 1-2, $7.99 a month or all Instant VPS plans.
- Sign up with an email address, a password and any nickname: no ID, no phone number.
- Pay with Monero, Bitcoin, Litecoin, USDT, USDC, SOL or TRX, or by card through MoonPay. Monero is the most private way to pay; USDT or USDC on Solana confirm in seconds, and we add no transfer fee on them.
- Orders are processed automatically and delivered in about 10 minutes.
- New VPS orders have a 24-hour guarantee (see the terms for what is covered).
- Before you pay you can ping our test IPs and read the live status page.
- Support is available 24/7 via email and our client ticket portal.
See Instant VPS plansHow ordering works