Skip to main content
RapidDev - Software Development Agency
bolt-ai-integrationsDevelopment Workflow

How to Integrate Bolt.new with Let's Encrypt

For most Bolt.new deployments, SSL certificates are handled automatically — Bolt Cloud, Netlify, and Vercel all provision free SSL certificates (often from Let's Encrypt) without any manual setup. You only need to interact with Let's Encrypt directly when self-hosting an exported Bolt app on a VPS, Docker container, or bare server. In that case, use Certbot to automatically obtain and renew certificates via the ACME protocol.

What you'll learn

  • Why you almost never need to manually configure Let's Encrypt for Bolt.new deployments
  • How SSL is automatically provisioned on Bolt Cloud, Netlify, and Vercel
  • How to set up Let's Encrypt with Certbot when self-hosting an exported Bolt app
  • How to configure nginx with SSL for a self-hosted Bolt.new application
  • How to automate certificate renewal so your site never goes down due to an expired certificate
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate15 min read10 minutesOtherApril 2026RapidDev Engineering Team
TL;DR

For most Bolt.new deployments, SSL certificates are handled automatically — Bolt Cloud, Netlify, and Vercel all provision free SSL certificates (often from Let's Encrypt) without any manual setup. You only need to interact with Let's Encrypt directly when self-hosting an exported Bolt app on a VPS, Docker container, or bare server. In that case, use Certbot to automatically obtain and renew certificates via the ACME protocol.

SSL Certificates for Bolt.new Apps: Automatic vs Manual Setup

Let's Encrypt is a free Certificate Authority (CA) that issues SSL/TLS certificates automatically via the ACME protocol. It powers HTTPS on millions of websites and is integrated into virtually every modern hosting platform, including the ones Bolt.new deploys to. The result for most Bolt.new developers: you get HTTPS automatically, without ever touching a certificate file, visiting letsencrypt.org, or running a terminal command.

When you deploy to Bolt Cloud (bolt.host), SSL is provisioned instantly as part of the deployment. When you connect a custom domain, Bolt Cloud automatically obtains and renews the certificate. The same applies to Netlify — every site on *.netlify.app has valid HTTPS, and when you add a custom domain, Netlify provisions a Let's Encrypt certificate automatically within minutes. Vercel, Cloudflare Pages, Railway, Render, and virtually every modern hosting platform handles this identically.

You only need to manually interact with Let's Encrypt in one scenario: self-hosting an exported Bolt.new app on a Linux VPS, bare metal server, or Docker container where no managed hosting platform handles certificate provisioning for you. This is uncommon for Bolt.new users — most use Bolt Cloud or Netlify — but it comes up for teams with infrastructure constraints, cost optimization for high-traffic apps, or enterprise deployments with specific compliance requirements. This guide covers both the automatic path (what to expect from managed platforms) and the manual Certbot setup for self-hosted deployments.

Integration method

Development Workflow

Let's Encrypt integration for Bolt.new projects is almost always automatic. When deploying to Bolt Cloud, Netlify, or Vercel, SSL certificates are provisioned and renewed without any developer action. Let's Encrypt only requires manual configuration when self-hosting exported Bolt apps on VPS servers or Docker deployments, where Certbot automates certificate issuance and 90-day renewal via cron job.

Prerequisites

  • A deployed Bolt.new app — either on Bolt Cloud, Netlify (for automatic SSL), or a VPS (for manual Certbot setup)
  • A registered domain name pointed to your server's IP address via A record (required for any custom domain SSL)
  • For self-hosted setup: a Linux VPS with Ubuntu 20.04+ or Debian 11+, nginx installed, and SSH access
  • For Docker setup: Docker and Docker Compose installed on the host server
  • Basic familiarity with DNS records — SSL certificates are domain-specific and require DNS to be properly configured

Step-by-step guide

1

Understand SSL on Managed Bolt.new Hosting Platforms

Before attempting any SSL configuration, confirm whether your deployment target handles it automatically — the vast majority of Bolt.new users should stop here. Bolt Cloud (bolt.host): Every app deployed to bolt.host has HTTPS automatically. Custom domains are managed within Bolt's dashboard, and SSL certificates are provisioned as part of the domain connection process. You purchase, connect, or transfer a domain in Bolt's interface, and the certificate appears within minutes. No terminal access, no certificate files, nothing to configure. Netlify: When you deploy from Bolt to Netlify (the most common deployment path), every deployment gets a *.netlify.app URL with valid HTTPS. To add a custom domain, go to your Netlify site dashboard → Domain settings → Add domain. After adding your domain and configuring the DNS records Netlify specifies, Netlify automatically provisions a Let's Encrypt certificate using their automated ACME integration. The certificate is renewed automatically every 90 days with no action required from you. Vercel: If you connect your Bolt project to GitHub and deploy via Vercel, the same automatic SSL provisioning applies. Add a custom domain in the Vercel dashboard and SSL is handled identically to Netlify. Cloudflare Pages: Cloudflare uses its own CA for certificates (Universal SSL) rather than Let's Encrypt, but the result is the same — HTTPS is automatic and you never touch a certificate file. If you are using any of these platforms, you are done with SSL configuration. The remaining steps in this guide are specifically for teams self-hosting on a VPS or Docker without a managed platform.

ssl-checklist.sh
1# Verify SSL is working after Netlify deployment
2# No configuration needed just check your deployed URL
3
4# After deploying to Netlify:
5# 1. Your site is at: https://your-site-name.netlify.app (SSL automatic)
6# 2. To add custom domain: Netlify Dashboard Domain settings Add domain
7# 3. Netlify shows: "SSL certificate provisioned" within 2-5 minutes
8
9# Check SSL certificate details (optional verification)
10# Visit: https://www.ssllabs.com/ssltest/analyze.html?d=your-domain.com
11
12# For Bolt Cloud custom domains:
13# Bolt Dashboard your project Settings Domains Connect domain
14# SSL is provisioned automatically as part of domain setup

Pro tip: If your custom domain on Netlify or Bolt Cloud shows a certificate error after adding it, the DNS records may not have fully propagated yet. DNS propagation can take up to 24 hours, though it typically completes within 30 minutes. Use https://dnschecker.org to verify your A record or CNAME is pointing to the correct server before troubleshooting SSL.

Expected result: You confirm that your deployment platform (Bolt Cloud, Netlify, Vercel) handles SSL automatically. No Let's Encrypt configuration is required for managed deployments.

2

Set Up Certbot for Self-Hosted VPS Deployment

If you are self-hosting an exported Bolt.new app on a Linux VPS, use Certbot — the official Let's Encrypt client — to obtain and automatically renew SSL certificates. Certbot is developed by the Electronic Frontier Foundation (EFF) and is the recommended tool for Let's Encrypt on Linux servers. First, ensure your domain's DNS A record points to your VPS's public IP address. Certbot verifies domain ownership by placing a temporary file at a well-known URL on your server (HTTP-01 challenge), so the domain must be publicly accessible on port 80 before running Certbot. Verify this by browsing to http://your-domain.com and confirming you see your site (or nginx's default page). Install Certbot using snap (the recommended installation method as of 2024): sudo snap install --classic certbot. Then create a symlink: sudo ln -s /snap/bin/certbot /usr/bin/certbot. Run certbot --nginx to automatically detect your nginx server blocks, obtain certificates, and update the nginx configuration to enable HTTPS. Certbot asks which domains to add SSL to (it reads from your nginx config) and whether to redirect HTTP to HTTPS (choose yes for the redirect). The certificate files are stored in /etc/letsencrypt/live/your-domain.com/. For automated renewal, Certbot installs a systemd timer (certbot.timer) that runs twice daily and renews certificates that expire within 30 days. You can verify the timer is active with systemctl status certbot.timer. Test renewal with a dry-run: certbot renew --dry-run. Let's Encrypt certificates expire after 90 days, so renewal runs long before expiry with the default 30-day threshold. After Certbot completes, reload nginx to apply the updated configuration: sudo systemctl reload nginx. Your site should now be accessible on HTTPS with a valid Let's Encrypt certificate. The full setup from a fresh server to working HTTPS typically takes about 10 minutes.

setup-ssl.sh
1#!/bin/bash
2# Let's Encrypt / Certbot setup for self-hosted Next.js app
3# Run on Ubuntu 20.04+ VPS with nginx already installed
4
5# Step 1: Install Certbot via snap (recommended method)
6sudo snap install --classic certbot
7sudo ln -s /snap/bin/certbot /usr/bin/certbot
8
9# Step 2: Obtain certificate and configure nginx automatically
10# Certbot reads your nginx config and asks which domains to secure
11sudo certbot --nginx
12
13# Or specify domain directly (skip interactive prompts):
14sudo certbot --nginx -d your-domain.com -d www.your-domain.com
15
16# Step 3: Verify automatic renewal is configured
17sudo systemctl status certbot.timer
18
19# Step 4: Test renewal process (dry run - no changes made)
20sudo certbot renew --dry-run
21
22# Step 5: Reload nginx to apply SSL configuration
23sudo systemctl reload nginx
24
25# Step 6: Verify SSL is working
26curl -I https://your-domain.com
27# Should show: HTTP/2 200

Pro tip: If Certbot fails with 'Connection refused' or 'Challenge failed', ensure port 80 is open in your server's firewall (sudo ufw allow 80 on Ubuntu). Certbot needs port 80 to complete the HTTP-01 domain ownership challenge, even when your final goal is HTTPS-only.

Expected result: Certbot has obtained a Let's Encrypt certificate for your domain. Your site is accessible on HTTPS, nginx redirects HTTP to HTTPS, and automatic renewal is configured via systemd timer.

3

Configure nginx for a Self-Hosted Next.js App

When self-hosting an exported Bolt.new Next.js app on a VPS, nginx acts as a reverse proxy that handles HTTPS termination and forwards requests to your Node.js application running on a port like 3000. Certbot from the previous step handles the certificate — this step covers the nginx configuration that makes your Next.js app work behind nginx with SSL. The nginx configuration for a Next.js app has two server blocks: the HTTP block (port 80) that redirects all traffic to HTTPS, and the HTTPS block (port 443) that proxies requests to your Node.js process. Key nginx settings for Next.js: enable proxy_pass to localhost:3000 (or whatever port your app runs on), set proxy_set_header to pass the original host and IP through to your Node app, enable HTTP/2 for better performance with h2 in the listen directive, and configure proper cache headers for Next.js static files (the /_next/static/ path). To keep your Next.js process running, use PM2 (a Node.js process manager): install with npm install -g pm2, start your app with pm2 start 'npm run start' --name 'myapp', and enable startup persistence with pm2 startup and pm2 save. PM2 automatically restarts your app if it crashes and on server reboots. For a complete Bolt.new Next.js deployment: export the project from Bolt (Dev Mode → Download ZIP), transfer to your VPS via scp or rsync, install dependencies with npm install, build with npm run build, and start with pm2. The entire flow from Bolt export to a running HTTPS server takes about 20-30 minutes including DNS propagation wait time. After the initial setup, updates are as simple as transferring the new build and restarting PM2.

/etc/nginx/sites-available/myapp.conf
1# /etc/nginx/sites-available/myapp.conf
2# Nginx configuration for self-hosted Next.js app with Let's Encrypt SSL
3# Run: sudo ln -s /etc/nginx/sites-available/myapp.conf /etc/nginx/sites-enabled/
4# Then: sudo nginx -t && sudo systemctl reload nginx
5
6# HTTP redirect to HTTPS
7server {
8 listen 80;
9 server_name your-domain.com www.your-domain.com;
10 return 301 https://$server_name$request_uri;
11}
12
13# HTTPS server block
14server {
15 listen 443 ssl http2;
16 server_name your-domain.com www.your-domain.com;
17
18 # SSL certificates from Certbot (auto-configured by certbot --nginx)
19 ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
20 ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;
21 include /etc/letsencrypt/options-ssl-nginx.conf;
22 ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
23
24 # Proxy to Next.js app running on port 3000
25 location / {
26 proxy_pass http://localhost:3000;
27 proxy_http_version 1.1;
28 proxy_set_header Upgrade $http_upgrade;
29 proxy_set_header Connection 'upgrade';
30 proxy_set_header Host $host;
31 proxy_set_header X-Real-IP $remote_addr;
32 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
33 proxy_set_header X-Forwarded-Proto $scheme;
34 proxy_cache_bypass $http_upgrade;
35 }
36
37 # Cache Next.js static assets
38 location /_next/static/ {
39 proxy_pass http://localhost:3000;
40 add_header Cache-Control "public, max-age=31536000, immutable";
41 }
42
43 # Security headers
44 add_header X-Frame-Options DENY;
45 add_header X-Content-Type-Options nosniff;
46 add_header Referrer-Policy strict-origin-when-cross-origin;
47}

Pro tip: When Certbot runs with --nginx, it modifies your nginx config to add SSL certificate paths automatically. If you have already set up the nginx config manually with certificate paths, run certbot --nginx --cert-name your-domain.com to update only the renewal configuration without overwriting your manual config changes.

Expected result: Nginx is configured with SSL, proxying HTTPS traffic to your Next.js app on port 3000. HTTP requests are redirected to HTTPS automatically. Your site passes an SSL Labs test with grade A or A+.

4

Docker Deployment with Caddy for Automatic HTTPS

For Docker-based self-hosting, Caddy is often a better choice than nginx + Certbot because Caddy has built-in ACME support — it automatically obtains and renews Let's Encrypt certificates with zero configuration beyond specifying your domain name. This eliminates the need to run Certbot as a separate process or cron job. The Docker Compose setup for a Bolt.new Next.js app with Caddy consists of two services: the Next.js application and Caddy as the reverse proxy. The Caddyfile (Caddy's configuration file) is remarkably simple — you just specify your domain name and the upstream service, and Caddy handles everything else, including HTTP-to-HTTPS redirect, HTTPS certificate via Let's Encrypt, and HTTP/2. To use Caddy's automatic HTTPS, your server must be publicly accessible on ports 80 and 443, and your domain's DNS must point to the server's IP. Caddy performs the same ACME HTTP-01 challenge as Certbot during certificate issuance. Certificates are stored in a Docker volume so they persist across container restarts. Caddy renews certificates automatically when they are within 30 days of expiry — no cron job needed. For the Next.js app container, use Node.js 20 Alpine as the base image for a minimal production image. The multi-stage Dockerfile (build stage + runtime stage) keeps the final image small by excluding development dependencies and source files. Environment variables for the Next.js app (Supabase URL, API keys, etc.) are passed via the Docker Compose environment section or a .env file — these correspond to the same variables in your Bolt.new .env file.

docker-compose.yml
1# docker-compose.yml
2# Bolt.new Next.js app with Caddy automatic HTTPS
3
4version: '3.8'
5
6services:
7 app:
8 build:
9 context: .
10 dockerfile: Dockerfile
11 restart: unless-stopped
12 environment:
13 - NODE_ENV=production
14 - NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL}
15 - NEXT_PUBLIC_SUPABASE_ANON_KEY=${NEXT_PUBLIC_SUPABASE_ANON_KEY}
16 expose:
17 - "3000"
18
19 caddy:
20 image: caddy:2-alpine
21 restart: unless-stopped
22 ports:
23 - "80:80"
24 - "443:443"
25 volumes:
26 - ./Caddyfile:/etc/caddy/Caddyfile
27 - caddy_data:/data # Stores Let's Encrypt certificates
28 - caddy_config:/config
29 depends_on:
30 - app
31
32volumes:
33 caddy_data:
34 caddy_config:
35
36---
37# Caddyfile
38# Replace 'your-domain.com' with your actual domain
39# Caddy automatically gets Let's Encrypt SSL for this domain
40
41your-domain.com {
42 reverse_proxy app:3000
43}
44
45---
46# Dockerfile
47# Multi-stage build for Next.js
48FROM node:20-alpine AS builder
49WORKDIR /app
50COPY package*.json ./
51RUN npm ci --only=production
52COPY . .
53RUN npm run build
54
55FROM node:20-alpine AS runner
56WORKDIR /app
57ENV NODE_ENV=production
58COPY --from=builder /app/.next ./.next
59COPY --from=builder /app/public ./public
60COPY --from=builder /app/package*.json ./
61COPY --from=builder /app/node_modules ./node_modules
62EXPOSE 3000
63CMD ["npm", "start"]

