docker-selfhost

Design Docker Compose stacks with persistence, TLS, and named networks.

8|1|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/drewid74/ai_skills --skill docker-selfhost
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker-selfhost
Source: https://github.com/drewid74/ai_skills/tree/main/docker-selfhost
Command: npx skills add https://github.com/drewid74/ai_skills --skill docker-selfhost

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of setting up and operating reliable self-hosted Docker services—especially when containers restart, data isn’t persisting, HTTPS/proxying is misconfigured, containers can’t reach each other, or a stack must be migrated and backed up.

Core Features & Use Cases

  • Compose-first, production-ready setups: Generates pinned Docker Compose stacks with sensible defaults for reproducibility and maintainability.
  • Persistence that survives real life: Chooses bind mounts (and ZFS-friendly paths on TrueNAS SCALE) for snapshotable, migratable data.
  • Reverse proxy and secure exposure: Recommends Traefik with TLS, LAN-only Nginx Proxy Manager, or zero-trust Cloudflare Tunnel depending on access needs.
  • Container networking patterns: Uses named networks for service-to-service communication and host networking only when required by device protocols.
  • Operational safeguards: Avoids common anti-patterns like latest tags, leaking secrets, exposing DB ports publicly, or skipping healthy start ordering and tested backups.

Quick Start

Use the docker-selfhost skill to design a Docker Compose stack that runs a self-hosted service behind Traefik with HTTPS, persists its data on a ZFS dataset (or bind mount), and connects it to other containers via a named network.

Frequently Asked Questions about docker-selfhost

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

FAQPage Schema
How do I deploy self-hosted Docker services with persistent data and HTTPS?

Set up Docker Compose stacks with pinned image tags, named networks, and bind mounts to ensure data persistence across container restarts. Integrate Traefik with TLS for secure HTTPS exposure, avoiding common anti-patterns like using `latest` tags or exposing database ports.

How do I configure a reverse proxy for my Docker Compose stack?

Configure reverse proxy integration by deploying Traefik with TLS for external HTTPS access, using Nginx Proxy Manager for LAN-only environments, or establishing a zero-trust Cloudflare Tunnel. Named networks enable proper container-to-container connectivity for the proxy.

Does this Docker self-hosting approach work with TrueNAS SCALE?

Yes, this self-hosting approach supports TrueNAS SCALE deployments by selecting ZFS-friendly bind mount paths for data persistence. This enables snapshotable, migratable datasets while maintaining standard Compose-first operational safeguards like restart policies and health checks.

Why are my Docker containers losing data when they restart?

Docker containers lose data on restart when persistence is misconfigured. Fix this by defining bind mounts in your Docker Compose stack to map container data to host directories, ensuring application state survives container recreation and restarts.

What is the best way to handle secrets in a Docker Compose stack?

The best way to handle secrets in a Docker Compose stack is by loading them via a `.env` file. This prevents leaking sensitive credentials directly in the Compose configuration and avoids exposing database ports publicly.

How do I migrate and backup a self-hosted Docker stack safely?

Migrate and backup a self-hosted Docker stack safely by using bind mounts for snapshotable data paths and implementing guarded workflows for backup validation. This includes performing verified restores and ensuring healthy start ordering during the migration process.