hetzbot-rotate-service

Rotate a service's Postgres password and update its .env file.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/tomspiegl/hetzbot --skill hetzbot-rotate-service
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hetzbot-rotate-service
Source: https://github.com/tomspiegl/hetzbot/tree/main/skills/ops/rotate-service
Command: npx skills add https://github.com/tomspiegl/hetzbot --skill hetzbot-rotate-service

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the secure rotation of a Postgres password for a single service on a specified host, updating credentials and restarting the service to apply changes while minimizing downtime.

Core Features & Use Cases

  • Rotate a service's Postgres password on-demand for a given host and service.
  • Update /srv/<service>/.env with the new credentials and restart the service.
  • Supports idempotent runs with pre-flight checks and post-rotation validation.

Quick Start

Trigger a rotation by telling the agent to rotate the service on the chosen host.

Frequently Asked Questions about hetzbot-rotate-service

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rotate a Postgres password for a single service without causing downtime?▼

To rotate a Postgres password safely, this Skill automates the credential update on the host, rewrites the service .env file, and performs a controlled restart with post-rotation validation to minimize downtime.

What is the safest way to update Postgres credentials across a fleet of remote hosts?▼

Safely updating Postgres credentials across remote hosts requires per-service rotation with pre-flight safety checks. This Skill executes a rotate.sh script on the designated host and verifies service continuity after applying the new password.

How do I trigger on-demand Postgres credential rotation for a specific service?▼

Triggering on-demand Postgres credential rotation involves instructing the agent to rotate the target service on the chosen host, which executes the rotation and rewrites the /srv/<service>/.env file with the new credentials.

Does Postgres password rotation require manual environment file updates on the host?▼

Postgres password rotation does not require manual environment file updates. The Skill automatically rewrites the /srv/<service>/.env file with the new credentials and restarts the service to apply the changes.

What happens if Postgres credential rotation fails during a service restart?▼

If rotation encounters issues during a service restart, the Skill's pre-flight checks and post-rotation validation are designed to catch failures, though specific rollback behavior depends on the host's rotate.sh script implementation.

Can I run Postgres password rotation idempotently on a remote host?▼

Yes, you can run Postgres password rotation idempotently on a remote host. The Skill supports idempotent runs with pre-flight checks to ensure safe, repeatable credential updates across the service fleet.