VPS DEPLOYMENT GUIDE

Production-Grade Email Validation Setup

This document outlines the complete deployment process for Cleanmails on a fresh VPS. Configure a secure, reputation-safe, containerized email validation node with HTTPS and proper SMTP alignment.

Deploy in minutes using CleanieAI 🤖

Stuck with an error? Our AI assistant knows exactly how to fix deployment issues. Get your dashboard live effortlessly.

Launch AI Assistant
1

Pre-Flight Checklist

Infrastructure Requirements

  • VPS OS: Ubuntu 22.04 or Debian 11+
  • Network: Dedicated Public IPv4
  • Port 25: Outbound Port 25 must be unblocked
  • DNS: Ability to configure Reverse DNS (PTR)

Domain Requirements

  • Domain ownership confirmed
  • DNS panel access (Cloudflare or equivalent)
  • Gray Cloud enabled (Proxy disabled / DNS-only mode)

📝 Note on Source Code

Check that your private GitHub repository is created and your production-ready source code is committed with a verified docker-compose.yml.
2

Infrastructure Reputation Setup

2.1 Validate Outbound Port 25

Ensure your VPS can communicate with external SMTP servers. Run this command on your VPS:

Bash
telnet gmail-smtp-in.l.google.com 25

Expected Output: A "220" response from the Gmail SMTP server. If the connection fails, contact your VPS provider to request outbound Port 25 unblocking.

2.2 Configure Reverse DNS (PTR Record)

In your VPS dashboard (Networking settings), set the Reverse DNS / PTR hostname to:

Hostname
verify.yourdomain.com

🚨 Mandatory Alignment

The A record must resolve to the VPS IP, and the PTR record must resolve back to the same hostname. Your SMTP HELO must match this hostname for 100% accuracy.
3

Prepare Private Repository

Initialize and push your Cleanmails code to your private repository from your local machine:

Git
git init
git add .
git commit -m "Deployment Ready"
git remote add origin https://github.com/USERNAME/cleanmails.git
git push -u origin main
4

Install Core Dependencies

Run these commands on your VPS to prepare the environment:

Bash
sudo apt update && sudo apt upgrade -y
sudo apt install docker.io docker-compose git -y
sudo systemctl start docker
sudo systemctl enable docker

💡 Pro Tip

Add your user to the docker group to run commands without sudo:
sudo usermod -aG docker $USER
5

Clone and Launch Application

Clone Repository

Bash
git clone https://github.com/USERNAME/cleanmails.git
cd cleanmails

Configure Environment

Edit your docker-compose.yml to match your setup:

YAML
# Inside docker-compose.yml
SMTP_HELO_NAME=verify.yourdomain.com
SMTP_FROM_EMAIL=scanner@yourdomain.com

Build and Start

Bash
sudo docker-compose up -d --build
6

Domain and HTTPS Configuration

6.1 DNS Setup

Create the following A Record in your DNS panel:

Field Value
Type A Record
Name verify
Value YOUR_VPS_IP
Proxy Status DNS Only (Gray Cloud)

6.2 Install Nginx and SSL

Bash
sudo apt install nginx certbot python3-certbot-nginx -y
sudo certbot --nginx -d verify.yourdomain.com
7

First-Time Initialization

Open your browser and navigate to https://verify.yourdomain.com.

You will be prompted to create your Admin Account and Master Password. There is no password recovery mechanism — save these details securely.

8

Operational Commands

Log view
sudo docker-compose logs -f cleanmails
Restart
sudo docker-compose restart
9

Final Verification Checklist

  • SSL Valid: HTTPS loads without security warnings.
  • Auth Active: Dashboard requires login for access.
  • DNS Matched: HELO matches Reverse DNS hostname.
  • Port Lock: Direct access via IP:8080 is blocked by Nginx.