Upgrades & maintenance
Back up the primary relational database and verify site configuration sync before upgrading components.
Migrating from v3.6.x to v4.0.0
v4.0.0 replaces the legacy OpenResty runtime with the Pingora-based openflare-edge gateway. Record each node's dedicated token beforehand and reconfigure legacy performance settings under Performance policies.
-
Upgrade OpenFlare Server to v4.0.0+ and wait for automatic migrations and snapshot compilation.
-
Stop legacy services on each edge host and install
openflare-edgefollowing Deploy OpenFlare Edge using the original node token (preserving node ID, metrics, and domain bindings):sudo systemctl stop openflare-agent openresty 2>/dev/null || true sudo systemctl disable openflare-agent openresty 2>/dev/null || true -
Verify HTTP/HTTPS traffic on each migrated node before moving to the next host.
Upgrading to configuration contract v4 (in-memory TLS keys)
Contract v4 (tls-memory-keys-v1) removes TLS private keys from edge disk snapshots:
- Upgrade Server and all
openflare-edgenodes together to versions supportingPOST /api/v1/agent/tls/keys. - Migration
202611230002_scrub_config_version_private_keys.sqlautomatically strips legacy private keys from stored snapshots and triggers recompilation. - During control-plane outages, cold-restarted edge nodes recover HTTP routes immediately from
snapshot.jsonand hydrate HTTPS keys into memory automatically once connectivity returns, with no restart needed.
OpenFlare Server upgrades
Back up the database
# PostgreSQL
docker compose exec postgres pg_dump -U openflare openflare > openflare_backup_$(date +%Y%m%d).sql
# SQLite
cp ./openflare-data/openflare.db ./openflare-data/openflare_backup_$(date +%Y%m%d).dbUpdate the service
# Docker Compose
docker compose pull && docker compose up -d
# Source build
git fetch --tags && git checkout <TARGET_VERSION_TAG>
make build-embedded && ./bin/openflare-server allOn startup, the Server applies pending goose migrations and recompiles site snapshots.
OpenFlare Edge updates
-
Console remote update: Open Nodes > node details and click Update Edge Node for a stable or Canary tag, or enable Auto-update Node (checks stable tags every 6 hours).
-
Host script update: Preserves tokens, snapshots, and GeoIP databases, and adds
CAP_NET_RAWif missing:curl -fsSL https://raw.githubusercontent.com/Rain-kl/OpenFlare/main/scripts/update-openflare-edge.sh | sudo bash # Append canary for prereleases, or --version edge-vX.Y.Z to pin -
Docker update: Pull
:latest(or:canary) and recreate the container while keeping theopenflare-edge-datavolume.
OpenFlare DNS updates
-
Console remote update: Linux systemd hosts with
openflare-dns-update.pathenabled support single or batch updates (with automatic rollback on failed readiness) under DNS > SmartDNS > Authoritative Instances. -
Host script update: Preserves
identity.json,last-snapshot.bin, and GeoIP files:curl -fsSL https://raw.githubusercontent.com/Rain-kl/OpenFlare/main/scripts/update-openflare-dns.sh | sudo bash # Append canary for prereleases, or --version dns-vX.Y.Z to pin -
Docker update: Pull
:latest(or:canary) and recreate the container keeping theopenflare_dns_datavolume.
OpenFlare Relay and OpenFlared updates
-
Console remote update: On non-root Linux systemd hosts, trigger staged updates or enable 6-hour stable checks (
next -> trial -> active) from Relay or Tunnel details under Tunnels. -
Host script update:
curl -fsSL https://raw.githubusercontent.com/Rain-kl/OpenFlare/main/scripts/update-openflare-relay.sh | sudo bash curl -fsSL https://raw.githubusercontent.com/Rain-kl/OpenFlare/main/scripts/update-openflared.sh | sudo bash # Append canary for prereleases, or --version tunnel-vX.Y.Z to pin -
Docker update: Pull the latest image and recreate the container with the existing volume and environment variables.
Rollbacks and troubleshooting
If a component fails to start after an update, inspect service logs:
sudo journalctl -u openflare-edge -n 100 --no-pager
sudo journalctl -u openflare-dns -n 100 --no-pager
sudo journalctl -u openflare-relay -n 100 --no-pager
sudo journalctl -u openflared -n 100 --no-pagerEach updater preserves existing healthy state or restores the previous binary automatically on startup failure. To pin or roll back manually, rerun the component updater with --version <TAG>; existing tokens and state directories stay intact.