Pro tip: Caddy stores Let's Encrypt certificates in the caddy_data Docker volume. Do not delete this volume — losing the certificate storage causes Caddy to re-issue certificates on next startup, and Let's Encrypt rate-limits issuance to 5 certificates per domain per week. Back up the caddy_data volume as part of your server backup routine.

Expected result: Docker Compose starts both services. Caddy automatically obtains a Let's Encrypt certificate for your domain on first startup. Your Next.js app is accessible on HTTPS with automatic HTTP-to-HTTPS redirect.

Common use cases

Deploy to Netlify with Automatic SSL

The standard Bolt.new deployment path: connect to Netlify through Bolt's publish settings, deploy the app, add a custom domain in Netlify's domain settings, and Netlify automatically provisions a Let's Encrypt certificate. Zero SSL configuration required — Netlify handles issuance, installation, and renewal automatically.

Bolt.new Prompt

Copy this prompt to try it in Bolt.new

Self-Host Exported Bolt App with nginx and Let's Encrypt

Export a Bolt.new project as a ZIP, deploy it to a VPS (DigitalOcean, Linode, Hetzner), set up nginx as the web server, and use Certbot to obtain and auto-renew a Let's Encrypt certificate. Full control over the server environment with free SSL.

Bolt.new Prompt

Copy this prompt to try it in Bolt.new

