Documentation

Last updated in git: 2026-06-11

Running multiple sites

A single Everlock instance can serve any number of sites simultaneously. Each site has its own Git-backed content repository, its own vhost mapping, and its own auth and mode settings. The HTTP frontend routes requests to the right site based on the Host header — the vhost model.

How routing works

When a request arrives at the HTTP frontend, Everlock reads the Host header and looks up which site that hostname is mapped to. Each site can have one or more vhosts. If no site is mapped to that host, the response is 404.

Request: GET / HTTP/1.1
Host: docs.example.com
→ routes to site "my-docs"

Request: GET / HTTP/1.1
Host: blog.example.com
→ routes to site "my-blog"

Request: GET / HTTP/1.1
Host: unknown.example.com
→ 404: No site configured for host: unknown.example.com

Vhost matching is case-insensitive and port-agnostic — docs.example.com:8080 matches the vhost docs.example.com.

Creating a second site

Each site is a separate unit. Create it, clone its repository, and push content independently from any other site.

/site create my-blog vhost=blog.example.com mode=markdown

Expected output:

  Site 'my-blog' created (store: my-blog, auth: public).
  Granted admin write access: */git/my-blog
  Serving: blog.example.com

Clone and add content:

git clone ssh://admin@localhost:2222/my-blog
cd my-blog
# add site.toml, index.md, layouts/, ...
git add .
git commit -m "initial blog"
git push

The blog is now live at blog.example.com and completely independent of any other site on the instance.

Listing all sites

/site list

Example output:

  my-docs  (store: my-docs,  auth: public,        mode: markdown)
    vhosts: docs.example.com, docs.local
    clone:  ssh://admin@localhost:2222/my-docs

  my-blog  (store: my-blog,  auth: public,        mode: markdown)
    vhosts: blog.example.com
    clone:  ssh://admin@localhost:2222/my-blog

  internal (store: internal, auth: private, mode: markdown)
    vhosts: internal.local
    clone:  ssh://admin@localhost:2222/internal

Adding more vhosts to an existing site

A single site can respond to multiple hostnames. This is useful for www and apex redirects, or for serving the same content on both a local development hostname and a public one.

/site set my-docs vhost=docs.local
/site set my-docs vhost=www.docs.example.com

Both vhosts serve identical content from the same repository. Changes pushed to the repository are immediately visible on all vhosts.

Removing a vhost

/site unset my-docs vhost=www.docs.example.com

Hot-reload applies immediately; no restart needed.

Mixing modes and auth across sites

Each site carries its own mode and auth settings independently of all other sites. You can freely mix:

SiteModeAuthUse case
public-docsmarkdownpublicPublic-facing documentation
blogmarkdownpublicPublic blog
stagingmarkdownprivatePrivate staging environment
landinghtmlpublicPre-built static landing page
intranetmarkdownprivateInternal knowledge base

Changing mode on a live site

/site set staging mode=html

Changing auth on a live site

/site set staging auth=private

Both changes are hot-reload: they apply immediately without restarting Everlock.

Shared repositories across sites

By default, a site's store name matches its site name. You can share one repository between two sites by specifying a different store name at creation time:

/site create my-docs   store=shared-content vhost=docs.example.com mode=markdown
/site create my-mirror store=shared-content vhost=docs-mirror.example.com mode=markdown

Both sites read from the same shared-content store. A git push to shared-content updates both sites simultaneously.

This is an advanced pattern. More commonly, you want separate repositories for separate sites.

Deleting a site

/site delete my-blog

This removes the site registration and all vhost mappings. It does not delete the underlying Git repository or its content. You can re-create a site pointing to the same store name to recover a deleted site's content.

Full example: docs and blog on one instance

Here is the complete setup for a public documentation site and a separate blog, both served from the same Everlock instance.

1. Enable required backends

/backends enable site-http git-ssh

2. Create both sites

/site create docs vhost=docs.example.com mode=markdown
/site create blog vhost=blog.example.com mode=markdown

3. Configure HTTPS (if public)

Edit config/frontend-http.toml:

listen_http  = "0.0.0.0:80"
listen_https = "0.0.0.0:443"
acme_email   = "ops@example.com"
redirect_http_to_https = true

Restart once to apply the listener changes. Everlock issues certificates for both docs.example.com and blog.example.com automatically.

4. Clone and push content for each site

git clone ssh://admin@localhost:2222/docs
cd docs
# add your documentation content
git push

cd ..
git clone ssh://admin@localhost:2222/blog
cd blog
# add your blog content
git push

Each repository is independent. The two sites share no content unless you configure them to use the same store.

Read next

sites ops vhost multi-site