/bolt.new-ai-integrations

Bolt.new AI and Let's Encrypt integration: Step-by-Step Guide 2025

Learn how to integrate Bolt.new AI with Let's Encrypt. Follow our step-by-step guide to secure your AI workflow with SSL encryption.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free No-Code consultation

How to integrate Bolt.new AI with Let's Encrypt?

 

Adding Dependency Configuration in Your Project

 
  • Create (or if it already exists, open) your project's package.json file.
  • Add the required dependencies for Express and Let's Encrypt integration by including greenlock-express in your dependency list. Since Bolt.new AI does not allow terminal installations, ensure the dependency is specified here.
  • Include the following configuration inside your package.json:
    • 
      {
        "name": "bolt-new-ai-app",
        "version": "1.0.0",
        "main": "server.js",
        "dependencies": {
          "express": "^4.17.1",
          "greenlock-express": "^4.0.3"
        }
      }
            

 

Creating the Server File for Let's Encrypt Integration

 
  • Create a new file named server.ts in the root directory of your Bolt.new AI project.
  • This file will be the entry point for your application and will handle HTTPS using Let's Encrypt certificates via the greenlock-express package.
  • Paste the following code into server.ts:
    • 
      import express from 'express';
      import * as GreenlockExpress from 'greenlock-express';
      
      

      const app = express();

      // Your application routes
      app.get('/', (req, res) => {
      res.send("Hello, secure world with Let's Encrypt!");
      });

      // Configure Greenlock for automatic SSL certificate generation/renewal
      const greenlock = GreenlockExpress.create({
      // ACME server version, using draft-11 for current Let's Encrypt support
      version: 'draft-11',
      // Directory to store configuration & certificates; ensure the directory exists or Greenlock will create it
      configDir: './greenlock.d',
      // Contact email for important account notifications
      email: 'your-email@example.com',
      // Automatically agree to the Let's Encrypt Subscriber Agreement
      agreeTos: true,
      // Whether to run Greenlock as a community member (set false if you do not want telemetry)
      communityMember: false,
      // List the domains you want to secure with Let's Encrypt
      approveDomains: ['yourdomain.com']
      });

      // Start the server: listen on HTTP port 80 and HTTPS port 443
      greenlock.listen(80, 443, () => {
      console.log("Server is running and SSL certificates are managed by Let's Encrypt");
      });



 

Integrating the Server File into Bolt.new AI Project

 
  • If your Bolt.new AI project already has an entry point, update its configuration to point to server.ts as the main file.
  • If you usually run a specific command to launch your project, modify it to compile the TypeScript code (if necessary) and then run the resulting JavaScript file. For example, if your project automatically transpiles using a built-in process, ensure that server.ts is included.
  • Add or update the run script in your package.json if needed. For example:
    • 
      "scripts": {
        "start": "tsc && node build/server.js"
      }
              
    (Adjust paths based on your project setup.)

 

Final Checks and Testing Your Secure Server

 
  • Double-check that you have replaced [email protected] and yourdomain.com with your actual email and domain name in the server.ts file.
  • Ensure your project is set to compile TypeScript if it isn’t already configured. Bolt.new AI may handle this automatically if a build configuration is provided.
  • Click the Run button in Bolt.new AI. Your application should start on HTTP port 80 and HTTPS port 443, and Greenlock will handle acquiring and renewing Let's Encrypt certificates.
  • Monitor the console output to verify that the server starts successfully and that certificate management is active.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022