Parley / Self-hosting

Self-hosting Parley

From an empty server to a working list. You will need an hour or two, a domain, and someone comfortable running a Docker container.

Version 0.3. Parley has not yet carried a real group’s mail. Start with a test list and a few friendly members. The repository has a live-run checklist for that first trial.

Would rather not run a server? We can run it for you.

What you need

  • A small server that can run Docker: a cheap virtual server or a machine at home. Parley is one small program with a SQLite file, so it needs very little.
  • A domain you control, ideally a subdomain such as lists.example.org for both the web pages and the list addresses.
  • A Resend account. Resend sends and receives the mail, so you do not run a mail server. Parley currently supports Resend only.
  • An HTTPS reverse proxy in front of Parley, such as Caddy, nginx, Traefik or Cloudflare. Parley does not terminate TLS itself.

Run one Parley instance. The rate limiter and delivery loop live inside the process, so it is not designed to be scaled to several copies.

1. Set up Resend

Parley sends and receives all its mail through Resend. You need four things from it: a verified domain, receiving switched on for that domain, an API key, and a webhook. Make a Resend account first (the free plan is fine for a trial; see costs), then follow these in order.

1. Add and verify your domain

  1. In Resend open Domains and choose Add Domain.
  2. Enter the host of your public address, such as lists.example.org. Parley’s list address starts as list@ followed by that host, and Resend can only send as a domain you have verified there. (You can change the list address later under Settings, but its domain must also be verified in Resend.)
  3. Choose a region. Any works; pick the one nearest your members.
  4. Resend now shows DNS records. Add every one of them at the company that hosts your DNS, then wait for the domain to show as Verified. That can take a few minutes or longer.

2. Turn on receiving

  1. Open the domain’s page in Resend and switch on Receiving. A dialog shows one more DNS record: an MX record.
  2. Add it at your DNS host. Mail sent to your list address now goes to Resend.
  3. If that name already has MX records because it has real mailboxes, do not add Resend’s alongside them: Resend only receives mail when its MX record has the lowest priority number, and it would take over your mailboxes. Use a subdomain for the list (lists.example.org) instead of your main domain.

3. Create an API key

  1. Open API Keys and choose Create API Key.
  2. Name it (“Parley”) and set the permission to Full access. Parley reads the mail Resend receives as well as sending, and a Sending-access key is only allowed to send.
  3. Copy the key now: it starts re_ and is only shown once. This is your RESEND_API_KEY.

4. Create the webhook

  1. Open Webhooks and choose Add Webhook.
  2. For the endpoint enter https://lists.example.org/webhooks/resend (your public address plus /webhooks/resend).
  3. Select these events: email.received, email.sent, email.delivered, email.bounced and email.complained, then save.
  4. Open the webhook you just made and copy its Signing secret. It starts whsec_. This is your RESEND_WEBHOOK_SECRET.

The webhook will report failures until Parley is running in the next step; that is fine, Resend retries.

2. Run Parley

Generate a key that signs the links in your members’ inboxes. Keep it safe: changing it later breaks every link already sent.

openssl rand -base64 32

Put your settings in a file called parley.env, with no quotes around the values:

PARLEY_BASE_URL=https://lists.example.org
RESEND_API_KEY=re_...
RESEND_WEBHOOK_SECRET=whsec_...
PARLEY_LINK_KEY=the-base64-value-from-above
PARLEY_TRUST_PROXY_HEADER=X-Forwarded-For
PARLEY_OWNER_EMAIL=you@example.org

Where each value comes from:

SettingWhere to get it
PARLEY_BASE_URLThe public HTTPS address you will give people. Its host is the domain you added in Resend (step 1).
RESEND_API_KEYThe key you created under API Keys in Resend (step 1.3).
RESEND_WEBHOOK_SECRETThe signing secret on your webhook’s page in Resend (step 1.4).
PARLEY_LINK_KEYThe value you generated with openssl above. Parley makes up its own; nothing to look up.
PARLEY_OWNER_EMAILYour own email address, the one you will sign in with.
PARLEY_TRUST_PROXY_HEADERThe header your reverse proxy sets to the visitor’s address (explained below).

PARLEY_OWNER_EMAIL is you. On its first start Parley creates your list and makes that address its owner, so there is no separate setup command. Everything else about the list (its name, subject prefix and address) you set in the admin afterwards.

The PARLEY_TRUST_PROXY_HEADER line tells Parley to read each visitor’s address from the header your reverse proxy sets (Caddy sets X-Forwarded-For). Without it every visitor looks like the proxy, so the hourly limits on sign-up and sign-in links become one limit for the whole site, and a handful of requests can lock everyone out. Parley uses the last address in the header, so have exactly one proxy in front of it.

Run the published image. Pin a version rather than using latest, so an upgrade is something you choose:

docker run -d --name parley --restart unless-stopped \
  -p 127.0.0.1:8080:8080 \
  -v parley-data:/data \
  --env-file parley.env \
  ghcr.io/grantstephens/parley:0.3.1

The image is built for amd64 and arm64 and published to GitHub Container Registry for each release (see the releases). It runs as an unprivileged user in a minimal base image with no shell, keeps the database in /data, and checks its own health. -p 127.0.0.1:8080:8080 exposes it only to the machine, so your reverse proxy is the one way in.

Prefer to build it yourself? Clone the repository and run docker build -t parley:local ., then use parley:local in place of the image name.

Check it is alive: curl -i http://127.0.0.1:8080/healthz should return 200 OK. The repository also has a Docker Compose example with a hardened setup for Portainer or docker compose.

3. Put it behind HTTPS

Point your domain’s web address at the server and have a reverse proxy serve HTTPS to Parley on port 8080. With Caddy that is two lines:

lists.example.org {
    reverse_proxy 127.0.0.1:8080
}

