Cove

live · 1.0.4internal

My own little vault for the passwords, keys, and secrets my projects need.

What it is

Cove is a self-hosted secrets manager that stores the passwords, API keys, and other credentials my projects need.

It’s part of the infrastructure that lets my applications run without having to manage sensitive configuration separately for every deployment.

Why I made it

Cove came from the same idea as Lighthouse.

I wanted to own and understand as much of my server’s infrastructure as I could, rather than relying on someone else’s service to handle everything for me.

That included managing the secrets my projects need.

If I was going to build a deployment system that automatically updated my applications, I also needed a way for those applications to get their credentials without manually setting everything up each time.

I wanted the whole process to work together.

So instead of treating secrets management as something separate, I built Cove to be part of the system.

How it works

Cove stores secrets in an encrypted database and provides access to them through an internal API.

Each project can have its own credentials and permissions, so it only gets access to the secrets it needs.

Cove also keeps a history of secret access and changes, making it possible to see what happened and restore previous values when necessary.

The main integration is with Lighthouse.

When Lighthouse deploys a project, it asks Cove for the secrets that project needs and passes them into the application’s environment.

That means my applications can receive their configuration automatically, without me having to manually copy credentials around every time I deploy something.

Where it’s at

Cove is running on my server and is part of my everyday deployment process.

It works alongside Lighthouse to manage the credentials my applications need, and both have become part of the foundation everything else relies on.

Like Lighthouse, I’ll keep improving it as my needs change. The goal is to keep building a system where I can spend less time maintaining my infrastructure and more time working on the projects I actually want to make.

Changelog

1.0.4latest1 fix · 7 changes

changed

  • docker logs cove is JSON: one record per line, through blackboxlog. LOG_FORMAT=text or APP_ENV=DEV gives readable lines, and LOG_LEVEL sets the level. With plain cove, the logs and the prompt still share the terminal.
  • Every line has a level and fields: a request is request with method, path, status, duration_ms, source and ip; failures are ERROR with err; refused batches and bootstraps and blocked addresses are WARN. Keys are named in key and keys and callers in source, names Blackbox doesn’t hide, so the logs still say who read what. Values, tokens and the vault key are never logged.
  • A startup failure is an ERROR record: Cove can't start, with the reason in err. It used to be a plain cove: … line. CLI commands still print cove: ….
  • An outage is logged twice, not every 10 seconds: database unreachable when readiness checks start failing and database reachable again when they recover.
  • Lines no longer carry Cove’s version: Blackbox reads it from Docker’s labels. status, cove version and /v0/version still report it.
  • Database errors no longer put a word straight after token: or secret:, which Blackbox would hide.
  • Go 1.27.3: picks up the standard library’s security fixes. Building locally needs Go 1.27.3 or newer.

fixed

  • When a migration failed, the ones applied before it in the same run weren’t logged.
1.0.35 changes

changed

  • The version comes from Lighthouse: COVE_VERSION=${LIGHTHOUSE_DEPLOY_VERSION:-dev} in the compose file, so a release no longer needs the version written in by hand.
  • Tests run in the Dockerfile’s test stage instead of GitHub Actions: Lighthouse runs gofmt, vet and the tests with -race before deploying Cove, and a failure stops the deploy. The integration tests against Postgres run locally.
  • .gitattributes keeps Go, SQL and shell files LF on Windows, so gofmt agrees locally and in Docker.
  • Documentation: the key naming standard is PROJECT_PLATFORM_ROLE_TYPE, and database keys are connection strings only.
  • CHANGELOG version headings are dated: GitHub Releases, which Lighthouse now publishes, carry the date.
1.0.25 changes

changed

  • COVE_VERSION in docker-compose.yml is v1.0.2, so status and version report the running version again (v1.0.1 still reported v1.0.0).
  • Explanatory comments moved out of docker-compose.yml into the documentation.
  • Code comments trimmed to the ones that explain why.
  • DOCUMENTATION.md: the release steps now say Cove deploys when a version is tagged, not on a push to main.
  • Nothing to do.
1.0.06 new · 5 fixes · 21 changes

