Skip to content

Deploying a DocuSeal App

Introduction

DocuSeal is a powerful open-source document signing and form-filling platform that provides an alternative to commercial solutions like DocuSign. Built with Ruby on Rails, DocuSeal enables you to create, send, and sign documents electronically with a clean and intuitive interface. This comprehensive guide will walk you through deploying DocuSeal on Klutch.sh using Docker, covering everything from basic setup to production-ready configurations with PostgreSQL, persistent storage, custom domains, and security best practices.

Whether you’re setting up DocuSeal for personal use, for your organization, or as a service for your customers, this guide provides step-by-step instructions for a reliable and scalable deployment.


Prerequisites

Before you begin deploying DocuSeal on Klutch.sh, ensure you have:

  • A Klutch.sh account with access to the dashboard at klutch.sh/app
  • A GitHub repository for your DocuSeal project (can be a minimal repository with just a Dockerfile)
  • Basic understanding of Docker and environment variables
  • (Optional but recommended for production) A PostgreSQL database instance
  • (Optional) A custom domain for accessing your DocuSeal instance

Project Structure

A minimal repository structure for deploying DocuSeal:

docuseal-deploy/
├── Dockerfile
├── docker-entrypoint.sh (optional)
├── .dockerignore
└── README.md

This lightweight structure is all you need to get started, as DocuSeal’s official Docker image handles most of the setup.


Understanding DocuSeal

DocuSeal is a Rails application that:

  • Runs on port 3000 by default
  • Supports both SQLite (for testing) and PostgreSQL (for production)
  • Requires persistent storage for uploaded documents, signatures, and database files
  • Uses environment variables for configuration
  • Provides a web-based UI for document management and signing workflows

1. Quick Start Dockerfile (SQLite for Testing)

This minimal Dockerfile uses the official DocuSeal image and SQLite for quick testing and development:

FROM docusealco/docuseal:latest
# Expose the default port
EXPOSE 3000
# The official image already has the correct entrypoint
CMD ["bin/rails", "server", "-b", "0.0.0.0"]

Notes:

  • This configuration uses SQLite, which stores the database as a file
  • Perfect for testing and low-traffic scenarios
  • For production deployments, PostgreSQL is strongly recommended
  • Ensure you attach a persistent volume to preserve data

2. Production Dockerfile with Custom Configuration

For production deployments with more control, use this enhanced Dockerfile:

FROM docusealco/docuseal:latest
# Install additional dependencies if needed
RUN apt-get update && apt-get install -y \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy custom entrypoint script if you have one
# COPY docker-entrypoint.sh /usr/local/bin/
# RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Set production environment
ENV RAILS_ENV=production
ENV NODE_ENV=production
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
# Start the application
CMD ["bin/rails", "server", "-b", "0.0.0.0"]

Key features:

  • Includes PostgreSQL client for database operations
  • Sets production environment variables
  • Adds health check endpoint monitoring
  • Configures the server to bind to all interfaces (0.0.0.0)

3. Essential Environment Variables

Configure these environment variables in the Klutch.sh dashboard to customize your DocuSeal deployment:

Basic Configuration

RAILS_ENV=production
SECRET_KEY_BASE=your-very-long-random-secret-key-min-128-characters
HOST=https://docuseal.example.com

Database Configuration (SQLite - Testing Only)

DATABASE_URL=sqlite3:data/production.sqlite3

Database Configuration (PostgreSQL - Production)

DATABASE_URL=postgresql://username:password@postgres-host:5432/docuseal_production

Storage Configuration

STORAGE_TYPE=local
# Or for cloud storage:
# STORAGE_TYPE=s3
# AWS_ACCESS_KEY_ID=your-access-key
# AWS_SECRET_ACCESS_KEY=your-secret-key
# AWS_REGION=us-east-1
# AWS_BUCKET=your-bucket-name

Email Configuration (SMTP)

