| title | Import Your Old Caddy Setup |
|---|---|
| description | Guide to importing existing Caddyfile configurations into Charon. Migrate your reverse proxy setup without starting from scratch. |
Already using Caddy? You can bring your existing configuration into Charon instead of starting from scratch.
Charon reads your Caddyfile and creates proxy hosts for you automatically. It understands:
- ✅ Domain names
- ✅ Reverse proxy addresses
- ✅ SSL settings
- ✅ Multiple domains per site
Click "Import Caddy Config" in the sidebar.
Option A: Upload a File
- Click "Choose File"
- Select your Caddyfile
- Click "Upload"
Option B: Paste Text
- Click the "Paste" tab
- Copy your Caddyfile contents
- Paste them into the box
- Click "Parse"
Charon shows you a preview:
Found 3 sites:
✅ example.com → localhost:3000
✅ api.example.com → localhost:8080
⚠️ files.example.com → (file server - not supported)
Green checkmarks = will import Yellow warnings = can't import (but tells you why)
If you already have a proxy for example.com, Charon asks what to do:
- Keep Existing — Don't import this one, keep what you have
- Overwrite — Replace your current config with the imported one
- Skip — Same as "Keep Existing"
Choose what makes sense for each conflict.
Charon creates proxy hosts for everything you selected. Done!
Your Caddyfile:
blog.example.com {
reverse_proxy localhost:3000
}
api.example.com {
reverse_proxy https://backend:8080
}What Charon creates:
- Proxy host:
blog.example.com→http://localhost:3000 - Proxy host:
api.example.com→https://backend:8080
Some Caddy features can't be imported:
static.example.com {
file_server
root * /var/www
}Why: Charon only handles reverse proxies, not static files.
Solution: Keep this in a separate Caddyfile or use a different tool for static hosting.
example.com {
route /api/* {
reverse_proxy localhost:8080
}
route /web/* {
reverse_proxy localhost:3000
}
}Why: Charon treats each domain as one proxy, not multiple paths.
Solution: Create separate subdomains instead:
api.example.com→ localhost:8080web.example.com→ localhost:3000
{$DOMAIN} {
reverse_proxy {$BACKEND}
}Why: Charon doesn't know what your environment variables are.
Solution: Replace them with actual values before importing.
import snippets/common.caddyWhy: Charon needs the full config in one file.
Solution: Combine all files into one before importing.
Remove unsupported directives before importing. Focus on just the reverse_proxy parts.
Import a single site first to make sure it works. Then import the rest.
Don't delete your original Caddyfile. Keep it as a backup just in case.
Always check the preview carefully. Make sure addresses and ports are correct.
Problem: Your Caddyfile only has file servers or other unsupported features.
Solution: Add at least one reverse_proxy directive or add sites manually through the UI.
Problem: Your Caddyfile has syntax errors.
Solution:
- Run
caddy validate --config Caddyfileon your server - Fix any errors it reports
- Try importing again
Problem: Some sites have unsupported features.
Solution: Import what works, add the rest manually through the UI.
Once imported, you can:
- Edit any proxy host through the UI
- Add SSL certificates (automatic with Let's Encrypt)
- Add security features
- Delete ones you don't need
Everything is now managed by Charon!
NPM import is planned for a future update. For now:
- Export your NPM config (if possible)
- Look at which domains point where
- Add them manually through Charon's UI (it's pretty quick)
Ask on GitHub Discussions — Bring your Caddyfile and we'll help you figure out how to import it.