changed

  • Database migrations. Cove now manages its schema with built-in migrations (11 of them) and refuses to start on an unmigrated database. Create the cove_owner / cove_migrator / cove_app / cove_reader roles and set COVE_MIGRATE_DATABASE_URL . Migration 00003 renames columns, so v0.2.0 can’t run against a migrated database: take a backup first.
  • No published port. Clients must use http://cove:2100 on the spark network; http://<server>:2100 stops working.
  • Non-root container. Run sudo chown -R 10001:10001 /srv/server/storage/cove before the first start.
  • The container runs cove serve with no TTY. The CLI is docker exec -it cove /cove shell; docker attach no longer gives a prompt.
  • The master token is gone. COVE_CLIENT_SECRET is no longer read: remove it from the .env. Every client needs a project token (token create), and requests with the old shared token get 401. The X-Cove-Source header is ignored and 400 missing_source no longer exists: a request is recorded under its token’s name.
  • The bootstrap endpoint is closed by default: run bootstrap open <project> when onboarding a client. It hands out that project’s own token.
  • Precise error statuses: a duplicate create is 409, updating a missing key 404, decrypt and database failures 500. Success codes are unchanged.
  • The first start records the vault key. After that, Cove refuses to start with a different VAULT_ENCRYPTION_KEY; change it only with cove rotate-key.
  • vault.json and APP_VAULT_PATH are gone; APP_MARKER_DIR is now only APP_MARKER_PATH.
  • Building needs Go 1.27.1 or newer.
  • Per-project tokens, each limited to key patterns, read-only or read/write, managed with the new token command. Only a hash is stored. No token has access to everything unless you create one; emergency access is the CLI on the server.
  • Trustworthy audit: the event log and request log record the token’s name, which the caller can’t fake.
  • The event log is append-only for the running app; every operation and its audit record are saved in one transaction.
  • Vault key fingerprint: Cove refuses to start with the wrong key, and values encrypted with two keys can never be mixed.
  • cove rotate-key re-encrypts the whole vault, history included, in one transaction.
  • Rate limiting: 10 failed attempts a minute from an address block it for 5 minutes.
  • Bootstrap gate: closed by default, one handout per opening, time-limited, optional network allowlist, every attempt logged; it hands out a project’s own token.
  • No port published; container runs as a non-root user with a read-only filesystem, no capabilities and no-new-privileges; base image pinned.
  • Nothing sensitive in logs: the CLI is no longer attached to docker logs; request logs never include values or tokens; read events no longer store a copy of the value.
  • Built with Go 1.27.1 and updated dependencies, fixing 26 known vulnerabilities in Go 1.25.1, pgx and x/text.
  • HTTP server timeouts; strict key validation; the .env is written owner-only; .env and local state kept out of the Docker build.

added

  • CLI: cove shell (line editing, history, Tab completion), one-shot commands, and new commands generate, rename, restore, search, info, history, status, token, bootstrap open/lock/status. Grouped help, help <command> with examples, and guides help setup and help patterns. Messages on stderr with symbols; NO_COLOR respected.
  • POST /v0/batch: read up to 100 secrets in one request, all or nothing.
  • GET /v0/ready (checks the database; used by the Docker healthcheck) and GET /v0/version.
  • Optional event-log retention for read events (COVE_EVENT_LOG_RETENTION_DAYS).
  • The key naming standard PROJECT_PLATFORM_TYPE, with a CLI warning for non-standard names.
  • cove migrate status|up, cove rotate-key, cove version.

fixed

  • The updated_at trigger (it never fired correctly in v0.2.0).
  • Concurrent updates could interleave; each change now locks its row and is logged in order.
  • A failed decrypt no longer counts as a read.
  • restore finds a secret’s values from before a rename.
  • Many clearer error and startup messages.

all releases on GitHub

More to look at

all projects
  • Lighthouse

    live · 1.6.1internal

    I push code to GitHub, and my server takes it from there.

  • CoveClient

    live · 1.0.0Go library

    One consistent way for my Go projects to communicate with Cove.

  • Blackbox

    live · 0.0.2internal

    One place to find out what my server's containers have been saying.