Docker Deployment with Automatic HTTPS

Run a Bolt.new-exported Next.js app in Docker with Caddy as the reverse proxy. Caddy includes built-in Let's Encrypt integration — it automatically obtains and renews certificates when a domain is pointed to the server. The simplest path to self-hosted HTTPS with Docker.

Bolt.new Prompt

Copy this prompt to try it in Bolt.new

Troubleshooting

Certbot fails with 'Challenge failed' or 'Connection refused' error

Cause: Port 80 is blocked by the server's firewall, preventing the ACME HTTP-01 challenge from completing. Certbot needs port 80 accessible to verify domain ownership.

Solution: Open port 80 in your firewall (sudo ufw allow 80 on Ubuntu), verify port 80 is open with sudo ufw status, and run Certbot again. If nginx is running, temporarily stop it (sudo systemctl stop nginx) before running Certbot in standalone mode, then restart it after.

typescript
1# Fix firewall to allow Certbot challenge
2sudo ufw allow 80
3sudo ufw allow 443
4sudo ufw status
5
6# If using a VPS, also check the hosting provider's firewall
7# (DigitalOcean Firewall, AWS Security Group, etc.)

SSL certificate shows as expired despite Certbot being installed

Cause: The Certbot automatic renewal service (certbot.timer) is not running, or the renewal failed silently due to domain validation errors (DNS changed, port 80 blocked).

