<aside> 📱

Faraday is a Samsung Galaxy Fold 4 running Termux with runit supervision. It hosts the cluster's Postgres 18 instance, reachable from tailnet devices, and replaced Rowan's systemd Postgres as the database behind the in-cluster postgres Service in October 2026. It is not a k3s node.

</aside>

Overview

Device Samsung Galaxy Fold 4 (aarch64), Android kernel 5.10
Environment Termux, Termux:Boot, Tailscale Android app
Supervision runit (runsvdir ~/sv), started by Termux:Boot
Services postgres (with svlogd logger), sshd
Postgres 18.6, data dir $PREFIX/var/lib/postgresql, port 5432
SSH Termux sshd on port 8022, key auth
Storage 461 GB total, about 448 GB free at setup
Role in Cirrus Off-cluster database host; k3s pods reach it via the postgres Service + Endpoints in default

File layout

~ (/data/data/com.termux/files/home)
├── .termux/
│   ├── boot/start.sh          # Termux:Boot entrypoint
│   └── termux.properties      # defaults, untouched
├── .ssh/authorized_keys
├── scripts/stop.sh            # kills runit tree + postgres
├── sv/                        # runit service dir (runsvdir ~/sv)
│   ├── postgres/
│   │   ├── run
│   │   └── log/run            # svlogd -> ~/logs/postgres
│   └── sshd/run
└── logs/postgres/current      # timestamped postgres log

Boot and supervision

On boot, Termux:Boot runs start.sh, which cleans up stale processes, takes a wake lock so the CPU never sleeps, and starts runit in the background. runit then restarts postgres and sshd automatically if they exit.

~/.termux/boot/start.sh

#!/data/data/com.termux/files/usr/bin/bash

bash /data/data/com.termux/files/home/scripts/stop.sh
sleep 2
termux-wake-lock
runsvdir ~/sv &

~/sv/postgres/run

#!/data/data/com.termux/files/usr/bin/bash
exec 2>&1
exec postgres -D $PREFIX/var/lib/postgresql

~/sv/postgres/log/run

#!/data/data/com.termux/files/usr/bin/sh
exec svlogd -tt /data/data/com.termux/files/home/logs/postgres

~/sv/sshd/run

#!/data/data/com.termux/files/usr/bin/sh
exec 2>&1
exec sshd -D

~/scripts/stop.sh

#!/data/data/com.termux/files/usr/bin/bash

pkill -f runsvdir
pkill -f runsv
pkill -f postgres

Postgres configuration

postgresql.conf (non-default lines)