Nomploy Nomad Packs

← All packs

siyuan v0.1.0

Apps

SiYuan — a privacy-first, self-hosted personal knowledge base built on Markdown blocks: outline everything, backlink and transclude notes, use databases and flashcards, all stored locally in plain files. A powerful, offline-capable Notion alternative. Deployed as a host-networked Nomad service with a persistent workspace volume.

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

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

2 tasks http 6806 1 volume image b3log/siyuan:latest tracks :latest image bumped today
Variables 9
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The SiYuan container image. Pin a tag in production.
image = "b3log/siyuan:latest"

# Host port for the SiYuan web UI. The container listens on 6806.
port = 6806

# Access (lock-screen) password required to open the workspace (--accessAuthCode). CHANGE THIS — anyone with it can read/write your notes.
access_auth_code = "change-me-please"

# Named volume for the SiYuan workspace (/siyuan/workspace): all notes, assets, and settings.
workspace_volume = "siyuan_workspace"

# 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 SiYuan task.
resources = {
    cpu    = 500
    memory = 512
  }
NameTypeDefaultDescription
job_name string
"siyuan"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"b3log/siyuan:latest"
The SiYuan container image. Pin a tag in production.
port number
6806
Host port for the SiYuan web UI. The container listens on 6806.
access_auth_code set me string
"change-me-please"
Access (lock-screen) password required to open the workspace (--accessAuthCode). CHANGE THIS — anyone with it can read/write your notes.
workspace_volume string
"siyuan_workspace"
Named volume for the SiYuan workspace (/siyuan/workspace): all notes, assets, and settings.
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 SiYuan task.
Back up this pack

This pack stores data in one Docker named volume: siyuan_workspace

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/siyuan_workspace/_data

rclone (sync to S3/R2)

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

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

siyuan

SiYuan — a privacy-first, self-hosted personal knowledge base built around Markdown blocks. Outline and nest everything, backlink and transclude notes, build databases and flashcards, and keep it all in plain local files — a powerful, offline-capable Notion alternative.

Single host-networked Nomad service with a persistent workspace volume. A prestart task chowns the volume so the SiYuan user (uid/gid 1000) can write it.

Deploy

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

Configure

Variable Default Description
port 6806 Web UI port. The container listens on 6806.
access_auth_code change-me-please Lock-screen password (--accessAuthCode). Change it — it's the only gate on your notes.
workspace_volume siyuan_workspace /siyuan/workspace — all notes, assets, settings.
image b3log/siyuan:latest Container image. Pin a tag in production.
resources { cpu = 500, memory = 512 } Task resources.

Open the URL and unlock with your access code; notes are stored as Markdown + JSON in the workspace volume, so they're easy to back up and portable. The SiYuan desktop/mobile apps can sync to this server. Serves plain HTTP — front it with a reverse proxy for TLS. Pin the job to the node holding the volume with constraints.