Install on Linux

Quick install (server + client)

sudo curl -fsSL https://raw.githubusercontent.com/latebit-io/demarkus/main/install.sh | bash

Run with sudo so the installer can write to /usr/local/bin and install the systemd service.

This installs demarkus-server, demarkus-token, demarkus, demarkus-tui, and demarkus-mcp.

With Let’s Encrypt TLS

sudo curl -fsSL https://raw.githubusercontent.com/latebit-io/demarkus/main/install.sh | \
  bash -s -- --domain yourdomain.com --root /srv/site

The installer:

  1. Runs certbot certonly --standalone to obtain the certificate
  2. Configures the server to use it
  3. Sets up a cron job for auto-renewal with zero-downtime reload (SIGHUP)

Prerequisite: Port 80 must be open for the Let’s Encrypt HTTP challenge.

With your own TLS certificate

sudo curl -fsSL https://raw.githubusercontent.com/latebit-io/demarkus/main/install.sh | \
  bash -s -- --tls-cert /path/to/cert.pem --tls-key /path/to/key.pem

Client only

curl -fsSL https://raw.githubusercontent.com/latebit-io/demarkus/main/install.sh | \
  bash -s -- --client-only

No sudo needed for client-only. Installs to ~/.local/bin if /usr/local/bin is not writable.

Read-only server (maximum security)

sudo curl -fsSL https://raw.githubusercontent.com/latebit-io/demarkus/main/install-readonly.sh | \
  bash -s -- --domain yourdomain.com

Installs the server inside a chroot with zero write access. Publish content locally with demarkus-publish. See Security Model for details.

What the installer does

Firewall

Open UDP port 6309:

sudo ufw allow 6309/udp

Managing the service

sudo systemctl status demarkus
sudo systemctl restart demarkus
sudo systemctl stop demarkus
journalctl -u demarkus -f

Upgrade

sudo demarkus-install update

Or re-run the install script — it preserves tokens, TLS certs, and content directory.

Uninstall

sudo demarkus-install uninstall

Build from source

git clone https://github.com/latebit-io/demarkus.git
cd demarkus
make all

Requires Go 1.22+.