Parley uses PARLEY_BASE_URL to build every link it emails, so it must be the public HTTPS address people will see.

4. Sign in

Parley has already created your list. For now it is called “Parley”, its address is list@lists.example.org (from your public address), and joining is invite-only. Open https://lists.example.org/signin, enter your owner address and follow the emailed link. If the email arrives, sending works. Then open Email setup in the admin: it checks your DNS and asks Resend whether the key works, the domain is verified and receiving, and the webhook has been called, and says what to fix.

The Members page then lists what is left to do: give the list its own name and subject prefix (the word in square brackets at the front of every subject, such as [allotment list]), check the list address, all under Settings, and add your own name under My account so your posts do not show as “A member”. If you started without PARLEY_OWNER_EMAIL, add yourself from the command line:

docker exec parley /parley member add parley you@example.org --role owner --name "Your Name"

5. Configure it in the admin

  1. Settings: write the privacy notice, choose how people join (invite-only is the safe start), and set who can post and what happens to posts from non-members (they are discarded by default; you can hold them for a moderator instead).
  2. Email setup: the check reads your DNS and asks Resend whether your API key works, your domain is verified and receiving, and the webhook has been called. It tells you what is missing. Fix anything it flags.
  3. Members and Import: add people yourself, or import a CSV and have each person confirm.
  4. Setup: optionally add your logo, colour and homepage wording.
  5. Send a test post from a member address to your list address and watch it arrive.

A command line remains for scripting and for when you cannot sign in: parley list set, parley member add and friends. The README lists them all.

Add a sign-up form to your website

Paste this into any static page. It works without JavaScript. The website field is a honeypot that real visitors never fill in, so keep it hidden.

<form method="post" action="https://lists.example.org/lists/parley/subscribe">
  <label>Email <input type="email" name="email" required></label>
  <label>Name (optional) <input type="text" name="name"></label>
  <label><input type="checkbox" name="consent" value="1" required>
    I agree to receive this list's email and have read how my address is used.</label>
  <input type="text" name="website" tabindex="-1" autocomplete="off" hidden>
  <button type="submit">Join</button>
</form>

The visitor lands on a “check your email” page, whether or not the address is already a member, and nothing is stored until they confirm. The list must be set to open or approval joining, and needs a privacy notice.

Configuration reference

Everything is an environment variable.

VariableMeaning
PARLEY_BASE_URLPublic HTTPS address of the service. Required.
RESEND_API_KEYYour Resend API key. Required.
RESEND_WEBHOOK_SECRETThe whsec_… signing secret of your Resend webhook. Required.
PARLEY_LINK_KEYSigns the unsubscribe, manage and confirm links. Base64, at least 32 bytes. Required. Keep it.
PARLEY_LINK_KEY_PREVIOUSThe old key while rotating. It verifies old links but never signs new ones.
PARLEY_TRUST_PROXY_HEADERThe header your one trusted proxy sets to the visitor’s address, such as X-Forwarded-For (Caddy) or CF-Connecting-IP (Cloudflare). Without it every visitor looks like the proxy, and the per-visitor limits on sign-up and sign-in links become one limit for the whole site. The server warns at start when it is missing.
*_FILE variantsRESEND_API_KEY_FILE, RESEND_WEBHOOK_SECRET_FILE, PARLEY_LINK_KEY_FILE and PARLEY_LINK_KEY_PREVIOUS_FILE read the secret from a file, for Docker secrets.
PARLEY_DBSQLite path. /data/parley.db in the image.
PARLEY_ADDRListen address. 0.0.0.0:8080 in the image.
PARLEY_OWNER_EMAILWho owns the first list. On first start, when there is no list yet, Parley creates one (called “Parley”, at list@ plus the host of PARLEY_BASE_URL) and makes this address its owner. Recommended. The list’s name, subject prefix and address are edited under Settings.
PARLEY_ACCENTOptional default colour for buttons and highlights, like #c8402a. A colour saved in the admin wins.

Never commit keys to a repository. Keep real values in your environment or in Docker secrets.

Behind Cloudflare

If Cloudflare sits in front of your server:

  • Exempt POST /webhooks/resend and POST /u/* from bot protection and managed challenges. Mail providers and mail clients cannot solve a challenge.
  • Bypass the cache for /c/, /u/, /m/, /r/, /a/, /signin, /me, /admin and /lists/.
  • Turn off Email Address Obfuscation and Rocket Loader for the host.
  • Set PARLEY_TRUST_PROXY_HEADER=CF-Connecting-IP, and make sure the container is reachable only through Cloudflare or your proxy.

Backups, upgrades and costs

Backups

Everything lives in one SQLite database. Back up the .db file together with its -wal and -shm files, or take a consistent copy with SQLite’s .backup command from the host. Keep a copy of PARLEY_LINK_KEY somewhere safe too. Backups cannot be edited, so if you erase a member, tell people how long backups are kept.

Upgrading

To move to a newer release, back up the database, pull the new image, then stop and recreate the container with the new version tag. The database schema is at version 1 and there are no migrations yet. A database made by a different schema version is refused rather than half-used, and a release that needs a migration will say so in its notes.

Costs

Parley is free software. You pay for the server (small) and for the email provider. Every member who receives a post is one email sent, so a post to 80 members is 80 emails, and digests send one per member per period. Posts received and system emails such as sign-in links and confirmations count too. As of December 2026 Resend’s free plan allows 3,000 emails a month but no more than 100 a day, which a lively list will hit, and its Pro plan is $20 a month for 50,000 emails. Registered nonprofits can apply to Resend for 50% off its paid plans. The pricing page works through examples, and resend.com/pricing has the current figures.

Stuck?

Check the FAQ, or open an issue on GitHub with what you tried.