Watch How To Setup an Email Server on VPS - The Complete Tutorial Video
Learn how to set up your own business email server on VPS the easiest way with minimum codes and commands. In this tutorial, I used the combination of TinyCP control panel, EXIM4, and Roundcube to create the email server and start sending and receiving emails.
- Easy Set Up
- Minimum Codes & Commands
- Send and receive emails
CLOUD VPS S
-
4 vCPU Cores
-
8 GB RAM
-
50 GB NVMe or 200 GB SSD
-
1 Snapshot
-
32 TB Traffic Unlimited Incoming
CLOUD VPS M
-
6 vCPU Cores
-
16 GB RAM
-
100 GB NVMe or 400 GB SSD
-
2 Snapshot
-
32 TB Traffic Unlimited Incoming
CLOUD VPS L
-
8 vCPU Cores
-
30 GB RAM
-
200 GB NVMe or 800 GB SSD
-
3 Snapshot
-
32 TB Traffic Unlimited Incoming
CLOUD VPS XL
-
10 vCPU Cores
-
60 GB RAM
-
400 GB NVMe or 1.6 TB SSD
-
4 Snapshot
-
32 TB Traffic Unlimited Incoming
Step 2: Download PuTTY
Download PuTTy and SSH to Your VPS
Step 3: Download & Install a Control Panel
Copy and paste the following command lines to download and install TinyCP control panel on your VPS. A control panel helps you manage your websites from your browser.
sudo apt install gnupg ca-certificates
sudo apt-key adv --fetch-keys http://repos.tinycp.com/ubuntu/conf/gpg.key
sudo echo "deb http://repos.tinycp.com/ubuntu all main" | sudo tee /etc/apt/sources.list.d/tinycp.list
sudo apt-get update
sudo apt-get install tinycp
Step 4: Connect to your Control Panel
Connect to your control panel via the browser by copying and pasting the IP address + the port that you got at the end of the installation.
Step 5: Configure Your Control Panel
To host your WordPress websites on your VPS, install the required packages required by WordPress: You can choose between Apache and Nginx, in the tutorial video above, I chose Nginx because it's faster. You also need to install the latest PHP FPM and MariaDB database management system.
Step 6: Add Domain Names to TinyCP And Link Them to the VPS
You can now add your domain names, it's recommended to add the main domain name on which you'd like to host your website and a subdomain mail.yourwebsite.com for your email application. To link your domain to the VPS, in the DNS, create A records that point to your VPS IP address. In the video, I pointed the main domain name along with the subdomains "www" and "mail" to the VPS.
Step 7: Install EXIM MTA
An MTA stands for "Message Transfer Agent", it is responsible for the messages that you send and receive, it also allows you to create email accounts. EXIM can be installed with a one click from TinyCP, by first clicking on the gray email icon and then following the instructions that follow.
Step 8: Install Roundcube
Roundcube is a popular email client, it allows you to connect to your email accounts, and also send and receive emails via the browser. Installing Roundcube requires a database with a username and a password.
Step 9: Configure Roundcube - Fix Issues
If you try to log into Roundcube, it will not work, because the config file has issues, to fix this you need to change some details and save the file via FileZilla. More detrails are in the video above.
Step 10: Configure DNS to start receiving emails
Without proper DNS configuration, the mail server will not be able to handle received messages.
Step 11: Test sending and receiving emails
You can now test your mail server to see how it's working.
Contents
° 00:00 Introduction
° 00:43 Connect to the VPS & Install TinyCP
° 02:10 Connect to TinyCP
° 02:32 Configure TinyCP to host websites
° 03:03 Add domain names to TinyCP and link them to the VPS
° 04:27 Install EXIM4 MTA
° 05:39 Create Email Accounts
° 06:37 Install Roundcube
° 08:50 Configure RoundCube – Fix Issues
° 12:10 Configure DNS to start receiving emails
° 15:31 Test sending and receiving emails