Welcome to OpenMail! OpenMail is a modern, self-hosted webmail application designed to bring a clean, fast, Gmail-like experience to your company's existing email infrastructure.
This guide is written specifically for non-technical users and administrators. You do not need to use the command line, run terminal commands, or edit complex code files. Everything is designed to be installed and managed through your hosting control panel (like cPanel) and your web browser.
- Prerequisites
- Quick Deployment Overview
- Step 1: Uploading OpenMail to cPanel
- Step 2: Pointing Your Domain to the Public Folder
- Step 3: Creating Your MySQL Database
- Step 4: Verifying Folder Permissions
- Step 5: The Web Setup Wizard (Step-by-Step)
- Step 6: Logging In & Using OpenMail
- Troubleshooting & Frequently Asked Questions
Before starting, make sure you have:
- Shared Web Hosting or VPS with cPanel (or any hosting panel like DirectAdmin, Plesk, or CyberPanel).
- PHP 8.2, 8.3, or 8.4 installed and enabled on your hosting account.
- MySQL 8.0+ or MariaDB 10.6+ (standard on almost all cPanel hosts).
- Your Email Server Details (IMAP & SMTP hostnames and ports). Usually:
- IMAP Host:
mail.yourdomain.com(Port:993, Encryption:SSL/TLS) - SMTP Host:
mail.yourdomain.com(Port:465, Encryption:SSL/TLS)
- IMAP Host:
- The Deployment Package:
openmail-deploy.zip(pre-bundled with all dependencies and compiled frontend assets).
The installation follows the familiar WordPress-style pattern:
graph LR
A[1. Upload ZIP] --> B[2. Extract Files]
B --> C[3. Create Database]
C --> D[4. Open Browser]
D --> E[5. Web Setup Wizard]
You upload the zip file, extract it, create an empty database in cPanel, and open your domain in your browser. The setup wizard does the rest!
- Log in to your cPanel dashboard.
- Under the Files section, click File Manager.
- Choose where you want to install OpenMail:
- Recommended: In your home root folder (
/home/yourusername/), create a new directory calledopenmail. - Alternative: If installing directly inside your main web directory, open
public_html.
- Recommended: In your home root folder (
- Click the Upload button in the top toolbar.
- Drag and drop your
openmail-deploy.zipfile. Wait until the upload progress bar turns 100% green. - Go back to File Manager, select
openmail-deploy.zip, right-click it, and click Extract. - Once extracted, you can delete the
openmail-deploy.zipfile to save disk space.
For security, modern web applications like OpenMail keep their core system files protected and expose only the public directory to the internet.
If you are installing OpenMail on a subdomain (like mail.yourcompany.com or webmail.yourcompany.com):
- In cPanel, go to Domains (or Subdomains).
- Click Create A New Domain or add your subdomain.
- In the Document Root field, enter:
openmail/public(if you extracted into theopenmailfolder)- OR
public_html/public(if you extracted intopublic_html).
- Click Submit.
Some shared hosting providers lock your primary domain strictly to public_html. If you extracted OpenMail inside public_html, do this:
- In cPanel File Manager, make sure Show Hidden Files (dotfiles) is enabled in Settings (top right gear icon).
- Inside
public_html, check if a file named.htaccessexists. If not, click + File and name it.htaccess. - Right-click
.htaccess, select Edit, and paste the following code:<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} !^/public/ RewriteRule ^(.*)$ public/$1 [L] </IfModule>
- Click Save Changes. Now all visitors to your domain are automatically routed into the secure
public/directory!
OpenMail stores user accounts, address books, signatures, and cached message headers in a MySQL database.
- In cPanel, navigate to the Databases section and click MySQL® Databases (or MySQL® Database Wizard).
- Create Database:
- In New Database, type a name (e.g.
openmail). - Note the full name, which usually includes your cPanel prefix (e.g.,
company_openmail). Click Create Database.
- In New Database, type a name (e.g.
- Create Database User:
- Scroll down to Add New User.
- Username: e.g.
mailuser(full name will becompany_mailuser). - Password: Click Password Generator to create a strong password. Copy this password somewhere safe!
- Click Create User.
- Link User to Database:
- Scroll down to Add User to Database.
- Select your user and your database from the dropdowns and click Add.
- On the next screen, check the box for ALL PRIVILEGES and click Make Changes.
Note
Keep your Database Name, Username, and Password handy. You will enter them in Step 3 of the browser wizard.
OpenMail needs permission to write session data and cache files. In 99% of cPanel servers, permissions are already configured correctly automatically.
To double-check:
- In cPanel File Manager, locate the
storageandbootstrap/cachefolders. - The permission numbers should be
755(or775). - If they show
644or700, right-click each folder, select Change Permissions, check the read/write/execute boxes until the permission value is755, and click Change Permissions.
Now open your web browser (Chrome, Firefox, Safari, Edge) and go to:
https://yourdomain.com/
OpenMail will automatically detect that it is not yet installed and redirect you to https://yourdomain.com/install.
You will see the 8-step OpenMail setup wizard:
- Choose your application name (default:
OpenMailor your company name, e.g.Acme Mail). - Click Continue.
- The installer automatically tests your server for PHP version and required extensions (
pdo_mysql,mbstring,curl,xml, etc.) and folder write permissions. - Everything will show green checkmarks (✓).
- If any extension shows a red warning, see the Troubleshooting section to enable it in cPanel with one click.
- Click Continue.
- Database Host: Usually
localhostor127.0.0.1(on shared cPanel, leave aslocalhostor127.0.0.1). - Port:
3306(standard MySQL port). - Database Name: The full database name from Step 3 (e.g.,
company_openmail). - Database Username: The full username from Step 3 (e.g.,
company_mailuser). - Database Password: The password you generated in Step 3.
- Click Test Connection. Once confirmed with a green checkmark, click Run Migrations & Continue. The wizard will set up all the database tables automatically.
- You can enter an email address (e.g.
info@yourcompany.com) and click Auto-Detect, or enter your company mail server details directly:- IMAP Host: e.g.,
mail.yourcompany.com - IMAP Port:
993 - IMAP Encryption:
SSL/TLS - SMTP Host: e.g.,
mail.yourcompany.com - SMTP Port:
465 - SMTP Encryption:
SSL/TLS
- IMAP Host: e.g.,
- Click Test Mail Connection. Once green, click Continue.
- Organization Name: Your company or team name.
- Company Domain: Your primary email domain (e.g.,
yourcompany.com). - Timezone: Select your local timezone from the dropdown.
- Click Continue.
- Create your primary administrator user:
- Full Name: e.g.
Admin User - Email Address: Your company email address (e.g.
admin@yourcompany.com). - Password: Create a strong password (at least 8 characters, with letters and numbers).
- Full Name: e.g.
- Click Create Account & Continue.
- Select your security options:
- Force HTTPS: Recommended (Yes).
- Secure Cookies: Yes (when using HTTPS).
- Session Expiry: Time before an idle user is logged out (default: 1440 minutes / 24 hours).
- Click Continue.
- The wizard runs a complete health check: database connected, mail settings verified, administrator account ready.
- Click Complete Installation.
- OpenMail locks the installer for security and redirects you straight to the Login Screen!
- Navigate to
https://yourdomain.com/login. - Enter your email address and password.
- You are now in your OpenMail webmail dashboard!
- The left sidebar lists your email folders: Inbox, Sent, Drafts, Trash, Archive, and any custom IMAP folders.
- Click on any message in the list to read it.
- Messages in the same conversation are automatically threaded together (JWZ conversation algorithm), just like in Gmail.
- Click the Compose button in the top left.
- Enter recipients in the
To,Cc, orBccfields. As you type, OpenMail suggests matching contacts. - Format your email with the rich text editor (bold, italics, bullet points, links).
- Drag and drop files to attach them (up to 25 MB per file).
- Click Send. If you make a mistake, an Undo Send popup appears for a few seconds so you can cancel delivery.
- You can create custom color-coded labels (e.g., "Urgent", "Finance", "Clients").
- Apply labels to messages to organize your inbox without moving emails out of folders.
- Click on your profile avatar (top right) and open Settings.
- Signatures: Create one or more formatted email signatures and pick your default.
- Appearance: Toggle between Light Mode and Dark Mode, and adjust message list density (Compact, Regular, Comfortable).
- Security: View currently active browser sessions and log out of remote devices with one click.
- Cause: OpenMail has already been installed, or an old
storage/installedfile exists. - Fix: If you need to re-install from scratch, open cPanel File Manager, navigate to
storage/, and delete the file namedinstalled. Then visit/installagain.
- Cause: The web server is looking at the root folder instead of the
public/folder. - Fix: Follow Step 2. Either change the Document Root in cPanel to point to
public, or create the.htaccessfile insidepublic_html.
- Cause: An extension like
pdo_mysql,mbstring, orintlis not enabled in your PHP profile. - Fix in cPanel:
- Go to cPanel home and search for Select PHP Version (or MultiPHP INI Editor).
- Make sure your PHP version is set to 8.2 or 8.3.
- Click on the Extensions tab.
- Check the box for the missing extension (e.g.
pdo_mysql,mbstring,fileinfo,curl,intl). - Return to the browser wizard and click Refresh / Check Again.
- Cause: Incorrect database name, username, or password.
- Fix:
- Make sure you included the cPanel username prefix (e.g.,
company_openmail, not justopenmail). - Make sure you added the user to the database and clicked ALL PRIVILEGES in cPanel (Step 3).
- Use
127.0.0.1orlocalhostas the database host.
- Make sure you included the cPanel username prefix (e.g.,
- Cause: Wrong port, encryption type, or server address.
- Fix:
- For standard cPanel mail: use
mail.yourdomain.comwith Port993andSSL/TLS. - Check with your hosting provider if external mail server ports (like 993/465) are blocked by a hosting firewall.
- For standard cPanel mail: use
- Cause: Incorrect file permissions on
storageorbootstrap/cache. - Fix: In cPanel File Manager, make sure permissions for
storage/andbootstrap/cache/are set to755(or775). Also verify your server is running PHP 8.2 or newer.
Enjoy using OpenMail! For questions, bug reports, or feature requests, visit the project repository.