Skip to content

Quick Start - Custom Domain

This guide will help you deploy VaultSandbox using your own domain. This is ideal for production environments, compliance requirements, or when you need custom branding.

Before you begin, ensure you have:

  • Docker and Docker Compose installed
  • A domain or subdomain you control (e.g., qa.example.com)
  • Public IP address with ports 25, 80, and 443 accessible
  • DNS access to create A and MX records

Point your subdomain to the server running VaultSandbox. You’ll need two DNS records:

Points your subdomain to your server:

qa.example.com. A YOUR.SERVER.IP

Tells email servers to deliver mail for your subdomain to VaultSandbox:

qa.example.com. MX 10 qa.example.com.

Step 2: Create Docker Compose Configuration

Section titled “Step 2: Create Docker Compose Configuration”

Create a new directory for VaultSandbox:

Terminal window
mkdir vaultsandbox && cd vaultsandbox

Create a docker-compose.yml file with just 3 environment variables:

services:
gateway:
image: vaultsandbox/gateway:latest
container_name: vaultsandbox-gateway
restart: unless-stopped
ports:
- '25:25' # SMTP
- '80:80' # HTTP (ACME challenges)
- '443:443' # HTTPS (Web UI + API)
environment:
# Just 2 variables - that's it!
VSB_SMTP_ALLOWED_RECIPIENT_DOMAINS: 'qa.example.com'
VSB_CERT_ENABLED: 'true'
volumes:
- gateway-data:/app/data # Persist certificates and API keys
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:80/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
gateway-data:
Terminal window
docker compose up -d

Check that the service is running:

Terminal window
docker compose ps

You should see the vaultsandbox-gateway container running.

Retrieve your auto-generated API key (you’ll need this for the Web UI):

Terminal window
docker compose exec gateway cat /app/data/.api-key; echo

Open your browser and navigate to:

https://qa.example.com/app

You’ll be prompted to enter your API key:

API Key Input

In the web UI:

  1. Click “Create Inbox” button
  2. Copy the generated email address (e.g., a1b2c3d4@qa.example.com)
  3. Your inbox is ready to receive emails

That’s it! Your inbox will automatically capture any emails sent to that address.

Create Inbox

Send a test email to your inbox address using any email client or SMTP tool:

Terminal window
# Using swaks (SMTP testing tool)
swaks --to a1b2c3d4@qa.example.com \
--from test@yourdomain.com \
--server qa.example.com \
--port 25 \
--h-Subject "Test Email" \
--body "Hello from VaultSandbox!"

Or simply use your regular email client (Gmail, Outlook, etc.) and send to the inbox address.

Go back to the web UI and you should see your email appear in the inbox:

Inbox View

Click on it to view:

  • Full email content (HTML and plain text)
  • All headers
  • Extracted links
  • Authentication results (SPF, DKIM, DMARC)
  • Attachments

Email Detail View

To confirm VaultSandbox is testing like production, check the authentication results:

  1. Send an email from a domain you control with proper SPF/DKIM setup
  2. View the email in VaultSandbox
  3. Check the Authentication section
  4. You should see real SPF, DKIM, and DMARC verdicts

Now that VaultSandbox is running, explore more features:

  1. Use the DNS Setup Tool: Visit vaultsandbox.com/setup to verify your DNS configuration

  2. Check DNS manually: Ensure MX and A records are properly configured

    Terminal window
    dig MX qa.example.com
    dig A qa.example.com
  3. Check SMTP Port: Ensure port 25 is not blocked by your hosting provider

    Terminal window
    telnet qa.example.com 25
  4. Check Logs:

    Terminal window
    docker compose logs gateway
  1. Check if service is running:

    Terminal window
    docker compose ps
  2. Check logs:

    Terminal window
    docker compose logs gateway
  3. Verify HTTPS is ready: Check logs for “Certificate obtained successfully”

  4. Try HTTP first: If HTTPS isn’t working yet, try http://qa.example.com/app