Self-hosting
Email confirmation
Confirm a sign-up address by email before an account is created.
By default anyone can register any address, and the account exists at once. Give the server an SMTP account and it confirms the address first.
What changes#
- The person submits their name and email. The server creates nothing and emails a link.
- They open the link and press Confirm. Only then are the account and its key created, and the key is shown once.
- The link works once and expires after 24 hours.
The answer to the form is the same whether or not the address already has an account, so it cannot be used to find out who is registered. An address that already has an account gets a short notice instead of a link. The same address can ask again after two minutes.
This applies to the web form, POST /register, fuzzy register and the MCP register tool, so an agent cannot register itself: it asks the person to confirm and hand over the key. Signing in with GitHub or Google never needs it, since the provider has already verified the address.
Set it up#
Use any SMTP service (a transactional provider is best, since mail from a home server is often rejected):
FUZZY_SMTP_HOST=smtp.example.com
FUZZY_SMTP_PORT=587
FUZZY_SMTP_USER=...
FUZZY_SMTP_PASS=...
FUZZY_MAIL_FROM=FuzzyShare <[email protected]>
- Port
587upgrades to TLS with STARTTLS. Port465uses TLS from the start. The server will not send a password over a connection without TLS, except to the local machine. FUZZY_SMTP_USERandFUZZY_SMTP_PASSgo together, andFUZZY_MAIL_FROMis required. A wrong value stops the server at start.- Set up SPF and DKIM for the sending domain with your provider, or the mail lands in spam.
- With
FUZZY_SMTP_HOST=logthe server prints each message to its log instead of sending it. Use it only for development: the log then holds the confirmation links.
GET /config reports email_confirmation: true when it is on.
Good to know#
- Unconfirmed sign-ups live in the data directory for at most 24 hours and are swept after that. At most 5000 can wait at once.
- The server sends no other email: no newsletters and no marketing.