🚀 Why Use CapRover + Poste.io?
- Easy Deployment: CapRover offers one-click app deployment, including Docker apps like Poste.io.
- Full Mail Server: Poste.io provides a complete mail server solution (SMTP, IMAP, POP3) with ClamAV integration.
- Docker-Powered: Both CapRover and Poste.io run on Docker, making it easy to manage, scale, and transport between VPS or devices.
- Built-in HTTPS: CapRover allows automatic HTTPS using Let's Encrypt, providing security by default.
- Resource Efficiency: Lightweight and optimized for VPS or local environments with minimal overhead.
Step 1: Install Docker and Docker Compose
First, install Docker and Docker Compose on your system.
-
Update your system:
sudo apt update && sudo apt upgrade -y
-
Install Docker:
sudo apt install docker.io -y
-
Install Docker Compose:
sudo apt install docker-compose -y
-
Enable Docker service:
sudo systemctl enable docker sudo systemctl start docker
-
Optional: Add your user to the Docker group (so you can run Docker without
sudo
):
sudo usermod -aG docker $USER
Log out and back in for the changes to take effect.
Step 2: Install CapRover
-
Run the CapRover installation script:
docker run -e MAIN_NODE_IP_ADDRESS=YOUR_IP_ADDRESS -e MAIN_NODE_DOMAIN_NAME=YOUR_DOMAIN -v /var/run/docker.sock:/var/run/docker.sock -v /captain:/captain caprover/caprover
- Replace `YOUR_IP_ADDRESS` with your VPS IP (or `127.0.0.1` for localhost).
- Replace `YOUR_DOMAIN` with your domain name or use `captain.localhost` for testing on localhost.
-
Access the CapRover dashboard:
Open your browser and go to
http://YOUR_IP_ADDRESS:3000
(orhttp://localhost:3000
if on localhost).
Step 3: Install Poste.io Mail Server using CapRover
- Log into CapRover dashboard and create a new app:
- Go to **Apps** > **Create New App**, name it `Poste` (or any name you prefer).
- Deploy Poste.io with one-click:
- Go to the app you created > **App Configs** > **HTTP Settings**:
- Set the root domain or subdomain for your mail server (e.g., `mail.yourdomain.com`).
- Go to **App Configs** > **Dockerfile** > **Edit Dockerfile** and add:
```yaml
captainVersion: 4
services:
app:
image: analogic/poste.io
ports:
- 25:25
- 80:80
- 443:443
- 110:110
- 143:143
- 993:993
- 995:995
- 587:587
- 4190:4190
environment:
- "HTTPS=ON"
- "VIRTUAL_HOST=mail.yourdomain.com"
- "ENABLE_CLAMAV=ON"
volumes:
- /captain/data/poste/maildata:/data
```
- Deploy and finalize:
- Click **Save and Update** in CapRover.
- Poste.io should now be running at `mail.yourdomain.com`.
Step 4: Access Poste.io
-
Access the Poste.io admin dashboard:
Open your browser and go to
https://mail.yourdomain.com/admin
(replaceyourdomain.com
with your actual domain). Configure your mail server:
Follow the on-screen instructions to set up your mail server.
Done!
You've now successfully installed CapRover and Poste.io in just a few minutes on your Ubuntu VPS or localhost. Make sure to configure firewall rules to allow relevant ports (25, 80, 443, 110, 143, 587, etc.).
Additional Notes:
- For production servers, it's recommended to set up proper DNS records (MX, SPF, DKIM, etc.) for your domain to ensure your mail server works optimally.
- You can manage your CapRover server and deploy more apps using the CapRover dashboard. """
Top comments (0)