Solution: Check Certbot renewal status with sudo systemctl status certbot.timer. If not active, enable it with sudo systemctl enable certbot.timer && sudo systemctl start certbot.timer. Run sudo certbot renew --dry-run to test and see any error messages. Check renewal logs at /var/log/letsencrypt/letsencrypt.log for failure details.

typescript
1# Check and fix Certbot renewal
2sudo systemctl status certbot.timer
3sudo systemctl enable certbot.timer
4sudo systemctl start certbot.timer
5sudo certbot renew --dry-run
6# View renewal logs
7sudo tail -50 /var/log/letsencrypt/letsencrypt.log

Custom domain on Netlify shows 'SSL certificate is not yet provisioned' error

Cause: The domain's DNS records have not fully propagated to Netlify's DNS servers yet. Netlify cannot provision the SSL certificate until it can verify domain ownership via DNS.

Solution: Wait 15-30 minutes for DNS propagation after adding the domain. Verify your DNS records are correct using https://dnschecker.org — the domain should resolve to Netlify's load balancer IP. In Netlify dashboard → Domain settings, click 'Renew certificate' to manually trigger a new certificate provisioning attempt after DNS propagates.

Best practices

  • Use Bolt Cloud or Netlify for deployment — both handle SSL automatically without any certificate management on your part, and for most Bolt.new projects there is no reason to self-host
  • Always redirect HTTP to HTTPS — never serve your application over unencrypted HTTP in production, even for internal tools
  • Use Caddy instead of nginx + Certbot for Docker deployments — Caddy's built-in ACME support eliminates the separate certificate renewal infrastructure entirely
  • Back up the Let's Encrypt certificate storage volume (caddy_data or /etc/letsencrypt/) in your server backup routine — certificates are rate-limited at 5 per domain per week and losing them requires waiting for the rate limit to reset
  • Monitor certificate expiry with a monitoring service like UptimeRobot or BetterStack — both send SSL expiry alerts in addition to uptime monitoring
  • Set up a second subdomain (like www.your-domain.com) alongside your apex domain when requesting certificates — Certbot and Caddy both support multiple domains on one certificate

