How to Set Up MailWizz on a VPS or Dedicated Server (Ubuntu 20.04/22.04/24.04)

Step-by-Step MailWizz Setup on VPS

If you’re planning to run your email marketing campaigns through your own server, setting up MailWizz on a VPS or dedicated server is a cost-effective and scalable solution. Here’s a complete guide to setting up MailWizz on a VPS running Ubuntu 22.04.

Why Install the LAMP Stack?
MailWizz is a PHP-based application and relies on a LAMP (Linux, Apache, MySQL, PHP) stack. Ubuntu provides the Linux environment, while Apache handles web requests, MySQL is used for data storage, and PHP powers the application itself.

🌟 Why Choose MailWizz on Your Own Server?

  • ✅ Full control over your email system
  • ✅ Better email deliverability
  • ✅ Saves money for high-volume sending
  • ✅ No third-party limits
  • ✅ Custom branding and analytics

🔧 Prerequisites

Before we start, make sure you have:

 

  • A VPS or dedicated server (Ubuntu 22.04)
  • Root or sudo access to your server
  • A domain/subdomain like mail.inboxline.com
  • A MailWizz license from CodeCanyon
  • SMTP access (SendGrid, Mailgun, or your own PowerMTA)
 
Start Configurations – 
 

Set hostname 

hostnamectl set-hostname mail.inboxline.com

Step 1: Update and Upgrade Server Packages

sudo apt update && sudo apt upgrade -y

Step 2: Install Apache Web Server

sudo apt update && sudo apt upgrade -y

Enable and start Apache:


sudo systemctl enable apache2
sudo systemctl start apache2

Step 3: Install MySQL Database Server

sudo apt install mysql-server -y

Run the MySQL secure installation:


sudo mysql_secure_installation

Step 4: Install PHP and Required Extensions

sudo apt install php php-mysql php-cli php-curl php-zip php-mbstring php-xml php-common php-bcmath php-intl php-soap unzip -y

Step 5: Configure PHP Settings (optional)

Edit PHP config file:

vim /etc/php/8.1/apache2/php.ini

Recommended changes:

  • memory_limit = 512M
  • upload_max_filesize = 1024M
  • post_max_size = 512M
  • max_execution_time = 600

 

Step 6: Restart Apache

sudo systemctl restart apache2

Step 7: Upload and Install MailWizz

  • Download MailWizz from your account on mailwizz.com
  • Upload it to /var/www/html/
  • Extract it and rename the folder as needed (e.g., mailwizz)
  • Change permissions:

sudo chown -R www-data:www-data /var/www/html/mailwizz

Step 7.2 – Configure Apache for mail.inboxline.com

vim /etc/apache2/sites-available/mailwizz.conf

<VirtualHost *:80>

    ServerAdmin admin@inboxline.com
    ServerName mail.inboxline.com
    DocumentRoot /var/www/html/

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

 

    ErrorLog ${APACHE_LOG_DIR}/mailwizz_error.log
    CustomLog ${APACHE_LOG_DIR}/mailwizz_access.log combined

</VirtualHost>

Save and exit from the file.
Step 7.3 Enable the site:

sudo a2ensite mailwizz.conf

sudo a2enmod rewrite

sudo systemctl restart apache2

– Open browser (only for testing now): http://mail.inboxline.com/mailwizz/install

Step 8: Configure MySQL Database

  • Login to MySQL:
  • sudo mysql
  • Create DB and user:

CREATE DATABASE mailwizzdb;
CREATE USER ‘mwuser’@’localhost’ IDENTIFIED BY ‘spovsEhv12vc’;
GRANT ALL PRIVILEGES ON mailwizzdb.* TO ‘mwuser’@’localhost’;
FLUSH PRIVILEGES;
EXIT;

Step 9: Complete MailWizz Installer in Browser
Follow the MailWizz web-based installer by entering your DB info and admin credentials.

Open on your browser :  http://your-domain/mailwizz/install

Click Next.

Click Next

Click Next.

Create the admin user and fill the required details and click over the create button

login the vps and configure the Cron

crontab -e

Copy Cron to the file and then save and exit.

Click and save.

Check via Browser with your url

http://your-domain.com/mailwizz/backend/index.php/guest/index

http://mail.inboxline.com/mailwizz/backend/index.php/guest/index

Step 10: Secure Your Server (Optional but Recommended)

Install SSL with Let’s Encrypt
Before SSL –

Enable SSL (HTTPS)

sudo apt install certbot python3-certbot-apache -y

sudo certbot –apache

SSL Configured – 

You are now ready to use MailWizz on your VPS with Ubuntu 22.04. For production use, always consider regular backups, monitoring, and performance tuning.

For any technical setup or help, contact us via inboxline.com.

Leave a Reply

About Me
Recent Posts

Do you want a more direct contact with our team?