Skip to content

Install on Ubuntu

Install MailCarry on VPS (Ubuntu 16.04 | 18.04)

Step 1: Install Apache2

sudo apt update

sudo apt install apache2

Step 2: Install PHP 7.2 and Related Modules

To install PHP and related modules run the commands below

sudo apt install php7.2 libapache2-mod-php7.2 php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-cli php7.2-zip  php7.2-curl php7.2-imap php7.2-mysql

Step 3: Enable Rewrite Module

sudo a2enmod rewrite

sudo systemctl restart apache2

Step 4: Install MySQL

sudo apt install mysql-server

Create MySQL user

CREATE USER 'mailcarry'@'localhost' IDENTIFIED BY 'M@ilC@rry123';

where “mailcarry” is the username and “M@ilc@arry123” is the password

GRANT ALL ON mailcarry.* TO 'mailcarry'@'localhost';


Step 5: Upload MailCarry files on the server

Upload all the extracted files from MailCarry.[VERSION-NUMBER].zip to the location, eg:


Step 6: Set Permissions

Set the permission for the following file and folders

  • chmod 777 -R /var/www/html/.env
  • chmod 777 -R /var/www/html/storage/
  • chmod 777 -R /var/www/html/bootstrap/cache/

By default, Apache does not allow the use of ‘.htaccess’ file so you will need to edit the configuration of virtual host file by adding the following code:

Enable .Htaccess File Ubuntu

<Directory /var/www/html>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Require all granted

For instance, you can edit the default virtual hosts that ships with Apache using a nano editor by typing the command below:

sudo nano /etc/apache2/sites-available/000-default.conf

copy-paste the above text just before the ‘</VirtualHost>’ closing tag. Remember to save the file

Then, restart Apache for the changes to take effect:

sudo systemctl restart apache2

Step 7: Now Access the Install URL

eg: If is the domian then

  • Fill the data as per your requirement
  • Click Install

Install cron

sudo apt install cron

Set the required cron

* * * * * /usr/bin/php /var/www/html/artisan schedule:run >/dev/null 2>&1

Cron command may vary according to the php path and files path.
After succcessfull installation MailCarry will show you the required command.

Hurrah! You have done it.

Was this article helpful?
How can we improve this article?

Copyright © 2020 MailCarry