Alternatives

Frequently asked questions

Do I need to configure Let's Encrypt when deploying a Bolt.new app to Netlify?

No. Netlify handles SSL automatically for all deployments — both *.netlify.app subdomains and custom domains. When you add a custom domain in Netlify's domain settings, Netlify provisions a Let's Encrypt certificate automatically within a few minutes after DNS propagation. You never need to run Certbot, generate certificate files, or configure anything SSL-related.

When do Bolt.new developers actually need to use Let's Encrypt directly?

Only when self-hosting an exported Bolt.new app on a VPS or bare server without a managed hosting platform. This scenario comes up for teams with compliance requirements that prevent using third-party hosting, cost optimization for very high traffic apps, or organizations that must keep data on their own infrastructure. For the vast majority of Bolt.new projects, managed platforms (Bolt Cloud, Netlify, Vercel) handle SSL completely automatically.

How long do Let's Encrypt certificates last?

Let's Encrypt certificates expire after 90 days. This is intentionally shorter than traditional certificates (1-2 years) to encourage automation and reduce the window of exposure if a certificate is compromised. Certbot and Caddy both handle renewal automatically — Certbot runs twice daily and renews certificates expiring within 30 days, so in practice your certificates are renewed every 60 days with 30 days of buffer.

Can I use Let's Encrypt for a Bolt.new app in development?

Let's Encrypt certificates require a publicly accessible domain — they cannot be issued for localhost, private IP addresses, or internal hostnames. For local development, use Bolt's WebContainer preview (which uses HTTPS automatically via its webcontainer-api.io domain) or mkcert to create locally-trusted self-signed certificates. Let's Encrypt is only relevant for publicly deployed production domains.

What is the Let's Encrypt rate limit I should be aware of?

Let's Encrypt limits certificate issuance to 50 certificates per registered domain per week, and 5 duplicate certificates per domain per week. For most Bolt.new projects with one domain, this limit is never hit. It becomes relevant when scripting automated deployments that might accidentally issue duplicate certificates, or when losing certificate storage and re-issuing repeatedly. Caddy's Docker volume persistence and Certbot's certificate renewal (rather than re-issuance) both prevent hitting rate limits.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.