Docs /Hosting OwnBase

Email

The server sends no email unless you give it an SMTP account. With one, people can add an email address in Account settings → Security, get a link to set a new password from Forgot your password? on the sign-in screen, and be sent an invite from Invite people. Without one, none of that shows anywhere, and an admin resets a forgotten password from People as before.

It needs three settings. The account goes in the environment, so its password stays out of the process list:

OWNBASE_SMTP_URL='smtps://chat%40example.com:[email protected]:465'
OWNBASE_MAIL_FROM='Team chat <[email protected]>'
ownbase-server --public-url https://chat.example.com
  • OWNBASE_SMTP_URL (or --smtp-url): smtps:// for a server that starts with TLS, usually port 465, or smtp:// for one that upgrades to it, usually port 587. Write @ in the username or password as %40, and / as %2F.
  • OWNBASE_MAIL_FROM (or --mail-from): the sender. Most providers accept only an address on a domain you have verified with them.
  • --public-url: where the links in each mail lead. The server will not start sending without it, since a link built on whatever address a request named could lead somewhere else with someone's token in it.

The start-up lines say Email: from … through smtps://user:REDACTED@host:465.

With Fastmail, for example: make an app password under Settings → Privacy & Security → App passwords, then use smtps://you%40fastmail.com:<app password>@smtp.fastmail.com:465 and an address of your account as the sender. Gmail works the same way with an app password and smtp.gmail.com:465. A sending service such as Postmark, Resend or Amazon SES gives you an SMTP username and password for the same URL shape.

How it behaves:

  • An address counts once it is confirmed. Adding or changing one asks for the account's password, then mails a link that works once, for 24 hours. One confirmed address belongs to one account, in any letter case. Asking for an address another account has is answered as usual, and that mailbox is told instead, so the answer does not say who has an account.
  • A link to set a new password goes only to a confirmed address. It works once, for 30 minutes, and stops working if the password is changed another way first. Setting the new password signs the account out everywhere. Two-step sign-in is still asked for afterwards, so a mailbox alone does not get past it. While single sign-on is required, only the owner is sent one.
  • Asking for a link answers the same, as soon, for an address no account uses. The mail goes after the answer, so the time taken does not say either.
  • Mail is rationed: three to one address, then one each five minutes, whoever asks; ten requests from one account or network address, then two a minute. A refusal is the same for an address nobody uses.
  • An invite by email is a new invite for that address alone: it works once, for 7 days, whatever the link on screen allows. It shows in the dialog's list of codes, where revoking it stops the mailed link. Whoever sends it is told if the mail server did not take it, and then no invite is kept. The account made with it gets that address, already confirmed, unless another account here has it; it is used up even in a workspace anyone may join.
  • The mail is plain text with a small HTML copy: the workspace's name, what to do, the link and who to ask if it was not you. No pictures, nothing loaded from elsewhere, no tracking. Tokens sit after # in the link, so they reach neither the server's log nor another site.

This page is made from docs/DEPLOYMENT.md.