Sites
On this page
A site maps a domain (and optional aliases) to a folder in /home/crab/<original-domain>, served by Caddy with automatic HTTPS.
Create a site

Before creating a site, install Caddy on the server (and PHP or Node.js if your app needs them).
- Open your server's Sites tab and click New site.
- App: pick a preset (Laravel, Symfony, WordPress, CrabPHP, Next.js, Node.js, or Static) or choose a site type manually:
- Static: serves plain files (with an optional single-page app fallback).
- PHP: runs PHP-FPM from your web root (for example,
public). - Proxy: forwards traffic to an app listening on a local port (Crabsmith assigns a free port starting at
8001if left blank).
- Code: pick a connected GitHub repository and branch, paste a custom Git URL, or choose No repository. Deploy after creating defaults on for connected GitHub repos and off for custom URLs or no repository.
- For a private custom Git repo, create the site first, copy its public key from Deployment → Deploy key, add it with read access at your Git host, use the SSH clone URL, and click Deploy now.
- Domain: enter your domain, or pick Free domain (available when your server address is an IPv4 address) to get
<name>.<server-ip-with-dashes>.sslip.iowithout setting up DNS first. - Run (Proxy presets): Run the app as a daemon is enabled by default so Crabsmith creates the app daemon and adds its restart command to your deploy script automatically.
- Click Create site.
DNS and HTTPS
Choose one of three HTTPS modes in Settings:
- Auto (default): Caddy fetches and renews public TLS certificates automatically. Point an
Arecord for your domain (and each alias) at your server's public IPv4 address, and make sure inbound TCP ports80and443are open. (This also applies to Free domain—the server must be publicly reachable on ports80and443for Caddy to issue the certificate.) - Internal: uses Caddy's own local CA. Useful for private hostnames without public DNS (browsers will warn unless they trust the CA).
- Off: serves plain HTTP. Use this for local testing or when sitting behind Cloudflare Flexible SSL (where Cloudflare connects to your server over HTTP).
Using Cloudflare
- Full (Strict) SSL (recommended): keep your site's HTTPS mode on Auto. Point your DNS record to the server's IP first, wait a minute for Caddy to issue the initial certificate (or turn off the orange cloud briefly during initial setup if you use strict Cloudflare rules), then enable the Cloudflare proxy with Full (Strict) SSL.
- Flexible SSL: Cloudflare connects to your origin over plain HTTP. Set your site's HTTPS mode to Off so Cloudflare and Caddy don't create a redirect loop.
Switching from a free domain to your own domain
- Point your domain's
Arecord at your server's IP address. - Open the site's Settings and replace the
.sslip.iodomain with your real domain (or add it as an alias). - Click Save—Caddy updates its config and requests a certificate for the new domain automatically.
Background apps, queues, and cron jobs
Manage your site's processes on its Processes tab (or the server's Daemons and Schedules tabs):
- Proxy apps: created automatically when Run the app as a daemon is checked during site creation.
- Queue workers: add a daemon such as
php artisan queue:work. - Cron jobs: add a schedule such as
* * * * *runningphp artisan schedule:run.
For any daemon you add manually, copy its restart line (sudo systemctl restart crabsmith-daemon-<id>) into Settings → Deployment so every deploy restarts it cleanly. PHP presets already end with sudo systemctl reload "$PHP_FPM".
Custom Caddy config
Crabsmith manages /etc/caddy/sites/site-<id>.caddy from your site settings—always make Caddy customizations through Settings → Caddy rather than editing that file directly over SSH:
- Inside the site block: add headers, redirects, basic auth, rate limits, or caching. Your
handleblocks run before the panel's; wrap rules inroute { }if directive order matters. - Before / after the site block: add extra site blocks, such as redirecting an old domain or
wwwhere.
For example, to redirect www.example.com to example.com, add this Before the site block (make sure www.example.com has an A record pointing to your server):
www.example.com {
redir https://example.com{uri} permanent
}Caddy validates every save first. If there's a syntax error, the previous config stays live and your changes aren't applied.
For full manual control, choose Take over the whole file. While you own the file, domain/HTTPS/directory controls are locked until you choose Give it back to the panel.
Run commands on a site
Need to run a quick php artisan, php bin/console, wp, or npm command without opening a full terminal? Use the site's Commands tab—see Deploys.
Delete a site
Open Settings and click Delete site. This removes:
- The site's Caddy config and deploy key
- Daemons and schedules whose working directory is the site's folder
- The site's folder (if Crabsmith created it)