SMTP_ADDRESS=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@example.com
SMTP_PASSWORD=your-smtp-password
SMTP_AUTHENTICATION=plain
SMTP_ENABLE_STARTTLS_AUTO=true
SMTP_FROM=noreply@example.com

Optional Configuration

# Encryption key for sensitive data (generate with: openssl rand -hex 32)
ENCRYPTION_KEY=your-64-character-hex-string
# File size limits
MAX_FILE_SIZE=10485760
# Session timeout (in seconds)
SESSION_TIMEOUT=28800
# Enable/disable user registration
DISABLE_REGISTRATION=false

Important: Never commit secrets like SECRET_KEY_BASE or DATABASE_URL to your repository. Always use Klutch.sh’s environment variable management to store sensitive values securely.

Generating SECRET_KEY_BASE:

You can generate a secure secret key using:

Terminal window
openssl rand -hex 64

This will produce a 128-character random string suitable for SECRET_KEY_BASE.


4. Persistent Storage with Volumes

DocuSeal requires persistent storage for several critical directories:

    Step 1: Identify Required Volumes

    DocuSeal needs persistent storage for:

    • Database files (if using SQLite): /app/data
    • Uploaded documents and attachments: /app/storage
    • User-uploaded assets: /app/public/uploads (if applicable)

    Step 2: Configure Volumes in Klutch.sh

    In the Klutch.sh dashboard when creating or editing your app:

    1. Navigate to the Volumes section
    2. Add persistent volumes with these mount paths:

    Primary Volume (Required):

    • Mount Path: /app/storage
    • Size: Start with 10GB, increase based on usage

    Data Volume (Required if using SQLite):

    • Mount Path: /app/data
    • Size: 5GB minimum

    Uploads Volume (Optional but recommended):

    • Mount Path: /app/public/uploads
    • Size: 5GB minimum

    Step 3: Verify Permissions

    Ensure the DocuSeal application has write permissions to these directories. The official Docker image typically handles this, but if you encounter permission issues, you may need to adjust ownership in a custom entrypoint script.

Important: Without persistent volumes, all uploaded documents, signatures, and database data will be lost when the container restarts.


5. Database Setup

SQLite (Development/Testing)

For quick testing and low-traffic deployments:

  1. Set DATABASE_URL=sqlite3:data/production.sqlite3
  2. Ensure /app/data is mounted to a persistent volume
  3. The database file will be created automatically on first run

Limitations:

  • Not suitable for concurrent users or high traffic
  • Limited query performance compared to PostgreSQL
  • No built-in backup/replication features

For production deployments, use PostgreSQL:

    Step 1: Provision PostgreSQL

    Set up a PostgreSQL database using one of these options:

    • Deploy PostgreSQL as a separate app on Klutch.sh
    • Use a managed PostgreSQL service (AWS RDS, DigitalOcean, etc.)
    • Use Klutch.sh’s database offerings if available

    Step 2: Create Database

    Connect to your PostgreSQL instance and create a database:

    CREATE DATABASE docuseal_production;
    CREATE USER docuseal_user WITH PASSWORD 'secure-password';
    GRANT ALL PRIVILEGES ON DATABASE docuseal_production TO docuseal_user;

    Step 3: Configure Connection

    Set the DATABASE_URL environment variable:

    DATABASE_URL=postgresql://docuseal_user:secure-password@postgres-host:5432/docuseal_production

    Replace:

    • docuseal_user with your database username
    • secure-password with your database password
    • postgres-host with your PostgreSQL host address
    • 5432 with your PostgreSQL port (if different)
    • docuseal_production with your database name

    Step 4: Run Migrations

    The first time DocuSeal starts with a PostgreSQL database, it will automatically run migrations to set up the schema. Monitor the logs to ensure this completes successfully.

PostgreSQL Benefits:

  • Handles concurrent users efficiently
  • Better performance for complex queries
  • Built-in backup and replication support
  • Industry-standard for production Rails applications

6. Deploying to Klutch.sh - Step by Step

