Browse

Site backend

Site backend

The site family is currently implemented as backend-site-http.

What it is

The site backend serves Git-backed content stores over HTTP. A site is registered in Everlock system config, mapped to one or more hostnames, and backed by a repository that holds the actual content.

Today there are two practical modes:

  • html: serve files as they exist in the repository
  • markdown: render Markdown pages, generated lists, feeds, search, templates, taxonomies, and shortcodes

Current state

  • implemented and active
  • serves both plain static files and rendered Markdown sites
  • can host a public site like everlock.sh

How the operator flow works

There are three separate concerns that work together:

  1. enable the backend
  2. create a site entry
  3. push content into the store

1. Enable the backend

For a practical site setup, you normally enable both the site backend and the Git backend together:

/backends enable site-http git-ssh

The site backend serves content, and the Git backend is how you publish that content.

Expected result:

  enabled: site-http, git-ssh
  restart required

2. Create a site entry

Create a public Markdown site:

/site create everlock-docs vhost=docs.local mode=markdown

Or create a plain HTML site:

/site create landing vhost=landing.local mode=html

Expected output shape:

  Site 'everlock-docs' created (store: everlock-docs, auth: public).
  Granted admin write access to push content: */git/everlock-docs
  Add vhosts with: /site set everlock-docs vhost=<host>

What this does:

  • creates or registers the site name
  • associates it with a store name
  • maps one or more vhosts to that store
  • records the mode (html or markdown)
  • grants the creator write access to the Git store
  • grants the creator owner access on http/site/<site-name>

3. Push content

Once the site exists, clone the repository shown by /site list and push content into it:

git clone ssh://admin@localhost:2222/everlock-docs
cd everlock-docs
git add .
git commit -m "initial content"
git push

Everlock serves the updated content directly from that repository state.

Expected result:

  • the repository behaves like a normal Git checkout
  • git push publishes the new site state immediately
  • the HTTP site now serves the updated content from the same store

How public hosting fits in

If the site is meant to be public under a real hostname, there is one more layer involved: the HTTP frontend.

For example:

  • register the site vhost such as everlock.sh
  • configure frontend-http with plain HTTP and HTTPS listeners
  • provide an ACME contact email

Conceptually:

  1. the site backend knows that everlock.sh belongs to a given store
  2. the HTTP frontend sees that everlock.sh is a public hostname
  3. if HTTPS is enabled, the frontend manages ACME http-01
  4. once the certificate exists, the frontend serves the site over HTTPS

So the site backend owns the content mapping, while the HTTP frontend owns transport, TLS, and certificate lifecycle.

Expected startup shape for a public HTTPS host:

frontend-http: active vhosts: everlock.sh
frontend-http: binding HTTP listener on 0.0.0.0:80
HTTP server listening on http://0.0.0.0:80
frontend-http: issuing or renewing certificate for everlock.sh
...
frontend-http: certificate persisted for everlock.sh
frontend-http: binding HTTPS listener on 0.0.0.0:443 for 1 host(s)
HTTPS server listening on https://0.0.0.0:443

How data is persisted

Two kinds of state are involved:

Everlock system configuration

This includes:

  • site name
  • store name
  • vhosts
  • auth mode
  • site mode

That state is stored in the Everlock system store.

Site content repository

This includes:

  • HTML files
  • Markdown pages
  • templates
  • assets
  • images
  • site.toml

That content lives in the site's own Git-backed store and is updated by git push.

How auth works

Each site can be:

  • public
  • private

public means the built-in anon user has Reader on http/site/<site-name>. private means that anon grant is removed, so only explicitly granted users or groups can read the site.

Site modes and guides

Read next