Nomploy Nomad Packs

← All packs

conduit v0.1.0

Messaging

Conduit — a lightweight, self-hosted Matrix homeserver written in Rust: run your own end-to-end-encrypted chat with federation, in a single binary with an embedded database (no PostgreSQL needed). Deployed as a host-networked Nomad service with a persistent data volume.

nomad-pack run conduit --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- conduit

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

1 task http 6167 1 volume image matrixconduit/matrix-conduit:latest tracks :latest image bumped today
Variables 11
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run conduit -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "conduit"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The Conduit container image. Pin a tag in production.
image = "matrixconduit/matrix-conduit:latest"

# Host port for the Matrix client/federation API (CONDUIT_PORT).
port = 6167

# The Matrix server name / domain (CONDUIT_SERVER_NAME). This becomes part of every user id (@user:<server_name>) and CANNOT be changed later. Set it before deploying.
server_name = "matrix.example.com"

# Token required to register new accounts (CONDUIT_REGISTRATION_TOKEN). Share it with people you want to let sign up. CHANGE THIS.
registration_token = "change-me-registration-token"

# Federate with other Matrix servers (CONDUIT_ALLOW_FEDERATION).
allow_federation = true

# Named volume for the Conduit database (/var/lib/matrix-conduit). Holds all messages, rooms, and keys.
data_volume = "conduit_data"

# Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# Resources for the Conduit task.
resources = {
    cpu    = 500
    memory = 512
  }
NameTypeDefaultDescription
job_name string
"conduit"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"matrixconduit/matrix-conduit:latest"
The Conduit container image. Pin a tag in production.
port number
6167
Host port for the Matrix client/federation API (CONDUIT_PORT).
server_name set me string
"matrix.example.com"
The Matrix server name / domain (CONDUIT_SERVER_NAME). This becomes part of every user id (@user:<server_name>) and CANNOT be changed later. Set it before deploying.
registration_token set me string
"change-me-registration-token"
Token required to register new accounts (CONDUIT_REGISTRATION_TOKEN). Share it with people you want to let sign up. CHANGE THIS.
allow_federation bool
true
Federate with other Matrix servers (CONDUIT_ALLOW_FEDERATION).
data_volume string
"conduit_data"
Named volume for the Conduit database (/var/lib/matrix-conduit). Holds all messages, rooms, and keys.
constraints list
[]
Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 500
    memory = 512
  }
Resources for the Conduit task.
Back up this pack

This pack stores data in one Docker named volume: conduit_data

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/conduit_data/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/conduit_data/_data backup:<bucket>/conduit_data

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

conduit

Conduit — a lightweight Matrix homeserver written in Rust. Run your own federated, end-to-end-encrypted chat that works with any Matrix client (Element, etc.). It ships as a single binary with an embedded RocksDB database — no PostgreSQL, no extra services.

Single host-networked Nomad service with a persistent data volume.

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run conduit --registry=nomploy

Configure

Variable Default Description
port 6167 Client/federation API port (CONDUIT_PORT).
server_name matrix.example.com CONDUIT_SERVER_NAME — your domain. Set before deploying; it's baked into every user id (@user:server) and can't change.
registration_token change-me-… CONDUIT_REGISTRATION_TOKEN — required to create accounts.
allow_federation true Federate with other Matrix servers.
data_volume conduit_data /var/lib/matrix-conduit — messages, rooms, keys.
image matrixconduit/matrix-conduit:latest Container image. Pin a tag in production.
resources { cpu = 500, memory = 512 } Task resources.

Point a Matrix client at http://<node-ip>:6167; new users need the registration token.

Federation & TLS: for other servers (and most clients) to reach you, server_name must resolve to this host and be served over HTTPS on 443, or you must advertise the Conduit port via a /.well-known/matrix/server file or a _matrix._tcp SRV record. Put a TLS reverse proxy in front. Pin the job to the node holding the volume with constraints.