Skip to content

Install on Ubuntu (20.04)

Install MailCarry on VPS (Ubuntu 20.04)

Step 1: Install Apache2

sudo apt update

sudo apt install apache2

Step 2: Install PHP 7.4 and Related Modules

To install PHP and related modules run the commands below

sudo apt install php7.4 libapache2-mod-php7.4 php7.4-mbstring php7.4-xmlrpc php7.4-soap php7.4-gd php7.4-xml php7.4-cli php7.4-zip php7.4-curl php7.4-imap php7.4-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';

FLUSH PRIVILEGES;

Step 5: Upload MailCarry files on the server

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

/var/www/html

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
</Directory>

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

[YOUR-INSTALLED-URL]/install/
eg: If https://mailcarry.com is the domian then https://mailcarry.com/install/

  • 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?
Table of Contents

Copyright © 2020 MailCarry