Skip to content

Deployment Overview of Docuseal on Server

Prerequisites and Basic Requirements

To ensure the successful deployment of Docuseal, the following requirements must be met:

  • Operating System: Compatible Linux distribution (e.g., CentOS, Rocky Linux, or AlmaLinux).

  • Privileges: Root or sudo access is required for installing dependencies and managing Docker services.

  • Network Ports: The following ports must be open and accessible via the firewall:

  • 80/tcp (HTTP)

  • 443/tcp (HTTPS)

FQDN of the final panel on the hostkey.in domain

The application is accessed via a specific Fully Qualified Domain Name (FQDN). If no custom domain is provided, the system uses a standard template based on the server ID.

Parameter Value
Prefix docuseal
Domain hostkey.in
Full template docuseal{Server_ID}.hostkey.in

File and Directory Structure

The application files, configurations, and persistent data are organized as follows:

  • /opt/docuseal/: Main application directory containing configuration files.

  • /opt/docuseal/Caddyfile: The Caddy web server configuration file.

  • /opt/docuseal/compose.yml: Docker Compose orchestration file.

  • docuseal_data: Docker volume for application data.

  • postgres_data: Docker volume for the PostgreSQL database.

  • caddy_data: Docker volume for Caddy SSL certificates and data.

  • caddy_config: Docker volume for Caddy configuration state.

Application Installation Process

The installation is performed using a combination of system configuration and container orchestration:

  1. System Preparation: The directory /opt/docuseal is created with appropriate ownership (root:root) and permissions (0755).

  2. Dependency Installation: Docker is installed on the host system to support containerized services.

  3. Configuration Generation:

  4. A Caddyfile is generated in /opt/docuseal/ to handle reverse proxying and SSL termination.

  5. A compose.yml file is generated to define the application stack.

  6. Volume Creation: Dedicated Docker volumes (docuseal_data, postgres_data, caddy_data, and caddy_config) are initialized to ensure data persistence.

  7. Service Deployment: The application stack is launched using docker compose up -d from the /opt/docuseal directory.

Access Rights and Security

  • Firewall Configuration: If the system uses firewalld, rules are automatically applied to allow inbound traffic on ports 80/tcp and 443/tcp.

  • SSL/TLS: The application is configured to force SSL via the Caddy reverse proxy.

  • Container Security: Services run within isolated Docker containers with specific internal networking settings.

Databases

Docuseal utilizes a PostgreSQL database for data storage.

Parameter Value
Database Engine postgres:15
Database Name docuseal
Connection Method Internal Docker network via postgresql://postgres:[PASSWORD]@postgres:5432/docuseal
Storage Location Persistent volume named postgres_data

Docker Containers and Their Deployment

The application is deployed as a multi-container stack defined in /opt/docuseal/compose.yml.

App Container

  • Image: docuseal/docuseal:latest

  • Ports: Exposes port 3000 internally.

  • Volumes: docuseal_data:/data/docuseal

  • Environment Variables:

  • FORCE_SSL: Set to the final domain name.

  • DATABASE_URL: Connection string for the PostgreSQL service.

  • Restart Policy: always

Database Container

  • Image: postgres:15

  • Volumes: postgres_data:/var/lib/postgresql/data

  • Environment Variables:

  • POSTGRES_USER: postgres

  • POSTGRES_PASSWORD: System-generated password.

  • POSTGRES_DB: docuseal

  • Restart Policy: always

Web Server Container (Caddy)

  • Image: caddy:latest

  • Ports: 80/tcp, 443/tcp, and 443/udp.

  • Volumes:

  • caddy_data:/data

  • caddy_config:/config

  • /opt/docuseal/Caddyfile:/etc/caddy/Caddyfile:ro (Read-only mount)

  • Restart Policy: unless-stopped

Application Update Instructions

To update the Docuseal application to the latest version, execute the following commands in the application directory:

cd /opt/docuseal
docker compose pull && docker compose up -d

Location of Configuration Files and Data

Component Path / Volume Name
Main Config Directory /opt/docuseal
Web Server Config /opt/docuseal/Caddyfile
Application Data docuseal_data (Docker Volume)
Database Data postgres_data (Docker Volume)

Available Ports for Connection

  • HTTPS: 443 (External access via Caddy)

  • HTTP: 80 (Used for SSL redirection)

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×