> Source: https://meetrix.io/blogs/mailcow-gcp-developer-guide/
> Markdown copy of that page. Cite the URL above, not this file.

Development

# Mailcow on GCP - Developer Guide

[By Binuka Ranatunga](https://meetrix.io/blogs/authors/binuka-ranatunga/) • July 16, 2026 • 9 min read

Welcome to the Meetrix Mailcow developer guide for Google Cloud Platform! Mailcow bundles Postfix, Dovecot, SOGo webmail, Rspamd, and ClamAV into a single self-hosted mail server, so you get business email, custom domains, and webmail without wiring five separate services together yourself. With the Meetrix pre-configured GCP image, that whole stack is installed and talking to each other the moment the VM boots.

This guide walks you through finding the product on GCP Marketplace, configuring the deployment, reserving a static IP, pointing DNS and DKIM/SPF/DMARC at your server, adding your first domain, and accessing webmail.

[

### Mailcow Mail Server on GCP Marketplace by Meetrix - Deploy in Minutes

Deploy a self-hosted Mailcow mail server on Google Cloud Platform in minutes. Meetrix's pre-configured GCP Marketplace solution bundles Postfix, Dovecot, SOGo webmail, and spam filtering, fully under your control.

By Shalomi Umeshika • Meetrix.io

](https://meetrix.io/blogs/mailcow-gcp-marketplace/)

Prerequisites

Before you begin, make sure you have the following:

-   Basic Google Cloud Platform knowledge.
-   An active Google account with a GCP project and billing enabled.
-   A domain name you can manage DNS records for (required for mail delivery and SSL).

## Launch the Product

### Step 1: Find the Product

1.  Log in to your Google account.
2.  Go directly to the product page: [Mailcow Mail Server: Self Hosted Email Platform on Ubuntu](https://console.cloud.google.com/marketplace/product/meetrix-public/mailcow-mail-server?project=meetrix-public)
3.  You can also browse all Meetrix products at the [Meetrix Solutions Page](https://console.cloud.google.com/marketplace/browse?filter=partner:Meetrix%20Pte%20Ltd&ref=meetrix.io).
4.  You will see the product listing page. Click **Get started**.

![Mailcow Mail Server product details page on GCP Marketplace](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-1.png)

### Step 2: Accept the Agreements

1.  Confirm your GCP project is selected.
2.  Tick the box under **Terms and agreements** to accept the Google Cloud Marketplace and Meetrix Pte Ltd terms of service.
3.  Click **AGREE**.

![Accepting the agreements before deploying Mailcow on GCP](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-2.png)

### Free Trial

This product includes a **5-day free trial** with up to USD 50.00 in licence fee credits. To activate it, tick **I accept the solution trial Terms and Conditions** on the launch screen before proceeding.

![Accepting the Mailcow GCP free trial terms](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-3.png)

Trial note

Infrastructure charges (VM, disk) still apply during the trial. Only the Meetrix licence fee is credited. You can cancel the trial at any time by deleting the deployment.

### Step 3: Configure the Deployment

You will see the deployment configuration form, with **Terraform** and **Command-Line deployment** tabs. Fill in the fields across the following sections:

![Mailcow GCP deployment configuration form showing deployment name, service account, zone and machine type](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-4.png)

#### General

-   **Deployment name** - A unique name for this deployment.
-   **Deployment Service Account** - Use an existing service account with the `compute.admin`, `config.agent`, and `iam.serviceAccountUser` roles, or create a new one.
-   **Zone** - Select the GCP zone closest to your users (e.g. `us-central1-a`).
-   **Machine type** - Default `e2-standard-2` (2 vCPU, 8 GB RAM) is a solid starting point for a small team's mail traffic. Scale up if you expect heavier mailbox counts or attachment volume.

#### Boot Disk

-   **Boot disk type** - Default `Balanced persistent disk` is recommended.
-   **Boot disk size** - Default 32 GB is a reasonable starting point; increase it if you expect large mailboxes or long retention.

#### Networking

-   **Network / Subnetwork** - Leave as `default` unless you have a custom VPC.
-   **External IP** - Leave as `Ephemeral` for now. You will reserve a static IP before pointing DNS at the server.
-   **Allow SSH (TCP port 22)** - Enabled by default. Restrict the source IP range if you want to limit SSH access to specific IPs.

![Mailcow GCP networking configuration showing network interface and firewall settings](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-5.png)

Once the fields are filled in, follow the on-screen instructions in your chosen tab (Terraform or Command-Line deployment) to deploy, and wait a few minutes for the deployment to complete.

## Reserve a Static IP

Do this before pointing DNS at the server

An ephemeral IP changes if the VM restarts, which breaks your MX, A, and PTR records along with mail delivery. Reserve a static external IP before you touch DNS.

1.  Open the VM instance created by the deployment and note the **External IP** under Network interfaces - it is marked `(Ephemeral)`.
2.  In the GCP console, go to **VPC network → IP addresses**, find that same address, and click **Reserve Static Address** (or promote it directly from the VM instance details page).
3.  Copy the reserved external IP - you will use it for your A, MX, and PTR records.

![Mailcow VM instance network interfaces showing the ephemeral external IP on GCP](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-6.png)

## Point DNS to the Server

Mail delivery and SSL both depend on DNS being correct before you go further:

1.  Add an **A record** pointing your mail hostname (e.g. `mail.yourdomain.com`) to the reserved static IP.
2.  Add an **MX record** for your sending domain pointing at that hostname.
3.  Ask your hosting or network provider to set a matching **reverse DNS (PTR) record** for the static IP - this matters for deliverability.
4.  Wait for DNS propagation before proceeding (typically a few minutes to 1 hour).

## SSH into the Server

1.  Go to the VM instance page in the GCP console.
2.  Click **SSH** to open a browser-based terminal and authorize access.

![Mailcow VM instance details page with the SSH button and Logs section on GCP](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-7.png)

## Access the Mailcow Admin Panel

Once DNS has propagated and the instance has issued its SSL certificate, open `https://<your-mail-hostname>/admin` in your browser and log in with the default admin credentials from your deployment. You land on the **System & Containers** dashboard, showing hostname, version, CPU, memory, and disk usage for the instance.

![Mailcow admin panel System and Containers dashboard showing hostname, version, CPU and memory usage](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-8.png)

Change the default admin password

Log in and change the default admin password immediately under **System → Configuration → Access → Admin details** before adding any domains or mailboxes.

The **E-Mail** menu in the top navigation gives you quick access to mail-specific settings - Configuration, Quarantine, Queue Manager, and a Restart SOGo option if webmail ever needs a kick.

![Mailcow admin panel E-Mail menu showing Configuration, Quarantine, Queue Manager and Restart SOGo](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-9.png)

## Add Your First Domain

### Step 1: Open the Domains Tab

Go to **Domains** in the admin panel. On a fresh deployment this list is empty.

![Mailcow admin panel Domains tab with an empty domain list on a fresh deployment](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-10.png)

### Step 2: Add the Domain

1.  Click **\+ Add domain**.
2.  Enter your **Domain** (the same one you pointed DNS at).
3.  Set **Max. possible aliases**, **Max. possible mailboxes**, and the mailbox quotas to whatever fits your team size.
4.  Leave the DKIM **Selector** as `dkim` and **DKIM key length** at `2048` bits unless you have a specific reason to change them.
5.  Click **Add**.

![Mailcow Add domain form showing domain name, mailbox quotas and DKIM selector settings](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-11.png)

### Step 3: Publish DKIM, SPF, and DMARC

After the domain is added, open it in the Domains list and click the DKIM key icon to reveal the generated public key. Publish it as a TXT record at `dkim._domainkey.yourdomain.com`, then add the SPF and DMARC TXT records Mailcow recommends for your domain.

### Step 4: Create a Mailbox

Go to the **Mailboxes** tab, click **\+ Add mailbox**, choose the domain you just added, and set a username and password. The mailbox is ready to receive mail as soon as DNS and DKIM have propagated.

## Access Webmail

SOGo webmail is bundled with the image and reachable at the same hostname. Log in with any mailbox you created to send and receive mail directly from the browser, with calendars and address books included.

![SOGo webmail inbox for a Mailcow mailbox on GCP](https://meetrix.io/blog-images/paas-dev-guides/mailcow-gcp/mailcow-gcp-12.png)

## Manage the Server

### Restart the Services

```bash
sudo docker restart <container_name>
```

### Shut Down the VM

To stop the VM without deleting it, go to **Compute Engine → VM Instances** in the GCP console, select your instance, and click **Stop**.

### Delete the Deployment

To fully remove the deployment and stop all billing:

1.  Go to **[Solution deployments](https://console.cloud.google.com/products/solutions/deployments)** in the GCP console.
2.  Find your Mailcow deployment.
3.  Click **Delete** to remove all associated resources.

## Troubleshoot

### Check the Service Logs

Mailcow runs on Docker. Find the running containers and check their logs:

```bash
sudo docker ps -a
sudo docker logs <container_name>
```

### Verify Firewall Ports

In the GCP console, go to **VPC Network → Firewall** and confirm the following rules exist for your VM:

| Service | Ports | Protocol |
| --- | --- | --- |
| SMTP / Submission | 25, 465, 587 | TCP |
| IMAP / IMAPS | 143, 993 | TCP |
| Webmail / Admin (HTTPS) | 443 | TCP |

### Mail Landing in Spam

Double-check that the DKIM, SPF, and DMARC TXT records match exactly what the admin panel shows for the domain, and confirm the PTR record for your static IP resolves back to your mail hostname. A new sending IP with no history will still take time to build reputation even with every record correct.

## Conclusion

The Meetrix Mailcow developer guide helps you get a self-hosted mail server running on GCP without losing a weekend to Docker Compose files and DKIM key generation. Reserve a static IP, point DNS at it, add your domain, and you have a private alternative to per-seat hosted email running on infrastructure you control.

## Technical Support

If you run into any issues, our support team is here to help. Reach out to us at [support@meetrix.io](mailto:support@meetrix.io) and we will respond within 12 hours.

## Frequently Asked Questions

What DNS records does Mailcow need before I can send mail?

At minimum an A record pointing your mail hostname (e.g. mail.yourdomain.com) at the VM's external IP, and an MX record for your domain pointing at that hostname. Once the domain is added in the admin panel, Mailcow also generates a DKIM key you publish as a TXT record, plus the SPF and DMARC TXT records it recommends.

Why is my outbound mail landing in spam even after setup?

Deliverability depends on more than DKIM, SPF, and DMARC being correct - your sending IP's reputation matters too. A freshly provisioned IP with no sending history is more likely to get filtered until it builds up a track record of low-complaint, consistent mail.

Do I need to reserve a static IP for Mailcow on GCP?

Yes. Reserve a static external IP before you point DNS at the server. If the VM restarts on an ephemeral IP, the address can change, breaking your MX, A, and PTR records along with mail delivery.

Where do I create mailboxes after deployment?

SSH is only needed for server-level maintenance. Day-to-day administration - adding domains, mailboxes, and aliases - happens in the Mailcow admin panel at https://<your-mail-hostname>/admin, reachable once DNS and SSL are in place.

Can I use Mailcow on GCP for more than one domain?

Yes. Mailcow does not limit the number of domains or mailboxes per instance - each domain gets its own DKIM key, quotas, and settings from the Domains tab. The practical ceiling is the machine type and disk size you pick.

How do I check that the Mailcow containers are healthy?

SSH into the server and run: sudo docker ps -a. All Mailcow containers (postfix, dovecot, sogo, rspamd, clamd, and others) should show a status of Up.

Does webmail work out of the box?

Yes. SOGo webmail is bundled and reachable at the same hostname once SSL is issued - log in with any mailbox you create in the admin panel to send and receive mail directly from the browser.

## Deploy Mailcow on GCP in Minutes

Launch a production-ready, self-hosted Mailcow mail server on Google Cloud with a pre-configured Meetrix image.

[Get Started on GCP Marketplace](https://console.cloud.google.com/marketplace/product/meetrix-public/mailcow-mail-server?project=meetrix-public)

Meetrix Store

Mailcow

Business email on your own domain

[Deploy it](https://meetrix.io/store/mailcow/)

Meetrix Store New

Deploy what this guide covers, pre-configured.

-    [Mailcow Business email on your own domain](https://meetrix.io/store/mailcow/)
-    [Listmonk Newsletters with no per-subscriber fees](https://meetrix.io/store/listmonk/)
-    [Nextcloud File sync and sharing, a Drive alternative](https://meetrix.io/store/nextcloud/)
-    [Jitsi Meet Self-hosted video calls for 50 to 500 users](https://meetrix.io/store/jitsi-meet/)
-    [RustDesk Remote desktop AMI, a TeamViewer alternative](https://meetrix.io/store/rustdesk/)
-    [Coturn TURN/STUN for WebRTC, no per-minute relay fees](https://meetrix.io/store/coturn/)

[Browse all products](https://meetrix.io/store/)
