Skip to content

Обзор развертывания Free Domain Certbot (Nginx Certbot) на сервере

Prerequisites

The following conditions are required for the application to function correctly:

  • An operating system with Docker installed.

  • Port management access (ports 80 and 443 must be open).

  • Superuser (root) privileges to create directories and manage containers.

FQDN of the final panel on hostkey.in domain

A dynamic domain name template is used to access the service:

Parameter Value
Prefix nginx-certbot
Domain hostkey.in
Full Template nginx-certbot{Server_ID_from_Invapi}.hostkey.in

File and Directory Structure

All primary data and configurations are concentrated in the /data/nginx/ directory:

  • /data/nginx/docker-compose.yml — Docker Compose container definition file.

  • /data/nginx/user_conf.d/ — Directory for Nginx user configurations.

  • /data/nginx/nginx-certbot.env — Environment variables file.

  • /data/nginx/user_conf.d/{prefix}{server_id}.{zone}.conf — Main server configuration file.

Application Installation Process

Deployment is performed by automatically creating the directory structure, generating configuration files based on templates, and launching the container via docker compose. During this process, a Docker volume named nginx_secrets is created to store SSL certificates.

Docker Containers and Execution

The system deploys one primary container:

Parameter Value
Image Name jonasal/nginx-certbot:latest
Ports (host:container) 80:80, 443:443
Volumes nginx_secrets:/etc/letsencrypt
./user_conf.d:/etc/nginx/user_conf.d
Environment Variables [email protected]
Restart Policy unless-stopped

Application Update

Updates are performed by executing the following command:

docker compose pull && docker compose up -d
which pulls new image versions and restarts the containers.

Permissions Settings

To ensure security, the following permissions are set for directories and files:

  • Directory /data/nginx/ and subfolders: owner root, group root, access mode 0640.

  • Configuration files (docker-compose.yml, .conf, .env): owner root, group root, access mode 0644.

Location of Configuration Files and Data

  • Nginx configuration: /data/nginx/user_conf.d/

  • Certificate data (inside Docker volume): /etc/letsencrypt inside the container.

Available Ports for Connection

Port Protocol Purpose
80 TCP HTTP (for Let's Encrypt validation)
443 TCP HTTPS (primary traffic)
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×