oweme/deploy
agent 04d952872d Make the deploy panel-friendly: zero-config compose, env vars with defaults
- compose.yaml runs only the app by default; Caddy moved to the
  'standalone' profile (the panel brings its own Caddy and routes).
- No env_file: every setting is ${VAR:-default} in compose.yaml, so it
  can be set from the panel's Environment tab (or .env standalone).
- VAPID keys are generated on first start and kept in the data volume;
  the push subject defaults to https://<site domain>. gen-vapid.ts removed.
- PUSH_DISABLED=1 turns push off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FYo6JSV1fDU1fm3LU77iF
2026-10-09 22:24:22 +00:00
..
Caddyfile Add podman compose deployment, dev script and docs 2026-10-09 19:59:17 +00:00
Containerfile Add podman compose deployment, dev script and docs 2026-10-09 19:59:17 +00:00
README.md Make the deploy panel-friendly: zero-config compose, env vars with defaults 2026-10-09 22:24:22 +00:00

Deploying OweMe

compose.yaml (repo root) runs the app container: the Node server plus the built web client, listening on port 8080, with its data in the oweme-data volume. It needs no configuration: push keys are generated on first start and kept in the volume. Every setting is an optional environment variable, listed with its default in compose.yaml.

HTTPS comes either from the panel's Caddy or, standalone, from a Caddy container enabled with the standalone profile.

With the panel

  1. New app → Git repository: this repo, branch main. The panel finds compose.yaml in the repository root.
  2. Domain: point it at service app, port 8080. The panel publishes the port on 127.0.0.1 and its Caddy serves HTTPS.
  3. Environment (optional): any variable from compose.yaml, for example MAX_PHOTO_BYTES=5242880 or VAPID_SUBJECT=mailto:you@example.com. Untick Pass to every container. compose.yaml already passes each setting to the app, and the panel's per-container copy currently makes podman-compose fail with can't merge value of [KEY] … for variables the compose file also sets.
  4. Deploy. Check https://<domain>/api/health → {"ok":true}.

Changing a variable takes effect on the next deploy. Volume backups in the panel include the oweme-data volume (database, encrypted photos, push keys).

Standalone (no panel)

Requirements: Podman ≥ 4 with podman-compose ≥ 1.1 (for profiles), a domain with an A/AAAA record pointing at the server, and ports 80 and 443 (TCP, plus UDP 443 for HTTP/3) open.

git clone <repo> oweme && cd oweme
cp .env.example .env && chmod 600 .env
$EDITOR .env                                   # set DOMAIN
podman compose --profile standalone up -d --build
podman compose logs -f                         # Caddy gets the certificate on the first request

Updating: git pull && podman compose --profile standalone up -d --build.

Ports (rootless Podman)

Rootless Podman can't bind ports below 1024 by default. Pick one:

  1. Allow it (simplest):
    echo 'net.ipv4.ip_unprivileged_port_start=80' | sudo tee /etc/sysctl.d/90-unprivileged-ports.conf
    sudo sysctl --system
    
  2. Or publish high ports (HTTP_PORT=8080, HTTPS_PORT=8443 in .env) and redirect 80→8080 / 443→8443 in your firewall.

With rootless Podman, published ports go through rootlessport and are subject to the host firewall. Rootful container networking can add its own firewall rules around UFW, so don't rely on UFW alone if you run rootful.

Settings

All optional. Set them in the panel's Environment tab, or in .env for a standalone deploy.

Variable Default Purpose
MAX_PHOTO_BYTES 2097152 Max size of one uploaded (encrypted) photo
MAX_EVENT_BYTES 65536 Max size of one encrypted event
MAX_GROUP_BYTES 209715200 Storage cap per group (events + photos)
GROUP_CREATE_PER_HOUR 10 Group creations per client IP per hour
VAPID_SUBJECT https://<site domain> Contact sent to push services
VAPID_PUBLIC_KEY / VAPID_PRIVATE_KEY generated Pin push keys (set both); otherwise kept in the volume as vapid.json
PUSH_DISABLED 0 1 turns push notifications off
DOMAIN localhost Standalone only: Caddy's site address and certificate
BIND_ADDR 0.0.0.0 Standalone only: address Caddy's ports are published on
HTTP_PORT / HTTPS_PORT 80 / 443 Standalone only: host ports for Caddy

Deleting vapid.json from the volume (or changing pinned keys) invalidates every push subscription; people then turn notifications off and on again.

Backups

The oweme-data volume holds everything (SQLite database, encrypted photos, push keys). Its contents are end-to-end encrypted, so backups can be stored anywhere. Standalone:

podman volume export oweme_oweme-data > oweme-data-$(date +%F).tar

People can also download per-group backup files in the app.

Testing a deployment

From a machine with the repo and Node 24:

npm ci && E2E_BASE_URL=https://<domain> npx playwright test e2e/app.spec.ts

This creates a throwaway group on that server.