DNS & TLS
lnkify requires four hostnames pointed at your server. Caddy handles TLS automatically — no manual certificate management is needed.
Required DNS Records
Create A records (and optionally AAAA records for IPv6) pointing all four hostnames to your server's public IP address:
| Type | Name | Value |
|---|---|---|
| A | lnkify.io | <your-server-ip> |
| A | app.lnkify.io | <your-server-ip> |
| A | mcp.lnkify.io | <your-server-ip> |
| A | docs.lnkify.io | <your-server-ip> |
If you're using a subdomain (e.g., ln.example.com), adjust accordingly:
| Type | Name | Value |
|---|---|---|
| A | ln.example.com | <your-server-ip> |
| A | app.ln.example.com | <your-server-ip> |
| A | mcp.ln.example.com | <your-server-ip> |
| A | docs.ln.example.com | <your-server-ip> |
Configuring DNS at Your Provider
Cloudflare
- Go to your domain's DNS settings.
- Add four A records with the names above, pointing to your server IP.
- Set Proxy status to DNS only (gray cloud). The orange cloud (proxied) will interfere with Let's Encrypt HTTP challenges.
- TTL can be set to Auto.
AWS Route 53
- Open the hosted zone for your domain.
- Click Create record → Simple routing.
- For each subdomain, create an A record with your server IP as the value.
- TTL: 300 (5 minutes) is reasonable for initial setup; increase later.
Namecheap (or similar registrars)
- Go to Domain List → Manage → Advanced DNS.
- Add four A Record entries with Host set to
@(for apex),app,mcp, anddocs, and Value set to your server IP. - TTL: Automatic or 5 minutes.
Verifying DNS
Use dig or nslookup to confirm DNS propagation:
dig lnkify.io +short
dig app.lnkify.io +short
dig mcp.lnkify.io +short
dig docs.lnkify.io +shortEach should return your server's IP address. DNS propagation can take anywhere from a few minutes to 48 hours, though most providers update within minutes.
Firewall Configuration
Ensure your server's firewall allows inbound traffic on ports 80 and 443:
# UFW (Ubuntu)
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
# firewalld (CentOS/RHEL)
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd --reloadAlso verify your hosting provider's network-level firewall (e.g., AWS Security Groups, DigitalOcean Cloud Firewall) allows these ports.
How TLS Works
When Caddy starts, it:
- Receives a request for
https://lnkify.io. - Checks its certificate storage (
caddy_datavolume) for a valid certificate. - If no valid certificate exists, Caddy initiates an ACME challenge with Let's Encrypt:
- HTTP-01 challenge: Let's Encrypt makes a request to
http://lnkify.io/.well-known/acme-challenge/.... Caddy responds with the challenge token, proving domain ownership. - TLS-ALPN-01 challenge: Used as a fallback on port 443.
- HTTP-01 challenge: Let's Encrypt makes a request to
- On success, Let's Encrypt issues a certificate. Caddy stores it in
caddy_dataand serves HTTPS. - Certificates auto-renew 30 days before expiry. Caddy runs a background goroutine that checks expiry daily.
No manual intervention is required for the entire certificate lifecycle.
TLS Certificate Storage
Certificates, account keys, and OCSP staples are stored in the caddy_data Docker volume:
docker volume inspect lnkify_caddy_dataThis volume persists across docker compose down and docker compose up. To reset certificates (e.g., if switching domains), remove the volume:
docker compose down
docker volume rm lnkify_caddy_dataTesting TLS
Verify your TLS setup with curl:
curl -vI https://lnkify.ioLook for:
SSL connection using TLSv1.3(or TLSv1.2)subject: CN=lnkify.ioin the certificate chain- A
200 OKor301 Moved Permanentlyresponse
Test certificate expiry:
echo | openssl s_client -servername lnkify.io -connect lnkify.io:443 2>/dev/null | openssl x509 -noout -datesdocs.lnkify.io TLS
The documentation site receives the same automatic TLS treatment. Caddy handles the certificate for docs.lnkify.io identically to the main domain. No additional configuration is needed.
Troubleshooting TLS
If Caddy cannot obtain a certificate:
- DNS not propagated — Wait and retry. Use
digto confirm. - Port 80 blocked — Let's Encrypt HTTP-01 challenges require port 80 to be reachable from the internet.
- Firewall — Double-check host and network firewalls.
- Rate limiting — Let's Encrypt has rate limits. If you've requested many certificates recently, wait an hour before retrying.
- Check Caddy logs —
docker compose logs caddy | grep -i error
Next: Reverse Proxy