What Is Stacker?
Stacker is an open-source CLI tool that turns any project into a deployable Docker stack. Add a stacker.yml to your repo, and Stacker generates Dockerfiles, docker-compose definitions, reverse-proxy configs, and deploys locally or to cloud providers — optionally with AI assistance. It's like having a DevOps engineer in your terminal.
Quick Answer
stacker init --from-github owner/repo --with-ai
stacker deploy --target local
Stacker shallow-clones the repo, auto-detects the project type and services, generates a ready-to-use stacker.yml, and deploys with a single follow-up command. No YAML, no Docker expertise needed.
The Problem: "I Found a Cool Project, Now What?"
You find an interesting project on GitHub — a self-hosted analytics dashboard, an AI agent framework, an internal helpdesk. The README says "docker compose up" but then you discover:
- The compose file expects 14 environment variables you need to configure
- Three of those are secrets you're supposed to generate yourself
- The database needs manual initialization before the app starts
- Port mapping is wrong for your machine
- SSL needs configuring separately
What should take 30 seconds becomes a 30-minute debugging session. Stacker fixes this.
Installing Stacker
curl -fsSL https://raw.githubusercontent.com/trydirect/stacker/main/install.sh | bash
stacker --version
Stacker is a single static binary for macOS and Linux, x86_64 and ARM64. No runtime dependencies beyond Docker and git.
The Magic Command: stacker init --from-github
This is the feature that makes Stacker fundamentally different from every other deployment tool. You point it at any GitHub repo, and it does the rest:
# Deploy ArchiveBox (self-hosted web archiving)
stacker init --from-github ArchiveBox/ArchiveBox --with-ai
stacker deploy --target local
# Deploy Plausible Analytics (privacy-first analytics)
stacker init --from-github plausible/analytics --with-ai
stacker deploy --target local
# Deploy anything with a docker-compose.yml
stacker init --from-github owner/repo --with-ai
What happens under the hood:
- Shallow-clone the repo into a temp directory
- Auto-detect the project type (Node, Python, Rust, Go, PHP, static, or custom)
- Parse docker-compose.yml to identify services — the main app, databases, caches, queues
- Classify infrastructure (postgres, redis, mysql, mongo, rabbitmq, elasticsearch) and infer appropriate healthchecks
- Detect environment variables and generate
.env.examplewith secrets marked for generation - Generate a complete
stacker.ymlwith the correct app type, image or Dockerfile reference, port mappings, service dependencies, and monitoring config - Create
.stacker/Dockerfileand.stacker/docker-compose.ymlfor immediate deployment - Generate
scripts/generate-secrets.shthat usesopenssl rand -hexto fill in secret values
AI-Powered Config Generation
With --with-ai, Stacker scans the repo's README, docker-compose.yml, Dockerfile, package.json, and source files using an LLM to infer context that simple file detection can't discover — port mappings buried in documentation, environment variables documented in READMEs, service relationships, and deployment prerequisites.
Supports Ollama (local, free, private by default), OpenAI, and Anthropic:
# Local AI with Ollama (default, free)
stacker init --from-github owner/repo --with-ai
# OpenAI
stacker init --from-github owner/repo --with-ai \
--ai-provider openai --ai-api-key sk-...
# Anthropic
stacker init --from-github owner/repo --with-ai \
--ai-provider anthropic --ai-api-key $ANTHROPIC_API_KEY
# Remote Ollama server
stacker init --from-github owner/repo --with-ai \
--ai-endpoint http://192.168.1.100:11434 --ai-model qwen2.5-coder
If the AI provider is unreachable, Stacker falls back to template-based detection automatically. And if the model outputs docker-compose format instead of stacker format (common with smaller models), Stacker automatically converts it.
From Zero to Deployed in Two Commands
Here's the complete workflow for deploying any project you find on GitHub:
# 1. Generate configuration from the repo
stacker init --from-github floci-io/floci --with-ai --force
# 2. Review what was generated
stacker config validate
cat stacker.yml
# 3. Deploy locally
stacker deploy --target local
# 4. Check status
stacker status
# 5. View logs
stacker logs
What Gets Generated
After running stacker init --from-github, your directory contains:
stacker.yml— The single deployment configuration file.stacker/Dockerfile— Optimized for the detected project type.stacker/docker-compose.yml— Ready-to-use compose definition.env.example— Template with detected environment variablesscripts/generate-secrets.sh— Auto-generates secure random values for secrets
Healthchecks That Work Out of the Box
Stacker automatically infers appropriate healthchecks for infrastructure services:
- PostgreSQL:
pg_isready -U postgres(interval 5s, timeout 2s) - Redis:
redis-cli ping(interval 5s, timeout 2s) - MySQL/MariaDB:
mysqladmin ping -h localhost(interval 5s, timeout 2s) - MongoDB:
mongosh --eval 'db.adminCommand("ping")' - RabbitMQ:
rabbitmq-diagnostics -q ping - Elasticsearch:
curl -fsSL http://localhost:9200/_cluster/health
Security by Default
Stacker enforces several security best practices automatically:
- Secrets use
${VAR_NAME}syntax — never hardcoded passwords - Infrastructure ports bind to 127.0.0.1 — databases aren't exposed to the network
- Secrets generation is idempotent —
generate-secrets.shonly fills missing values, never overwrites existing ones - .env is gitignored — secrets never accidentally committed
Beyond Local: Deploy to Any Cloud
Once your stack works locally, deploy it to production on your own infrastructure:
# Deploy to your own server
stacker config setup server
stacker deploy --target server
# Deploy to Hetzner, DigitalOcean, AWS, Linode, or Vultr
stacker config setup cloud
stacker deploy --target cloud
You own the infrastructure. Stacker manages the deployment. No vendor lock-in, no platform markups on your cloud bill.
Open Source
The Stacker CLI is MIT-licensed and available on GitHub at github.com/trydirect/stacker. The deployment engine, visual Stack Builder, and marketplace are hosted services available at try.direct.
Getting Started
- Install:
curl -fsSL https://raw.githubusercontent.com/trydirect/stacker/main/install.sh | bash - Find a project: Browse GitHub for anything with a docker-compose.yml
- Deploy:
stacker init --from-github owner/repo --with-ai && stacker deploy --target local - Iterate: Edit
stacker.yml, re-runstacker deploy