Skip to main content
WisMail

Install WisMail 1.0.4 on Debian or Ubuntu

This guide takes you from a fresh Debian or Ubuntu server to a working self-hosted mail server. Allow about 30 minutes if your DNS is ready. You need the package from the Download page and a licence key (see Pricing or start the free trial).

Before you start

  • A 64-bit (amd64) server running Debian 11 or 12, or Ubuntu 22.04 or 24.04, with at least 2 GB RAM (4 GB recommended) and root or sudo access.
  • A host name such as mail.example.com with an A record pointing to the server IP, and an MX record for your domain pointing to that host name. See DNS setup.
  • A PTR (reverse DNS) record for the server IP that resolves to your host name. It is set at your hosting provider, not in your DNS zone. Without it many receivers treat your mail as spam.
  • No other mail server on the machine: Postfix or Exim hold port 25. Stop and disable them:
sudo systemctl disable --now postfix exim4

(An error such as "unit not found" only means that program is not installed.)

  • Set the server host name to the same name as the A record:
sudo hostnamectl set-hostname mail.example.com
  • A provider that allows connections on port 25. Many clouds block it by default; ask them to open it.
  • Outbound HTTPS from the server to the licence server license.mailselfhost.com.

Step 1. Download and verify

Download the package from the Download page, or directly on the server:

wget https://wismail.vn/downloads/wismail_1.0.4_amd64.deb
echo "c2fb256da287bc64304a49bc15a6678425e9da7870abc1b0e9926d33a658a01a  wismail_1.0.4_amd64.deb" | sha256sum -c -

The check must print wismail_1.0.4_amd64.deb: OK. If it does not, delete the file, download again and contact us if it still differs.

Step 2. Install the package

sudo apt-get install -y ./wismail_1.0.4_amd64.deb

If apt-get is not available in your environment, use dpkg and let apt pull in missing dependencies:

sudo dpkg -i ./wismail_1.0.4_amd64.deb
sudo apt-get install -f -y

The package installs into /opt/wismail, registers the wismail systemd service and starts it. Wait about 15 seconds on the first start while it creates its configuration and a self-signed certificate.

Step 3. Confirm the service is running

sudo systemctl status wismail
sudo ss -tlnp | grep -E ':(25|465|587|143|993|110|995|80|443|4040)\b'

The status must show active (running), and the second command lists the mail and web ports the server listens on. If something is wrong, read the log:

sudo journalctl -u wismail -e

Step 4. Open the firewall

Allow the mail and web ports. With UFW:

sudo ufw allow 25,465,587,143,993,110,995,80,443,4040/tcp
Port Service
25, 465, 587 SMTP, SMTPS, Submission
143, 993 IMAP, IMAPS
110, 995 POP3, POP3S
80, 443 HTTP, HTTPS (webmail, CalDAV, CardDAV, ActiveSync)
4040 Web administration (restrict it to your own network if you can)

If your hosting provider has its own firewall (security group), open the same ports there too.

Step 5. Open the web administration

In a browser open https://<VPS-IP>:4040/admin/, replacing <VPS-IP> with the server IP or host name. The first visit shows a self-signed certificate warning: this is normal, accept it and continue. You can replace the certificate later with a Let's Encrypt one.

Step 6. Run the setup wizard

The wizard walks through the licence agreement, the server host name and MX check, your primary mail domain, the administrator account and the message store location. Finish it; the server restarts once.

Web administration setup wizard: server name, primary domain and administrator account

Step 7. Enter your licence key

In the License step, paste your licence key and continue. Get your key from your customer account (Licences) or from your order confirmation. No key yet? Start the free trial or buy a licence. More in License activation.

Web administration setup wizard, License step: start a 30-day trial, enter a license number or import a key file

Check that the server can reach the licence server:

curl -sS https://license.mailselfhost.com/healthz

An answer such as ok means the connection works. An error means outbound HTTPS to that host is blocked.

To use a different licence server (for example a private one), write its URL to the file below and restart:

echo "https://your-license-server.example.com" | sudo tee /opt/wismail/license/license-server.url
sudo systemctl restart wismail

Step 8. Send a test email

  1. In web administration create a mailbox for your domain (Accounts → Users).
  2. Sign in to webmail at https://mail.example.com/ and send a message to an outside address (for example Gmail), then reply to it to test receiving.
  3. Watch delivery in Status → Queue and Status → Logs, or on the server with sudo journalctl -u wismail -e.

Troubleshooting and FAQ

I cannot open port 4040 or the admin page. Check the service (step 3), the server firewall and your provider's firewall (step 4). A browser timeout means the port is blocked; a certificate warning is normal (step 5).

Outgoing mail does not leave the server. Many providers block port 25. Test from the server with nc -vz gmail-smtp-in.l.google.com 25; if it hangs, ask your provider to unblock it.

My mail lands in spam. Set up a PTR record that matches the host name, then SPF, DKIM and DMARC in your DNS. The DNS guide lists each record. Also use a clean IP address.

The browser shows a certificate warning. The first certificate is self-signed. Install a real one from Let's Encrypt; port 80 must be reachable.

Registration fails. Run the curl check in step 7. If it fails, allow outbound HTTPS to license.mailselfhost.com, then retry the License step.

Next steps