Skip to content

Web server for serving necessary files for passing ACME challenge from Lets Encrypt.

Notifications You must be signed in to change notification settings

Juansecu/letsencrypt-acme-challenge-server

Repository files navigation

Let's Encrypt ACME Challenge Server

This is a simple server that can be used to serve ACME challenge requests for Let's Encrypt.

Requirements

  • Node.js - Version 20

  • Environment variables:

    • LETSENCRYPT_CHALLENGE - The challenge string that Let's Encrypt will request.

Running

Using Docker (Recommended)

In order to run the application using Docker, you must have Docker installed on your machine.

For running the application with Docker, you will need to map port 80 to your host machine.

Docker CLI

  • Windows

    > docker run -dp 8080:8080 \
        -e LETSENCRYPT_CHALLENGE="<Let's Encrypt challenge string>" \
        --name <container-name> \
        juansecu/letsencrypt-acme-challenge-server:v<version number>
  • MacOS/Linux

    $ docker run -dp 8080:8080 \
        -e LETSENCRYPT_CHALLENGE="<Let's Encrypt challenge string>" \
        --name <container-name> \
        juansecu/letsencrypt-acme-challenge-server:v<version number>

Docker Compose

For running the application with Docker Compose, you can use the Docker Compose file provided in this repository for development and production, but for production, you will also need to remove the build property from the http-server service, change the image property to juansecu/letsencrypt-acme-challenge-server:v<version number>.

You can run the application using the following command:

  • Docker Compose v1
$ docker-compose up -d
  • Docker Compose v2
$ docker compose up -d

Using Node.js

For running the application with Node.js, you will need to set the necessary environment variables and follow the instructions below.

For Development

In order to run the application for development, you will need to clone this repository and run it using the following commands:

  • Windows

    # --- INSTALLING DEPENDENCIES ---
    > npm install
    
    # --- RUNNING ---
    > npm run dev
  • MacOS/Linux

    # --- INSTALLING DEPENDENCIES ---
    $ npm install
    
    # --- RUNNING ---
    $ npm run dev

For Production

In order to run the application for production, you will only need to download the latest release from the releases page, set the necessary environment variables and run the application using the following commands:

  • Windows

    # --- INSTALLING DEPENDENCIES ---
    > npm install --production
    
    # --- RUNNING ---
    > npm start
  • MacOS/Linux

    # --- INSTALLING DEPENDENCIES ---
    $ npm install --production
    
    # --- RUNNING ---
    $ npm start

About

Web server for serving necessary files for passing ACME challenge from Lets Encrypt.

Resources

Stars

Watchers

Forks

Packages

No packages published