Deployment Setup
This guide covers everything you need to deploy VaultSandbox: infrastructure requirements, DNS configuration, and automatic TLS certificate provisioning.
Infrastructure Requirements
Section titled “Infrastructure Requirements”Public IP Address
Section titled “Public IP Address”Required for: Production-parity testing
Why it matters:
- ACME certificate issuance requires HTTP-01 or TLS-ALPN-01 challenge
- Real SMTP servers need to connect to port 25 from the internet
- SPF/DKIM validation requires legitimate DNS resolution
Without a public IP:
- You can still run VaultSandbox locally for development
- Email authentication checks will be limited
Open Ports
Section titled “Open Ports”VaultSandbox requires the following ports to be accessible:
| Port | Protocol | Purpose | Required For |
|---|---|---|---|
| 25 | SMTP | Inbound email | Email delivery |
| 80 | HTTP | ACME challenges, Web UI | TLS certificates |
| 443 | HTTPS | Secure API and Web UI | Production use |
Domain or Subdomain (Custom Domain Mode Only)
Section titled “Domain or Subdomain (Custom Domain Mode Only)”Required for: Custom domain deployments
What you need:
- A domain you control (e.g.,
example.com) - OR a subdomain (e.g.,
test.example.comorqa.example.com) - Access to modify DNS records (A and MX records)
Examples:
# Full domain for testingexample.com → VaultSandboxInboxes: [email protected]
# Subdomain for testingqa.example.com → VaultSandboxInboxes: [email protected]DNS Control (Custom Domain Mode Only)
Section titled “DNS Control (Custom Domain Mode Only)”For custom domain deployments, you need the ability to create:
-
A Record: Points your domain to the server’s IP address
qa.example.com. A 192.0.2.1 -
MX Record: Tells email servers where to deliver mail
example.com. MX 10 qa.example.com.
TLS Certificates (Automatic)
Section titled “TLS Certificates (Automatic)”VaultSandbox automatically provisions and renews TLS certificates using Let’s Encrypt - no manual configuration needed.
How it works:
-
Configure your mode:
VSX DNS:
Terminal window VSB_VSX_DNS_ENABLED=trueCustom Domain:
Terminal window VSB_SMTP_ALLOWED_RECIPIENT_DOMAINS=qa.example.comVSB_CERT_ENABLED=true -
VaultSandbox requests certificates via HTTP-01 challenge
-
Let’s Encrypt validates domain ownership (requires port 80 accessible)
-
Certificate issued and automatically renewed 30 days before expiry
Requirements:
- Port 80 accessible from internet (for ACME validation)
- Port 443 accessible for HTTPS
- DNS A record pointing to your server (custom domain only)
That’s it! HTTPS will be enabled automatically.
System Requirements
Section titled “System Requirements”Minimum Hardware
Section titled “Minimum Hardware”For light testing and development:
- CPU: 1 core (2 cores recommended)
- RAM: 1GB (2GB recommended)
- Disk: 1GB for Docker images (VaultSandbox runs in-memory)
- Network: 10 Mbps
Software Requirements
Section titled “Software Requirements”Docker & Docker Compose
Section titled “Docker & Docker Compose”Required versions:
- Docker: 20.10+ (latest version recommended)
- Docker Compose: 1.29+ or
docker composeplugin (v2)
Installation:
# Check versionsdocker --versiondocker-compose --version# ordocker compose version
# Install Docker (Ubuntu/Debian)curl -fsSL https://get.docker.com -o get-docker.shsudo sh get-docker.sh
# Install Docker Compose v2 (plugin)sudo apt-get updatesudo apt-get install docker-compose-pluginOperating System
Section titled “Operating System”VaultSandbox runs on any OS that supports Docker:
- Linux: Ubuntu 20.04+, Debian 11+, CentOS 8+, Fedora 34+
- macOS: macOS 11+ (for local development only)
- Windows: Windows 10+ with WSL2 (for local development only)
Network Requirements
Section titled “Network Requirements”Firewall Configuration
Section titled “Firewall Configuration”Ensure your firewall allows:
# Allow SMTP (port 25)sudo ufw allow 25/tcp
# Allow HTTP (port 80) - ACME challengessudo ufw allow 80/tcp
# Allow HTTPS (port 443)sudo ufw allow 443/tcp
# Enable firewallsudo ufw enableSecurity Groups (Cloud)
Section titled “Security Groups (Cloud)”If using cloud providers, configure security groups:
Inbound Rules:
- Port 25 (SMTP) - Source:
0.0.0.0/0 - Port 80 (HTTP) - Source:
0.0.0.0/0 - Port 443 (HTTPS) - Source:
0.0.0.0/0 - Port 22 (SSH) - Source: Your IP (for management)
Outbound Rules:
- Allow all outbound (for ACME challenges and updates)
DNS Provider Compatibility
Section titled “DNS Provider Compatibility”VaultSandbox works with any DNS provider. Popular options:
- Cloudflare: Fast propagation, free tier available
- AWS Route 53: AWS integration, programmable DNS
- Google Cloud DNS: GCP integration
- DigitalOcean DNS: Free with DigitalOcean droplets
- Namecheap, GoDaddy, etc.: All standard DNS providers work
Optional Requirements
Section titled “Optional Requirements”Reverse DNS (PTR Record)
Section titled “Reverse DNS (PTR Record)”What it is: Maps an IP address back to a hostname
Why it helps:
- Some sending SMTP servers check reverse DNS before delivering
- Can improve email acceptance rates from strict servers
- Generally optional for testing purposes
How to set it up:
- Contact your hosting provider (usually requires support ticket)
- Set PTR record:
192.0.2.1 → qa.example.com
Test reverse DNS:
dig -x 192.0.2.1Pre-Deployment Checklist
Section titled “Pre-Deployment Checklist”VSX DNS Mode
Section titled “VSX DNS Mode”- Public IP address acquired
- Ports 25, 80, and 443 accessible (no NAT/firewall blocking)
- Docker and Docker Compose installed
Custom Domain Mode
Section titled “Custom Domain Mode”- Public IP address acquired
- Port 25 confirmed open (test with telnet/nc)
- Ports 80 and 443 accessible
- Domain or subdomain ready
- DNS provider access confirmed
- Docker and Docker Compose installed
- Firewall rules configured
- (Optional) Reverse DNS requested
Testing Without Public IP (Local Development)
Section titled “Testing Without Public IP (Local Development)”You can run VaultSandbox locally for development:
docker-compose upLimitations:
- No TLS certificates (ACME requires public IP and domain)
- Cannot receive emails from external SMTP servers
- Must send test emails from same machine
For local testing:
# Send test email locallyswaks --to test@localhost \ --server localhost \ --port 25 \ --body "Local test"Next Steps
Section titled “Next Steps”Once you’ve confirmed all requirements and configured DNS:
- Docker Compose Setup - Deploy VaultSandbox with Docker
- Quick Start - Send your first test email
- API Reference - Integrate with your application
Troubleshooting
Section titled “Troubleshooting”How do I check if port 25 is open?
Section titled “How do I check if port 25 is open?”# From another machinetelnet YOUR_SERVER_IP 25
# Or using ncnc -zv YOUR_SERVER_IP 25
# Expected output: "Connected to YOUR_SERVER_IP"My cloud provider blocks port 25
Section titled “My cloud provider blocks port 25”Options:
- Request unblocking (AWS, GCP support tickets)
- Switch to a VPS provider that allows port 25 (DigitalOcean, Hetzner, Linode)
- Use an SMTP relay service (not recommended for testing)
How do I test DNS propagation?
Section titled “How do I test DNS propagation?”# Test A recorddig A qa.example.com
# Test MX recorddig MX example.com
# Use external DNS checkerhttps://dnschecker.orgResources
Section titled “Resources”- Website: www.vaultsandbox.com
- GitHub Gateway: github.com/vaultsandbox/gateway
- Docker Hub: hub.docker.com/r/vaultsandbox/gateway