Files
amethyst/geode/packaging/systemd/geode.service
T
Claude 0a30231196 feat(geode): add a release & distribution pipeline
geode was runnable only via ./gradlew :geode:run and was absent from CI.
Give it the same release process as the amy CLI (it's the same kind of
application-plugin JVM module), plus the pieces a long-running server
daemon needs that a one-shot CLI does not.

- Main.kt: add terminal --version/-V and --help/-h flags so a packaged
  binary has a fast, exit-0 command (Homebrew test block, package smoke
  checks, Docker healthcheck).
- build.gradle.kts: jlinkRuntime + geodeImage (portable flat app-image
  with a bundled JRE, plus config.example.toml + geode.service under
  share/) + jpackageDeb/jpackageRpm, mirroring cli/. No Compose to
  exclude — geode depends only on :quartz.
- Dockerfile + .dockerignore: multi-stage image (gradle installDist ->
  temurin JRE), the primary channel for relay operators.
- packaging/: systemd unit, macOS hardened-runtime entitlements, and a
  reference Homebrew formula.
- scripts/asset-name.sh: geode_asset_name/collect_geode_assets under the
  canonical geode-<version>-<family>-<arch>.<ext> scheme.
- create-release.yml: build-geode matrix (tarball + deb/rpm + no-JRE jvm
  bundle, with a serve+NIP-11 smoke test of the jlink image) and a
  docker-geode job pushing ghcr.io/<owner>/geode:<version> (+ :latest).
- bump-homebrew-geode-formula.yml: auto-sync the reference formula on
  stable releases.
- build.yml: run :geode:test in CI (it ran in no workflow before).
- README.md + plans/2026-07-24-geode-release.md: operator docs + design.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KCdJwdhGtmLZ12ViS56S3k
2026-07-24 17:56:50 +00:00

51 lines
1.7 KiB
Desktop File

# systemd unit for the geode Nostr relay.
#
# Install (paths assume the .deb/.rpm or the portable tarball unpacked to
# /opt/geode — adjust ExecStart if you put it elsewhere):
#
# sudo useradd --system --home /var/lib/geode --shell /usr/sbin/nologin geode
# sudo mkdir -p /var/lib/geode /etc/geode
# sudo cp /opt/geode/share/geode/config.example.toml /etc/geode/geode.toml # then edit
# sudo cp /opt/geode/share/geode/geode.service /etc/systemd/system/geode.service
# sudo chown -R geode:geode /var/lib/geode
# sudo systemctl daemon-reload
# sudo systemctl enable --now geode
#
# Logs: journalctl -u geode -f
[Unit]
Description=geode Nostr relay
Documentation=https://github.com/vitorpamplona/amethyst/blob/main/geode/README.md
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=geode
Group=geode
# Point --config at your edited copy. Drop the flag to run on built-in
# defaults (0.0.0.0:7447, in-memory store — events vanish on restart).
ExecStart=/opt/geode/bin/geode --config /etc/geode/geode.toml
Restart=on-failure
RestartSec=5
# A relay holds one file descriptor per WebSocket; the distro default of 1024
# caps it well below 1k connections. Raise to match [network] tuning.
LimitNOFILE=65536
# systemd creates + owns /var/lib/geode (0750, User:Group above). Point
# [database].file there, e.g. file = "/var/lib/geode/events.db".
StateDirectory=geode
WorkingDirectory=/opt/geode
# Hardening — geode needs no elevated access. Loosen only if a custom
# IEventStore writes outside its StateDirectory.
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
ReadWritePaths=/var/lib/geode
[Install]
WantedBy=multi-user.target