Skip to content
Skip to this exploration
All explorations

Practical self-hosting · intermediate

14 · Secrets should not become souvenirs

Keep credentials out of examples, logs and repositories.

10 min 5 sectionsv1

What you can take away

  • Review a configuration change for secret exposure.
  • Create a fake configuration diff containing only the literal placeholder `DEMO_NOT_A_SECRET`

Your trail through this idea

Checking saved progress…

A troubleshooting session succeeds, but its pasted configuration leaves a reusable password in an issue. The fix and the leak can happen in the same minute.

Prerequisite: complete the preceding lesson or bring its worksheet.

Mark sections complete when you choose. Reading alone does not mark them.

Understand the system

Compose secrets let selected services receive secret files. Applications must support reading those files, directly or through their documented configuration. This mechanism does not make the original host file harmless or eliminate the need for permissions and rotation. A placeholder in documentation and a live secret in protected storage serve different purposes.

Review the whole path: creation, storage, delivery, use, logging, backup, and retirement. A secret can escape through resolved configuration output, shell history, a screenshot, or a database dump. Removing it from the latest commit does not invalidate already copied credentials.

Checking saved progress…

Work through the case

Original review case: a change replaces API_TOKEN=DEMO_NOT_A_SECRET with a file reference and grants it to two services. The correct review asks whether both services need it, how the application reads it, and who can read the source file. It does not merely celebrate that the word 'secret' appears in YAML.

Checking saved progress…

Make something useful

Try this

Original exercise

Create a fake configuration diff containing only the literal placeholder DEMO_NOT_A_SECRET. Mark every place a real value could appear. Redesign it so only one fictional service receives the credential. Write a rotation sequence that keeps old and new credentials separate until the new one is tested, then revokes the old one. Do not test with a real token.

Checking saved progress…

Check your reasoning

A quick check · for your own learning

Does removing a leaked credential from the latest document revoke it?

Choose one answer

A self-study prompt. You can retry; this is not an exam.

Checking saved progress…

Keep the result and follow the sources

Success is an exposure map and a rotation plan. If a real secret is discovered in historical material, exclude it from the lesson and follow the service’s revocation process; editing prose alone is not credential recovery.

Sources and scope

  • Primary documentation or archival source, reviewed 14 November 2026. Additional direct links appear beside the claims they support.
  • Editorial basis: Ian's historical self-hosting questions and current repository inspection informed the case selection. Historical requests do not establish current deployment. Private chat records, credentials and host details are excluded.
  • Examples and exercises are original educational synthesis. External sources support the stated technical or historical context, not every hypothetical scenario.
Checking saved progress…

These checks are for reflection and practice. Your answers and reflection notes are not sent anywhere.

Back to all explorations