Documenso
Open source document signing platform.
Overview
Documenso is an open-source electronic signature platform that serves as a privacy-focused alternative to DocuSign and other proprietary document signing solutions. Built with modern web technologies, it provides legally binding electronic signatures while maintaining full control over your document workflow and data. The platform emphasizes transparency, security, and user privacy, making it an ideal choice for organizations that need compliant e-signature capabilities without vendor lock-in.
This deployment configuration establishes a complete document signing infrastructure using two specialized services: the main Documenso application container running the Next.js-based web interface and API, paired with a PostgreSQL database for persistent storage of documents, signatures, and user data. The setup uses PostgreSQL 15 Alpine for optimal performance and reliability, with the Documenso service configured to handle document uploads, signature field placement, and email-based signing workflows.
This stack is particularly valuable for businesses, legal firms, HR departments, and any organization requiring secure document signing workflows with full data ownership. Unlike cloud-based alternatives, this self-hosted approach ensures sensitive documents never leave your infrastructure while providing the same professional e-signature experience that clients and partners expect.
Key Features
- PDF document upload and signature field positioning with drag-and-drop interface
- Email-based signing workflows with automatic notifications to multiple signers
- Legally compliant electronic signatures with audit trails and timestamping
- Multi-party document signing with sequential or parallel signing order support
- Document status tracking and completion notifications for all parties
- PostgreSQL-backed document storage with full ACID compliance for signature integrity
- NextAuth.js authentication system supporting multiple identity providers
- Mobile-responsive signing interface for signatures on any device
Common Use Cases
- 1Legal firms processing contracts, NDAs, and client agreements with secure signature workflows
- 2HR departments handling employment contracts, onboarding documents, and policy acknowledgments
- 3Real estate agencies managing purchase agreements, lease contracts, and disclosure documents
- 4Small to medium businesses replacing DocuSign to reduce subscription costs and maintain data control
- 5Healthcare organizations requiring HIPAA-compliant document signing for patient forms and consent documents
- 6Educational institutions processing enrollment forms, permission slips, and administrative documents
- 7Financial services firms handling loan documents, account openings, and compliance paperwork
Prerequisites
- Docker and Docker Compose installed with at least 2GB available RAM for optimal performance
- Port 3000 available on the host system for web interface access
- Environment file (.env) configured with secure NEXTAUTH_SECRET and DB_PASSWORD values
- OpenSSL available for generating cryptographically secure authentication secrets
- Basic understanding of document signing workflows and legal requirements for electronic signatures
- Email server configuration or SMTP credentials for sending signing invitations to document recipients
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 documenso: 3 image: documenso/documenso:latest4 container_name: documenso5 restart: unless-stopped6 ports: 7 - "3000:3000"8 environment: 9 NEXTAUTH_URL: http://localhost:300010 NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}11 NEXT_PRIVATE_DATABASE_URL: postgresql://documenso:${DB_PASSWORD}@db:5432/documenso12 depends_on: 13 - db1415 db: 16 image: postgres:15-alpine17 container_name: documenso-db18 restart: unless-stopped19 environment: 20 POSTGRES_USER: documenso21 POSTGRES_PASSWORD: ${DB_PASSWORD}22 POSTGRES_DB: documenso23 volumes: 24 - documenso_db:/var/lib/postgresql/data2526volumes: 27 documenso_db: .env Template
.env
1DB_PASSWORD=changeme2NEXTAUTH_SECRET=generate-32-char-secretUsage Notes
- 1Docs: https://documenso.com/docs
- 2Access at http://localhost:3000 - DocuSign alternative
- 3Upload PDF documents and add signature fields
- 4Email signers with signing request links
- 5Generate secret: openssl rand -hex 32
- 6Legally binding electronic signatures
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
documenso
documenso:
image: documenso/documenso:latest
container_name: documenso
restart: unless-stopped
ports:
- "3000:3000"
environment:
NEXTAUTH_URL: http://localhost:3000
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
NEXT_PRIVATE_DATABASE_URL: postgresql://documenso:${DB_PASSWORD}@db:5432/documenso
depends_on:
- db
db
db:
image: postgres:15-alpine
container_name: documenso-db
restart: unless-stopped
environment:
POSTGRES_USER: documenso
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: documenso
volumes:
- documenso_db:/var/lib/postgresql/data
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 documenso:5 image: documenso/documenso:latest6 container_name: documenso7 restart: unless-stopped8 ports:9 - "3000:3000"10 environment:11 NEXTAUTH_URL: http://localhost:300012 NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}13 NEXT_PRIVATE_DATABASE_URL: postgresql://documenso:${DB_PASSWORD}@db:5432/documenso14 depends_on:15 - db1617 db:18 image: postgres:15-alpine19 container_name: documenso-db20 restart: unless-stopped21 environment:22 POSTGRES_USER: documenso23 POSTGRES_PASSWORD: ${DB_PASSWORD}24 POSTGRES_DB: documenso25 volumes:26 - documenso_db:/var/lib/postgresql/data2728volumes:29 documenso_db:30EOF3132# 2. Create the .env file33cat > .env << 'EOF'34DB_PASSWORD=changeme35NEXTAUTH_SECRET=generate-32-char-secret36EOF3738# 3. Start the services39docker compose up -d4041# 4. View logs42docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/documenso/run | bashTroubleshooting
- Database connection failed errors: Verify DB_PASSWORD matches between documenso and db services in environment configuration
- NextAuth authentication loops or session errors: Regenerate NEXTAUTH_SECRET using 'openssl rand -hex 32' and restart containers
- Document upload failures or 500 errors: Check container logs with 'docker logs documenso' and ensure adequate disk space for document storage
- Email invitations not sending: Configure SMTP settings in Documenso admin panel or check email server connectivity from container
- PDF signature fields not positioning correctly: Clear browser cache and ensure PDF documents are not password-protected or have form restrictions
- Port 3000 already in use: Change host port mapping to '3001:3000' or stop conflicting services using the port
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
documensopostgres
Tags
#documenso#documents#signing#esignature
Category
Productivity & CollaborationAd Space
Shortcuts: C CopyF FavoriteD Download