Skip to main content

Domains & SSL

POST /api/domains/enable-ssl

Enables Let's Encrypt SSL for a domain already registered in the srvly dashboard.

Request Body​

{
"domainId": "uuid-of-the-domain-record"
}

Fields​

FieldTypeDescription
domainIdstring (UUID)ID of the domain record from the srvly Domains page

How It Works​

  1. srvly verifies DNS points to your server
  2. Configures Nginx or Caddy proxy for the domain
  3. Provisions a Let's Encrypt TLS certificate via Certbot
  4. Sets up auto-renewal via cron
  5. The domain status changes to "active" in the dashboard

Prerequisites​

  • The domain must first be added in the srvly Domains page (creates a database record)
  • The domain's DNS must point to your server's IP
  • Ports 80 and 443 must be accessible from the internet
  • The target application must already be running on the configured port

Response​

{
"success": true,
"url": "https://app.example.com",
"message": "SSL activated!"
}