# 1. Download the new binary (replace v0.1.535 with the target version)
VERSION=v0.1.535
curl -Lo /tmp/certforge.tar.gz \
"https://github.com/CertForge-LLC/certforge-releases/releases/download/${VERSION}/certforge_${VERSION#v}_linux_amd64.tar.gz"
tar -xzf /tmp/certforge.tar.gz -C /tmp certforge
chmod +x /tmp/certforge
# 2. Verify it starts (--version doesn't need config)
/tmp/certforge --version
# 3. Stop the service
systemctl stop certforge
# 4. Keep the old binary as a rollback copy, then replace
cp /usr/local/bin/certforge /usr/local/bin/certforge.prev
cp /tmp/certforge /usr/local/bin/certforge
# 5. Start the service
systemctl start certforge
systemctl status certforge