Follow these detailed steps to deploy DocuSeal on Klutch.sh:

    Step 1: Prepare Your Repository

    1. Create a new GitHub repository or use an existing one
    2. Add your Dockerfile to the repository root
    3. Commit and push your changes
    Terminal window
    git init
    git add Dockerfile
    git commit -m "Add Dockerfile for DocuSeal"
    git remote add origin https://github.com/yourusername/docuseal-deploy.git
    git push -u origin main

    Step 2: Create a New App in Klutch.sh

    1. Log in to the Klutch.sh dashboard
    2. Navigate to your project or create a new one
    3. Click “Create New App” or “Deploy”
    4. Select GitHub as your Git source
    5. Choose your repository containing the Dockerfile

    Step 3: Configure Build Settings

    Klutch.sh will automatically detect your Dockerfile in the root directory:

    1. Verify the detected Dockerfile path
    2. If your Dockerfile is in a subdirectory, ensure the build context is set correctly

    Step 4: Set the Internal Port

    Since DocuSeal runs on port 3000:

    1. In the app settings, set Internal Port to 3000
    2. This tells Klutch.sh to route traffic to port 3000 in your container

    Step 5: Configure Traffic Type

    DocuSeal is a web application that uses HTTP:

    1. Select HTTP traffic type in the Klutch.sh dashboard
    2. Klutch.sh will route external traffic to your app’s internal port 3000

    Step 6: Attach Persistent Volumes

    1. Navigate to the Volumes section
    2. Click “Add Volume”
    3. Configure the primary storage volume:
      • Mount Path: /app/storage
      • Size: 10GB (adjust based on expected usage)
    4. If using SQLite, add a data volume:
      • Mount Path: /app/data
      • Size: 5GB

    Step 7: Set Environment Variables

    1. Navigate to the Environment Variables section
    2. Add all required variables (see Section 3):

    Required:

    RAILS_ENV=production
    SECRET_KEY_BASE=<your-generated-secret>
    HOST=https://your-app.klutch.sh

    Database (choose one):

    SQLite:

    DATABASE_URL=sqlite3:data/production.sqlite3

    PostgreSQL:

    DATABASE_URL=postgresql://user:password@host:5432/database

    Optional but recommended:

    SMTP_ADDRESS=smtp.gmail.com
    SMTP_PORT=587
    SMTP_USERNAME=your-email@example.com
    SMTP_PASSWORD=your-password
    SMTP_FROM=noreply@example.com
    ENCRYPTION_KEY=<your-encryption-key>
    1. Mark sensitive values (passwords, keys) as secret if the option is available

    Step 8: Deploy the App

    1. Review all settings
    2. Click “Create” or “Deploy”
    3. Klutch.sh will:
      • Pull your repository
      • Build the Docker image
      • Create persistent volumes
      • Start the container
      • Route traffic to your app

    Step 9: Monitor the Build

    1. Watch the build logs in the dashboard
    2. Look for successful database migrations
    3. Verify the application starts without errors
    4. The build should complete in 2-5 minutes depending on image size

    Step 10: Access Your DocuSeal Instance

    1. Once deployed, Klutch.sh provides a URL like https://example-app.klutch.sh
    2. Open this URL in your browser
    3. You should see the DocuSeal login/registration page
    4. Create your first admin user account

First-time Setup:

When you first access DocuSeal:

  1. You’ll be prompted to create an admin account
  2. Enter your email and password
  3. Configure organization settings
  4. Start creating document templates

7. Custom Domain Configuration

