Guide to Deploying Email Alias Service with SimpleLogin on VPS
Detailed guide to deploying SimpleLogin email alias service on a VPS for optimized data security and user anonymity.
Image credit: Tumisu · Pixabay Content License
Introduction to Email Alias and SimpleLogin
In an era of increasing online threats such as spam, phishing, and tracking, protecting personal email information has become essential. Email alias is an effective solution that allows users to hide their real email address while still receiving messages. SimpleLogin is an open-source email alias service that enables the creation of multiple virtual email addresses (aliases) from a single primary email, with security features such as forwarding, block list, and auto-delete.
This guide will walk you through deploying SimpleLogin on a VPS (Virtual Private Server) to achieve full control, maximum privacy, and enhanced security—ideal for individuals or businesses with high data protection needs.
Prerequisites and Preparation
Before deploying, ensure the following requirements are met:
- A VPS running Ubuntu 20.04/22.04 or Debian 11/12
- A registered domain name (e.g.,
alias.example.com) - SSH access to the VPS with
sudoprivileges - DNS records (A or AAAA) pointing to the VPS IP address
- Properly configured SPF, DKIM, and DMARC DNS records to ensure email deliverability
Deploying SimpleLogin on VPS
SimpleLogin can be deployed using Docker, enabling fast installation and easy management.
1. Install Docker and Docker Compose
Run the following commands on your VPS:
# Update the system
sudo apt update && sudo apt upgrade -y
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
2. Create Docker Compose Configuration
Create a directory and a docker-compose.yml file:
mkdir simplelogin && cd simplelogin
nano docker-compose.yml
Paste the following content into the file:
version: '3.8'
services:
simplelogin:
image: simplelogin/simplelogin:latest
container_name: simplelogin
restart: unless-stopped
environment:
- TZ=Asia/Ho_Chi_Minh
- SIMPLELOGIN_DOMAIN=alias.example.com
- SIMPLELOGIN_SMTP_HOST=smtp.example.com
- SIMPLELOGIN_SMTP_PORT=587
- SIMPLELOGIN_SMTP_USERNAME=your-smtp-username
- SIMPLELOGIN_SMTP_PASSWORD=your-smtp-password
- [email protected]
- SIMPLELOGIN_PASSWORD=your-secure-password
ports:
- "80:80"
- "443:443"
volumes:
- ./data:/app/data
networks:
- simplelogin-network
networks:
simplelogin-network:
driver: bridge
3. Start the Service
docker-compose up -d
Domain and DNS Configuration
Ensure your domain is properly configured:
- Set an
AorAAAADNS record pointing to your VPS IP - Configure an
MXrecord if you're using a primary mail server - Add
SPF,DKIM, andDMARCrecords to prevent emails from being marked as spam
Verification and Testing
After deployment, access https://alias.example.com to verify the management interface. You can create new email aliases such as [email protected] or [email protected].
Test Email Sending and Receiving
- Create a new alias.
- Send an email from an external account to the alias.
- Verify that the email is forwarded to your primary email address.
Troubleshooting
- Website not accessible: Check UFW firewall rules; ensure ports 80 and 443 are open.
- Emails not received: Verify DNS records and SPF/DKIM/DMARC configurations.
- Missing data directory: Ensure the
./datafolder exists and has write permissions.
References
- SimpleLogin Official Documentation
- Ultimate SSH Security: Guide to Configuring YubiKey FIDO2/U2F Hardware Authentication for VPS
- Deploy Vaultwarden for Enterprise with Maximum Security Using End-to-End HTTPS via Let's Encrypt
Deploying SimpleLogin on a VPS gives you full control over your email alias service, enhancing privacy and securing your online communications.
Related infrastructure & engineering guides: Cloud VPS with L3/L4/L7 Anycast Anti-DDoS
Recommended NVMe Cloud VPS Plans to Deploy This Setup
Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.
VPS-3E
10% VAT included
- CPU: 2 vCPU
- RAM: 4 GB
- SSD: 50 GB NVMe
