Documentation

Last updated in git: 2026-06-11

Backend families

Backends are where Everlock's service logic lives. They should stay transport-agnostic and avoid depending directly on SSH, HTTP, SMTP, or other frontend libraries.

Implemented families

BackendWhat it handles
backend-git-sshGit wire operations over the SSH transport
backend-ai-sshEmbedded AI prompting through the admin SSH session, plus image captioning for backend-image-http
backend-site-httpStatic files and rendered Markdown sites from git-backed stores
backend-image-httpImage and video storage plus gallery-like HTTP behavior
backend-admin-ssh / backend-admin-httpAdmin interaction surfaces
backend-dns-dnsGlobal authoritative DNS record logic served through frontend-dns
backend-dns-httpDNS records over HTTP (read/write API)
backend-oci-httpOCI distribution-compatible registry with Everlock auth and store-backed persistence
backend-mail-smtpInbound mail storage, forwarding, and submission-backed delivery rules
backend-mail-imapRead/write IMAP access on top of the SMTP backend's mail store, sharing the same versioned storage
backend-calendar-httpCalDAV calendars with Everlock auth and versioned .ics storage
backend-contacts-httpCardDAV contacts with Everlock auth and versioned .vcf storage
backend-oauth-httpOAuth2 / OIDC token issuance with versioned client and key storage

Shared resource crates

Some heavy resources are owned by their own crate so multiple backends can consume the same instance without loading it twice:

CrateOwned resourceConsumers
everlock-mail-storageMail tree layout, IMAP UID allocator, MailEventBusbackend-mail-smtp, backend-mail-imap
everlock-ai-runtimeEmbedded GGUF model + llama.cpp worker threadbackend-ai-ssh, backend-image-http
everlock-acmeACME account + challenge handlingfrontend-http

Multi-instance model

Backends differ in whether they can serve multiple independent instances from a single Everlock process, each on its own vhost.

BackendModelInstances managed via
backend-site-httpMulti-instance, multi-vhost/site create / /site set — hot-reload
backend-image-httpMulti-instance, multi-vhost/image create / /image set — vhost changes hot-reload, create/delete require restart
backend-oci-httpMulti-instance, multi-vhost/oci create / /oci set — hot-reload
backend-calendar-httpMulti-instance, multi-vhost/calendar create / /calendar set — restart required
backend-contacts-httpMulti-instance, multi-vhost/contacts create / /contacts set — restart required
backend-git-sshMulti-repo, single backend/git repo create — repositories within one backend
backend-mail-smtp / backend-mail-imapSingle shared store, multi-domain/mail domains create — domains within one store
backend-dns-dnsGlobal, single instance/dns zones create — zones within one backend
backend-admin-ssh / backend-admin-httpSingle instanceCLI flags only
backend-ai-sshSingle instanceCLI flags only

Hot-reload means vhost routing updates take effect immediately without restarting Everlock. Backends that require restart do so because their instance initialisation involves async startup work (spawning workers, opening connections) that cannot be done inline in a command handler.

Design rule

A backend should expose domain operations and storage rules. It should not own SSH packet parsing, HTTP routing, or SMTP session handling. Those live in frontends.

For a broader summary, continue with Frontends or Primitives.

backends reference