To use your own domain with DocuSeal:

    Step 1: Add Domain in Klutch.sh

    1. In your app settings, navigate to Domains
    2. Click “Add Custom Domain”
    3. Enter your domain (e.g., docuseal.yourdomain.com)

    Step 2: Configure DNS

    Add a DNS record pointing to your Klutch.sh app:

    Option A: CNAME Record (Recommended)

    Type: CNAME
    Name: docuseal
    Value: <provided-by-klutch>
    TTL: 3600

    Option B: A Record

    Type: A
    Name: docuseal
    Value: <ip-provided-by-klutch>
    TTL: 3600

    Step 3: Update Environment Variables

    Update the HOST environment variable to match your custom domain:

    HOST=https://docuseal.yourdomain.com

    Step 4: Wait for DNS Propagation

    DNS changes can take 5 minutes to 48 hours to propagate globally. Check propagation status using online tools like WhatsMyDNS.net.

    Step 5: Verify TLS Certificate

    Klutch.sh automatically provisions TLS certificates for custom domains. Once DNS is configured and propagated, your site will be accessible over HTTPS.

Important: Always ensure the HOST environment variable matches your actual domain to prevent CORS issues and broken links in emails.


8. Email Configuration for Notifications

DocuSeal sends emails for various activities (document signing requests, notifications, etc.). Configure SMTP to enable email functionality:

Gmail Example

SMTP_ADDRESS=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@gmail.com
SMTP_PASSWORD=your-app-specific-password
SMTP_AUTHENTICATION=plain
SMTP_ENABLE_STARTTLS_AUTO=true
SMTP_FROM=noreply@yourdomain.com

Note: For Gmail, you’ll need to create an app-specific password if you have 2FA enabled.

SendGrid Example

SMTP_ADDRESS=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USERNAME=apikey
SMTP_PASSWORD=<your-sendgrid-api-key>
SMTP_AUTHENTICATION=plain
SMTP_ENABLE_STARTTLS_AUTO=true
SMTP_FROM=noreply@yourdomain.com

Mailgun Example

SMTP_ADDRESS=smtp.mailgun.org
SMTP_PORT=587
SMTP_USERNAME=postmaster@mg.yourdomain.com
SMTP_PASSWORD=<your-mailgun-password>
SMTP_AUTHENTICATION=plain
SMTP_ENABLE_STARTTLS_AUTO=true
SMTP_FROM=noreply@yourdomain.com

Testing Email Configuration

After deploying with email configuration:

  1. Log in to DocuSeal
  2. Create a test document template
  3. Send a signing request to yourself
  4. Verify you receive the email
  5. Check spam folder if email doesn’t arrive

Troubleshooting Email Issues:

  • Verify SMTP credentials are correct
  • Check SMTP server allows connections from Klutch.sh
  • Review application logs for SMTP errors
  • Test SMTP settings using a tool like MXToolbox

9. Getting Started with DocuSeal

Once your DocuSeal instance is running, here’s how to get started:

    Step 1: Create Your First Admin Account

    1. Navigate to your DocuSeal URL
    2. Click “Sign Up” or you’ll be prompted to create an account
    3. Enter your email and a strong password
    4. Complete the registration process

    Step 2: Create a Document Template

    1. Click “Templates” in the navigation
    2. Click “New Template”
    3. Upload a PDF document or create a new one
    4. Add form fields:
      • Signature fields
      • Text fields
      • Date fields
      • Checkboxes
      • Initials
    5. Save your template

    Step 3: Send Your First Document for Signing

    1. Click “Send” from the template
    2. Enter recipient email addresses
    3. Assign fields to recipients
    4. Add a custom message (optional)
    5. Click “Send”
    6. Recipients receive an email with a signing link

    Step 4: Track Document Status

    1. Navigate to “Submissions” or “Documents”
    2. View the status of all sent documents:
      • Pending
      • Viewed
      • Completed
      • Declined
    3. Download completed documents with signatures

    Step 5: Configure Organization Settings

    1. Click on your profile/settings
    2. Configure:
      • Organization name and branding
      • User permissions
      • Signature appearance
      • Notification preferences
      • API keys (if using the API)

Tips for Success:

  • Start with simple templates and add complexity gradually
  • Test the signing process from the recipient’s perspective
  • Set up email notifications to track document progress
  • Use folders or tags to organize templates and submissions

10. Production Best Practices

