Skip to content

Deployment Overview of Docuseal on Server

Prerequisites and Basic Requirements

To deploy Docuseal on the server, the following requirements must be met:

  • Operating System: Linux distribution compatible with Docker and Docker Compose.

  • Privileges: Root access or a user with sudo privileges to manage Docker services and firewall rules.

  • Domain: A valid domain name or subdomain pointing to the server's IP address.

  • Ports: TCP ports 80 and 443 must be available for external access.

FQDN of the Final Panel

The application is accessible via the following Fully Qualified Domain Name (FQDN) format:

  • docuseal<Server ID>.hostkey.in:443

Replace <Server ID> with the specific identifier assigned to the server instance. The application listens on port 443 for HTTPS traffic.

File and Directory Structure

The deployment utilizes the following directory structure for configuration files and data storage:

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

  • /opt/docuseal/Caddyfile: Reverse proxy configuration for Caddy.

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

  • Docker Volumes:

  • docuseal_data: Stores application data.

  • postgres_data: Stores PostgreSQL database files.

  • caddy_data: Stores Caddy data and certificates.

  • caddy_config: Stores Caddy configuration files.

Application Installation Process

The application is deployed using Docker Compose. The installation process involves the following steps:

  1. Create the necessary directories at /opt/docuseal.

  2. Generate the Caddyfile and compose.yml configuration files.

  3. Create the required Docker volumes: docuseal_data, postgres_data, caddy_data, and caddy_config.

  4. Execute the Docker Compose command to start the services.

The deployment uses the following Docker images:

  • docuseal/docuseal:latest for the main application.

  • postgres:15 for the database.

  • caddy:latest for the reverse proxy and SSL termination.

Access Rights and Security

Firewall rules are configured to allow external traffic on specific ports:

  • Port 80 (TCP): Enabled for HTTP traffic.

  • Port 443 (TCP): Enabled for HTTPS traffic.

These rules are applied to the public zone of the firewall to ensure secure external access.

Databases

The application uses a PostgreSQL database with the following configuration:

  • Image: postgres:15

  • Database Name: docuseal

  • User: postgres

  • Connection Method: Internal Docker network connection.

  • Storage Location: Data is persisted in the postgres_data Docker volume mounted at /var/lib/postgresql/data.

  • Health Check: The database performs a health check using pg_isready -U postgres every 5 seconds with a timeout of 5 seconds and 5 retries.

Docker Containers and Their Deployment

The deployment consists of three main containers defined in the compose.yml file:

Container Name Image Description
app docuseal/docuseal:latest Main Docuseal application service.
postgres postgres:15 PostgreSQL database service.
caddy caddy:latest Reverse proxy handling SSL and routing.

The app container depends on the postgres container being healthy before starting. All containers are configured with restart policies to ensure high availability.

Proxy Servers

Caddy is used as the reverse proxy server to handle incoming traffic and SSL termination:

  • Configuration File: /opt/docuseal/Caddyfile

  • Function: Routes traffic from the external domain to the internal app service on port 3000.

  • SSL: Automatically manages SSL certificates for the configured domain.

  • Ports:

  • 80 (TCP): HTTP

  • 443 (TCP): HTTPS

  • 443 (UDP): HTTPS (QUIC support)

The Caddy container mounts the configuration file from /opt/docuseal/Caddyfile to /etc/caddy/Caddyfile inside the container.

Permission Settings

File and directory permissions are set as follows:

  • /opt/docuseal: Owner root, Group root, Mode 0755.

  • /opt/docuseal/Caddyfile: Owner root, Group root, Mode 0644.

  • /opt/docuseal/compose.yml: Owner root, Group root, Mode 0644.

Docker volumes are managed by the Docker daemon and do not require manual permission adjustments on the host filesystem.

Location of Configuration Files and Data

Configuration files and data are located in the following paths:

  • Configuration Directory: /opt/docuseal

  • Caddyfile: Proxy configuration.

  • compose.yml: Service definitions.

  • Data Volumes:

  • docuseal_data: Application data.

  • postgres_data: Database storage.

  • caddy_data: Caddy data.

  • caddy_config: Caddy configuration.

Available Ports for Connection

The following ports are available for external and internal connections:

Port Protocol Description
80 TCP HTTP (Redirected to HTTPS by Caddy)
443 TCP HTTPS (Secure access to Docuseal)
443 UDP HTTPS (QUIC support)
3000 TCP Internal application port (not exposed externally)
5432 TCP Internal PostgreSQL port (not exposed externally)

Starting, Stopping, and Updating

Service management is handled via Docker Compose commands executed from the /opt/docuseal directory:

  • Start Services:

    cd /opt/docuseal
    docker compose up -d
    

  • Stop Services:

    cd /opt/docuseal
    docker compose down
    

  • Update Services: To update the application, pull the latest images and restart the containers:

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

  • View Logs:

    cd /opt/docuseal
    docker compose logs -f
    

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