Rustpad — a small, fast collaborative text editor: multiple people edit the same document in real time, right in the browser. Deployed as a single host-networked Nomad service.
Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.
Source ↗ Project ↗ ★ 4.1k ⚑ Report an issue
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "rustpad"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The Rustpad container image. Pin a tag in production.
image = "ekzhang/rustpad:latest"
# Host port for the Rustpad web UI.
port = 3030
# Named volume mounted at /data (SQLite persistence for documents).
data_volume = "rustpad_data"
# Days a document is kept after its last edit before garbage collection (EXPIRY_DAYS).
expiry_days = 1
# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources.
resources = {
cpu = 300
memory = 256
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "rustpad" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "ekzhang/rustpad:latest" | The Rustpad container image. Pin a tag in production. |
| port | number | 3030 | Host port for the Rustpad web UI. |
| data_volume | string | "rustpad_data" | Named volume mounted at /data (SQLite persistence for documents). |
| expiry_days | number | 1 | Days a document is kept after its last edit before garbage collection (EXPIRY_DAYS). |
| constraints | list | [] | Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 300
memory = 256
} | The task resources. |
No variables match.
This pack stores data in one Docker named volume:
rustpad_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/rustpad_data/_data
rclone (sync to S3/R2)
rclone sync /var/lib/docker/volumes/rustpad_data/_data backup:<bucket>/rustpad_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.
Rustpad — a small, fast collaborative text editor. Open a link and several people edit the same document together in real time, with live cursors — no account needed. Great for quick shared notes, pair-coding scratchpads and interviews.
Single host-networked Nomad service. This pack enables SQLite persistence so documents survive restarts.
nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run rustpad --registry=nomploy
| Variable | Default | Description |
|---|---|---|
port |
3030 |
Web UI port (PORT). |
expiry_days |
1 |
Days a document is kept after its last edit before garbage collection (EXPIRY_DAYS). |
image |
ekzhang/rustpad:latest |
Container image. Pin a tag in production. |
data_volume |
rustpad_data |
/data — SQLite persistence (SQLITE_URI=/data/rustpad.db). |
resources |
{ cpu = 300, memory = 256 } |
Task resources. Rustpad is very lightweight. |
Documents are addressed by the URL fragment (e.g.
/#my-doc) — anyone with the link can edit, so put Rustpad behind an authenticating reverse proxy if it shouldn't be public. Pin the job to the node holding the volume withconstraints. Raiseexpiry_daysto keep pads around longer.