Follow these best practices for a secure and reliable DocuSeal deployment:

Security

    Use Strong Secrets

    Generate cryptographically secure values for:

    • SECRET_KEY_BASE (minimum 128 characters)
    • ENCRYPTION_KEY (64 hex characters)
    • Database passwords
    Terminal window
    # Generate SECRET_KEY_BASE
    openssl rand -hex 64
    # Generate ENCRYPTION_KEY
    openssl rand -hex 32

    Enable HTTPS Only

    Always use HTTPS in production:

    • Set HOST to an https:// URL
    • Klutch.sh provides automatic TLS certificate management
    • Never accept unencrypted HTTP traffic for document signing

    Implement Access Controls

    • Use strong password policies
    • Enable two-factor authentication if supported
    • Regularly review user access and permissions
    • Disable public registration if not needed (DISABLE_REGISTRATION=true)

    Regular Security Updates

    • Monitor the DocuSeal GitHub repository for security updates
    • Update your Docker image tag regularly
    • Test updates in a staging environment before production

Performance and Scalability

    Use PostgreSQL for Production

    SQLite is not suitable for production:

    • Switch to PostgreSQL for better performance
    • Configure connection pooling
    • Use a managed database service for automatic backups

    Monitor Resource Usage

    Track and optimize:

    • Memory consumption
    • CPU usage
    • Disk space (especially /app/storage)
    • Database size and query performance

    Scale Storage

    Plan for document storage growth:

    • Start with 10GB and monitor usage
    • Increase volume size as needed
    • Consider object storage (S3) for cost-effective scaling
    STORAGE_TYPE=s3
    AWS_ACCESS_KEY_ID=your-key
    AWS_SECRET_ACCESS_KEY=your-secret
    AWS_REGION=us-east-1
    AWS_BUCKET=docuseal-documents

    Optimize Database

    • Regular database maintenance (VACUUM for PostgreSQL)
    • Monitor slow queries
    • Add appropriate indexes for frequently queried fields
    • Archive old completed documents

Backup and Disaster Recovery

    Automated Backups

    Set up regular backups for:

    Database Backups (PostgreSQL):

    Terminal window
    # Run daily via cron or scheduled job
    pg_dump -h postgres-host -U docuseal_user docuseal_production > backup-$(date +%Y%m%d).sql

    Volume Backups:

    • Use Klutch.sh volume snapshot features if available
    • Implement external backup sync to S3 or similar
    • Test backup restoration regularly

    Disaster Recovery Plan

    Document and test:

    1. How to restore from database backups
    2. How to restore uploaded documents
    3. How to rebuild from scratch if necessary
    4. Recovery time objectives (RTO) and recovery point objectives (RPO)

Monitoring and Observability

    Application Logs

    • Monitor DocuSeal application logs in Klutch.sh dashboard
    • Watch for errors, warnings, and unusual activity
    • Set up log aggregation for easier analysis

    Health Checks

    The Dockerfile includes a health check:

    HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
    CMD curl -f http://localhost:3000/health || exit 1

    Monitor health check status in Klutch.sh.

    Alerting

    Set up alerts for:

    • Application downtime
    • High error rates
    • Database connection failures
    • Disk space running low (>80% usage)
    • Memory/CPU threshold breaches

11. Troubleshooting Common Issues

Application Won’t Start

Symptoms: Container starts but app is not accessible

Solutions:

  1. Check application logs in Klutch.sh dashboard
  2. Verify SECRET_KEY_BASE is set and at least 128 characters
  3. Confirm DATABASE_URL is correctly formatted
  4. Ensure database is accessible from the app
  5. Check that port 3000 is properly configured

Test database connection:

Terminal window
# If using PostgreSQL, test from a debug container
psql "postgresql://user:password@host:5432/database"

Database Migration Failures

Symptoms: App starts but shows errors about missing database tables

