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:
- GDPR: Keep EU data within EU borders
- HIPAA: Control PHI on your own servers
- FedRAMP: Government-approved infrastructure
- SOC 2: Your own audit trail, your own controls
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
```bash
git clone https://github.com/pmspaceai7-wq/space-sign.git
cd space-sign
```
Step 2: Configure Environment Variables
Create a `.env` file:
```env
DATABASE_URL="postgresql://user:password@localhost:5432/spacesign"
NEXTAUTH_SECRET="your-secret-here"
NEXTAUTH_URL="https://sign.yourdomain.com"
NEXT_PUBLIC_WEBAPP_URL="https://sign.yourdomain.com"
```
Step 3: Start the Services
```bash
docker-compose up -d
```
That'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:
```yaml
version: '3.8'
services:
postgres:
image: postgres:15
environment:
POSTGRES_DB: spacesign
POSTGRES_USER: spacesign
POSTGRES_PASSWORD: secure-password
volumes:
- postgres-data:/var/lib/postgresql/data
```
2. SSL/TLS Configuration
Use Nginx as a reverse proxy with Let's Encrypt:
```nginx
server {
listen 443 ssl http2;
server_name sign.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/sign.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sign.yourdomain.com/privkey.pem;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
```
3. Backup Strategy
Automate database backups:
```bash
#!/bin/bash
BACKUP_DIR="/backups"
DATE=$(date +%Y%m%d_%H%M%S)
docker exec postgres pg_dump -U spacesign spacesign > $BACKUP_DIR/backup_$DATE.sql
```
Advanced Configuration
Email Notifications
Configure SMTP for document notifications:
```env
EMAIL_SERVER_HOST="smtp.gmail.com"
EMAIL_SERVER_PORT=587
EMAIL_SERVER_USER="your-email@gmail.com"
EMAIL_SERVER_PASSWORD="app-password"
EMAIL_FROM="noreply@yourdomain.com"
```
File Storage
Choose your storage backend:
Local Storage:
```env
STORAGE_TYPE="local"
STORAGE_PATH="/app/uploads"
```
S3-Compatible Storage:
```env
STORAGE_TYPE="s3"
S3_BUCKET="your-bucket"
S3_REGION="us-east-1"
S3_ACCESS_KEY="your-access-key"
S3_SECRET_KEY="your-secret-key"
```
Monitoring & Maintenance
Health Checks
Add health check endpoints to your docker-compose:
```yaml
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
```
Log Management
Centralize logs with Loki or ELK stack:
```yaml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
```
Troubleshooting
Common Issues
Database Connection Failed:
High Memory Usage:
Slow Performance:
Updating Space Sign
Keep your installation up to date:
```bash
Backup first!
docker-compose exec postgres pg_dump -U spacesign spacesign > backup.sql
Pull latest changes
git pull origin main
Rebuild and restart
docker-compose build --no-cache
docker-compose up -d
```
Conclusion
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](https://github.com/pmspaceai7-wq/space-sign/discussions) or [request professional support](/request-a-demo).
Ready to Try Space Sign?
Experience the power of open-source, AI-powered e-signatures.