Complete Guide: Self-Host Your E-Signature Platform with Docker
Step-by-step tutorial to deploy Space Sign on your own infrastructure in under 10 minutes. Perfect for organizations requiring full data control and GDPR compliance.
Alex Kumar
DevOps Engineer
Complete Guide: Self-Host Your E-Signature Platform with Docker
Data sovereignty isn't just a buzzword—it's a legal requirement for many organizations. Whether you're bound by GDPR, HIPAA, or internal security policies, self-hosting your e-signature platform gives you complete control over where your data lives and who can access it.
Why Self-Host Space Sign?
Complete Data Control
Your documents never leave your infrastructure. No third-party cloud providers, no data transfers to foreign jurisdictions, no vendor access to sensitive contracts.
Compliance Made Simple
Meet regulatory requirements automatically:
Cost Savings at Scale
No per-document fees. No per-user limits. Just your infrastructure costs.
Prerequisites
Before you begin, ensure you have:
Quick Start: 5-Minute Deployment
Step 1: Clone the Repository
1git clone https://github.com/pmspaceai7-wq/space-sign.git
2cd space-signStep 2: Configure Environment Variables
Create a .env file:
1DATABASE_URL="postgresql://user:password@localhost:5432/spacesign"
2NEXTAUTH_SECRET="your-secret-here"
3NEXTAUTH_URL="https://sign.yourdomain.com"
4NEXT_PUBLIC_WEBAPP_URL="https://sign.yourdomain.com"Step 3: Start the Services
1docker-compose up -dThat's it! Space Sign is now running on http://localhost:3000
Production Deployment
For production environments, follow these additional steps:
1. Database Setup
Use a managed PostgreSQL instance or deploy your own:
1version: '3.8'
2services:
3 postgres:
4 image: postgres:15
5 environment:
6 POSTGRES_DB: spacesign
7 POSTGRES_USER: spacesign
8 POSTGRES_PASSWORD: secure-password
9 volumes:
10 - postgres-data:/var/lib/postgresql/data2. SSL/TLS Configuration
Use Nginx as a reverse proxy with Let's Encrypt:
1server {
2 listen 443 ssl http2;
3 server_name sign.yourdomain.com;
4
5 ssl_certificate /etc/letsencrypt/live/sign.yourdomain.com/fullchain.pem;
6 ssl_certificate_key /etc/letsencrypt/live/sign.yourdomain.com/privkey.pem;
7
8 location / {
9 proxy_pass http://localhost:3000;
10 proxy_set_header Host $host;
11 proxy_set_header X-Real-IP $remote_addr;
12 }
13}3. Backup Strategy
Automate database backups:
1#!/bin/bash
2BACKUP_DIR="/backups"
3DATE=$(date +%Y%m%d_%H%M%S)
4docker exec postgres pg_dump -U spacesign spacesign > $BACKUP_DIR/backup_$DATE.sqlAdvanced Configuration
Email Notifications
Configure SMTP for document notifications:
1EMAIL_SERVER_HOST="smtp.gmail.com"
2EMAIL_SERVER_PORT=587
3EMAIL_SERVER_USER="your-email@gmail.com"
4EMAIL_SERVER_PASSWORD="app-password"
5EMAIL_FROM="noreply@yourdomain.com"File Storage
Choose your storage backend:
Local Storage:
1STORAGE_TYPE="local"
2STORAGE_PATH="/app/uploads"S3-Compatible Storage:
1STORAGE_TYPE="s3"
2S3_BUCKET="your-bucket"
3S3_REGION="us-east-1"
4S3_ACCESS_KEY="your-access-key"
5S3_SECRET_KEY="your-secret-key"Monitoring & Maintenance
Health Checks
Add health check endpoints to your docker-compose:
1healthcheck:
2 test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
3 interval: 30s
4 timeout: 10s
5 retries: 3Log Management
Centralize logs with Loki or ELK stack:
1logging:
2 driver: "json-file"
3 options:
4 max-size: "10m"
5 max-file: "3"Troubleshooting
Common Issues
Database Connection Failed:
High Memory Usage:
Slow Performance:
Updating Space Sign
Keep your installation up to date:
1# Backup first!
2docker-compose exec postgres pg_dump -U spacesign spacesign > backup.sql
3
4# Pull latest changes
5git pull origin main
6
7# Rebuild and restart
8docker-compose build --no-cache
9docker-compose up -dConclusion
Self-hosting Space Sign gives you enterprise-grade e-signature capabilities with complete data sovereignty. Whether you're a startup with strict security requirements or an enterprise needing air-gapped deployments, this guide gets you started in minutes.
*Need help with your deployment? Join our community or request professional support.*
Ready to Try Space Sign?
Experience the power of enterprise-grade, AI-powered e-signatures.
Read Next
Continue exploring related topics
10 E-Signature Workflow Templates for Common Business Processes
Ready-to-use workflow templates for HR onboarding, sales contracts, vendor agreements, and more. Automate repetitive signing tasks in minutes.
E-Signature API Integration: Best Practices & Code Examples
Learn how to integrate e-signature workflows into your application. Complete guide with REST API examples, webhooks, error handling, and security best practices.
GDPR & Data Residency: Why Self-Hosting Matters for EU Companies
European companies face strict data localization requirements. Learn how self-hosted e-signatures ensure GDPR compliance and keep data within EU borders.