Solutions:

  1. Check logs for migration error messages
  2. Ensure database user has sufficient privileges
  3. Manually run migrations if needed:
    Terminal window
    # Access the container and run
    bin/rails db:migrate RAILS_ENV=production
  4. For a fresh start, drop and recreate the database (development only!)

File Upload Errors

Symptoms: Cannot upload documents or signatures

Solutions:

  1. Verify persistent volume is attached to /app/storage
  2. Check volume has sufficient free space
  3. Ensure proper file permissions:
    Terminal window
    # Inside container
    ls -la /app/storage
    # Should be writable by app user
  4. Review MAX_FILE_SIZE environment variable if files are large

Email Not Sending

Symptoms: Documents sent but recipients don’t receive emails

Solutions:

  1. Verify all SMTP environment variables are set correctly
  2. Check SMTP credentials are valid
  3. Test SMTP connection from container:
    Terminal window
    # Use telnet or similar tool
    telnet smtp.gmail.com 587
  4. Check spam folders
  5. Review application logs for SMTP errors
  6. Verify SMTP_FROM email address is valid

Performance Issues

Symptoms: Slow loading times, timeouts

Solutions:

  1. Check resource usage (CPU, memory) in Klutch.sh dashboard
  2. Verify database performance:
    • For PostgreSQL: Review slow query logs
    • Check connection pool settings
    • Ensure database has adequate resources
  3. Review volume I/O performance
  4. Consider scaling up instance size
  5. Implement caching if available
  6. Archive old documents to reduce database size

Custom Domain Not Working

Symptoms: Custom domain shows errors or doesn’t load

Solutions:

  1. Verify DNS records are correctly configured
  2. Check DNS propagation status
  3. Ensure HOST environment variable matches custom domain
  4. Wait for TLS certificate provisioning (can take a few minutes)
  5. Check Klutch.sh domain configuration in dashboard
  6. Review any CORS or CSP errors in browser console

Data Loss After Restart

Symptoms: Uploaded documents or database data disappears after container restart

Solutions:

  1. Critical: Ensure persistent volumes are attached
  2. Verify volume mount paths are correct:
    • /app/storage for documents
    • /app/data for SQLite database
  3. Check Klutch.sh volume configuration
  4. Test by creating a file and restarting:
    Terminal window
    echo "test" > /app/storage/test.txt
    # Restart container, then check if file exists

12. Security Best Practices

Security is paramount when handling document signing and sensitive information:

Data Protection

    Encrypt Sensitive Data

    • Set ENCRYPTION_KEY to encrypt sensitive data at rest
    • Use TLS/HTTPS for all communications
    • Ensure database connections use SSL if supported

    Access Control

    • Implement strong password policies
    • Use unique credentials for each environment (dev, staging, prod)
    • Regularly rotate secrets and passwords
    • Limit database user permissions to only what’s needed

    Audit Logging

    • Enable audit logs to track document access and modifications
    • Review logs regularly for suspicious activity
    • Store logs securely and retain according to compliance requirements

Compliance Considerations

    Data Residency

    • Know where your data is stored (Klutch.sh region)
    • For sensitive industries, verify compliance with regulations (GDPR, HIPAA, etc.)
    • Consider data retention policies
    • Ensure electronic signatures meet legal requirements in your jurisdiction
    • Keep signed documents securely archived
    • Implement document versioning and audit trails

Network Security

    Firewall Configuration

    • Only expose necessary ports (HTTPS/443)
    • Use Klutch.sh’s network isolation features
    • If using external database, ensure it’s not publicly accessible

    Rate Limiting

    • Implement rate limiting to prevent abuse
    • Monitor for unusual traffic patterns
    • Block suspicious IP addresses if necessary

13. Scaling and High Availability

As your DocuSeal usage grows, consider these scaling strategies:

Horizontal Scaling

