// self-host

Run your own relay.

The relay is the one piece of CarrierPony that lives on a server instead of on your phone. It never sees your messages, only sealed envelopes on their way between devices. It is open source, and you can run your own.

What the relay does

It stores and forwards. When you send a message, your device seals it and hands the relay an encrypted envelope addressed to a fingerprint. The relay holds that envelope until the other device picks it up, then deletes it. It never holds plaintext, names, or keys, and it authenticates each device with a challenge it signs, so the relay learns nothing beyond fingerprints, sizes, and timestamps.

One thing to know about notifications

Push notifications are the exception, and it is worth understanding before you start. Waking the app in the background needs the app publisher's Apple and Google credentials, which are tied to the published app. A relay you run yourself does not have those, so it cannot push to installs from the App Store or Google Play. Nothing else changes: your app still receives every message by checking in while it is open. If you want background push too, you would need to build and ship your own copy of the app with your own credentials.

Docker, the fast way

With Docker installed and a domain pointed at your server:

git clone https://github.com/norsehorse-dev/CarrierPony-Relay.git
cd CarrierPony-Relay
cp .env.example .env

Edit .env to set your domain and database passwords, then bring it up:

docker compose up -d

Caddy fetches a Let's Encrypt certificate for your domain automatically, the database loads on first boot, and the relay comes up at https://your-domain.

On a bare server

If you would rather not use Docker, the installer sets everything up on a fresh Ubuntu or Debian server with Apache, MySQL and PHP:

git clone https://github.com/norsehorse-dev/CarrierPony-Relay.git
cd CarrierPony-Relay
sudo ./install.sh

It installs the dependencies, creates the database, writes the config, sets up the virtual host, and requests a certificate. INSTALL.md walks through every step by hand if you want to see what it does.

Point the app at it

Open Settings, then Relay, and enter your relay's address. You can also set it during first-run setup, before you pair, which is the cleaner path: a relay is a world of its own, so you can only exchange messages with people whose app points at the same one. Set it before you pair, or re-pair afterward.

The code

The relay is CarrierPony-Relay on GitHub, published under Apache-2.0. It is a small PHP application: read it, run it, change it. The crypto that seals your messages is PGPonyCore, also open source.