deploy

Deployment instructions for running Capsule on an AWS EC2 virtual server using Docker containers and Traefik, a service that handles secure web traffic and routing.

In plain words
What is it for?
Use it to prepare an EC2 server, pull Capsule images, configure HTTPS, and run its frontend, API, PostgreSQL database, and Redis service.
Why use it?
They describe the required server access, domain setup, containers, and connections needed to put the application online.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/kynto-consulting/capsule/deploy
Clone the repo
git clone --depth 1 https://github.com/Kynto-Consulting/capsule

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,243 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01243
Opus 5 $0.00000 $0.00622
Sonnet 5 $0.00000 $0.00249
Haiku 4.5 $0.00000 $0.00124

Measured 2d ago against content hash 9ee2af021207, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade D, and why

deploy scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo usermod -aG docker ubuntu

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://get.docker.com | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://get.docker.com | sh
.claude/commands/deploy.md · 220 lines

How it starts

The opening of the file, as written. The whole thing — 220 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Deploy Commands — Capsule

Overview

Instructions for deploying Capsule to an AWS EC2 instance. Capsule runs as Docker containers behind a Traefik reverse proxy with TLS termination.


Prerequisites

Requirement Details
AWS CLI Configured with appropriate IAM credentials
SSH key Access to the target EC2 instance
Docker & Compose Installed on the EC2 instance
Domain DNS pointing to the EC2 public IP
GitHub PAT For pulling images from GHCR

Deployment Architecture

                    ┌──────────────────────────────────────────┐
                    │            EC2 Instance                   │
Internet ──► :443 ──┤  Traefik (TLS)                           │
                    │    ├── /api/*  → capsule-server:8080     │
                    │    └── /*      → capsule-frontend:3000   │
                    │                                          │
                    │  PostgreSQL :5432                         │
                    │  Redis      :6379                         │
                    └──────────────────────────────────────────┘

Step 1: Prepare the EC2 Instance

# SSH into the instance
ssh -i ~/.ssh/capsule-key.pem ubuntu@<EC2_PUBLIC_IP>

# Install Docker (if not already installed)
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker ubuntu

# Install Docker Compose plugin
sudo apt-get update
sudo apt-get install docker-compose-plugin -y

# Create application directory
sudo mkdir -p /opt/capsule
sudo chown ubuntu:ubuntu /opt/capsule

Step 2: Configure Environment

# On the EC2 instance
cat > /opt/capsule/.env << 'EOF'
# Application
CAPSULE_ENV=production
CAPSULE_LOG_LEVEL=info
CAPSULE_SECRET_KEY=<generate-with-openssl-rand-hex-32>

# Database
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=capsule
POSTGRES_USER=capsule
POSTGRES_PASSWORD=<strong-password>
DATABASE_URL=postgresql://capsule:<password>@postgres:5432/capsule?sslmode=disable

# Redis
REDIS_URL=redis://redis:6379/0

# Domain & TLS
DOMAIN=capsule.yourdomain.com
[email protected]

# GHCR Auth
GHCR_TOKEN=<github-pat>
EOF

chmod 600 /opt/capsule/.env

Read the full file on GitHub · 220 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 220 lines · 0 tokens per session scan D 9ee2af021207

Subscribe to this mod's changes

deploy is a command published in the GitHub repository Kynto-Consulting/capsule (2 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,243 tokens. A static security scan graded it D with 3 findings (asks for root, downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.