While the basic DocuSeal setup is single-instance, you can prepare for scaling:

  1. Externalize State:

    • Use PostgreSQL instead of SQLite
    • Store documents in S3 or object storage
    • Use Redis for session management (if supported)
  2. Load Balancing:

    • Deploy multiple DocuSeal instances
    • Use a load balancer to distribute traffic
    • Ensure session persistence across instances
  3. Database Scaling:

    • Use read replicas for reporting queries
    • Implement connection pooling (PgBouncer)
    • Optimize queries and add indexes

Vertical Scaling

For simpler scaling:

  1. Increase Instance Resources:

    • Scale up CPU and memory in Klutch.sh
    • Increase database instance size
    • Expand volume storage as needed
  2. Monitor and Optimize:

    • Track performance metrics
    • Identify bottlenecks (CPU, memory, I/O, database)
    • Scale the constrained resource

14. Cost Optimization

Optimize costs while maintaining performance:

    Right-Size Resources

    • Start with smaller instances and scale as needed
    • Monitor actual resource usage vs. allocated
    • Use Klutch.sh’s scaling features to match demand

    Storage Optimization

    • Implement document retention policies
    • Archive or delete old completed documents
    • Compress documents before storage if possible
    • Use object storage (S3) for cost-effective long-term storage

    Database Optimization

    • Regular cleanup of old sessions and temporary data
    • Archive historical data to separate storage
    • Use database compression features

15. Advanced Configuration

Custom Branding

Customize DocuSeal’s appearance (if supported by your version):

# Set custom logo and colors via environment variables or configuration files
COMPANY_NAME=Your Company
BRAND_COLOR=#007bff
LOGO_URL=https://yourdomain.com/logo.png

API Integration

DocuSeal provides an API for programmatic access:

  1. Generate API keys in the DocuSeal UI
  2. Store API keys securely as environment variables
  3. Use the API to:
    • Create templates programmatically
    • Send documents for signing
    • Check submission status
    • Download completed documents

Example API usage:

Terminal window
curl -X POST https://docuseal.example.com/api/submissions \
-H "X-Auth-Token: your-api-key" \
-H "Content-Type: application/json" \
-d '{"template_id": 1, "email": "signer@example.com"}'

Webhook Notifications

Configure webhooks to receive notifications when documents are signed:

WEBHOOK_URL=https://your-app.com/webhooks/docuseal
WEBHOOK_SECRET=your-webhook-secret

Handle webhook events in your application to trigger workflows, send notifications, or update records.


16. Migration from Other Platforms

If you’re migrating from another document signing platform:

    Export Existing Data

    1. Export documents and templates from your current platform
    2. Download all completed signed documents
    3. Export user lists and permissions if applicable

    Import to DocuSeal

    1. Recreate templates in DocuSeal
    2. Upload historical documents if needed
    3. Set up user accounts and permissions
    4. Test signing workflows thoroughly

    Cutover Strategy

    1. Run both systems in parallel during transition
    2. Redirect new document requests to DocuSeal
    3. Keep old system read-only for historical documents
    4. Fully decommission old system after validation period

17. Resources and Further Reading

Official Documentation

Klutch.sh Documentation

Community Support


Conclusion

You now have a comprehensive understanding of deploying DocuSeal on Klutch.sh. This guide covered everything from basic setup with a Dockerfile to production-ready configurations with PostgreSQL, persistent storage, custom domains, email notifications, and security best practices.

Key takeaways:

  • Use PostgreSQL for production deployments
  • Always attach persistent volumes for data durability
  • Configure SMTP for email notifications
  • Use HTTPS with custom domains
  • Implement proper security measures with strong secrets
  • Monitor and maintain your deployment regularly
  • Plan for scaling as your usage grows

Start with the quick start Dockerfile to test DocuSeal, then transition to a production configuration with PostgreSQL and proper security measures. With Klutch.sh’s automated Docker detection and persistent volumes, you have a robust platform for running DocuSeal reliably.

For questions or issues, refer to the official documentation links above or reach out to the Klutch.sh and DocuSeal communities for support.


Happy document signing with DocuSeal on Klutch.sh!