Deploy

This page covers a production-ready deployment that requires multiple servers. If you want to deploy Hyvor Relay on for hobby or small projects (less than 25,000 emails/day), please refer to the Easy Deploy page which covers a single server deployment.

Infrastructure

Servers:

PostgreSQL

Hyvor Relay uses PostgreSQL as the database and also as the message queue. Set up a PostgreSQL server in a production-ready manner. We have tested Hyvor Relay with PostgreSQL 16.

  • Cloud Provider: If your cloud provider offers a managed PostgreSQL service, feel free to use it. It will make backups, failover, and scaling easier.
  • Self-Hosted PostgreSQL: This is the other option. Additional care will be needed for high availability.
  • YugabyteDB: YugabyteDB is a distributed SQL database that is compatible with PostgreSQL. It can be used as a drop-in replacement for PostgreSQL in Hyvor Relay (we use YugabyteDB in Hyvor Relay Cloud).

Since setting up a PostgreSQL server depends a bit on how your infrastructure is set up, we will not go into details here. Whichever option you choose, make sure that:

  • A dedicated database is created for Hyvor Relay. Recommended name: hyvor_relay.
  • A dedicated user is created with all privileges on the Hyvor Relay database and a strong password.
  • The PostgreSQL server is configured to allow connections from the app servers. We recommend fully disabling public access to the PostgreSQL server.
  • Backup strategies are in place.

App Server

Number of App Servers

The number of app servers you need depends on your expected email volume. Here are some rough guidelines, which are mostly on the safer side:

Server Count / Size
Expected Email Volume
1 server, 4GB RAM
1,000,000 emails/day
2 servers, 8GB RAM each
10,000,000 emails/day

Also, make sure to read the Scaling page on how to scale both PostgreSQL and email workers.

App Server Setup

We recommend using a Linux distribution like Ubuntu or Debian for the app servers. Our Cloud runs on Ubuntu 24.04 LTS. Each server should have Docker installed.