Copy the prompt below and paste it into a fresh Claude Code session. Claude will walk you through deploying a Phantom agent step by step.
Before starting, make sure you have:
- Docker and Docker Compose installed
- An Anthropic API key from console.anthropic.com
- A Slack workspace where you are an admin (or can install apps)
Copy everything between the dashes and paste it into Claude Code:
I need you to help me deploy a Phantom agent using Docker. Phantom is an autonomous AI co-worker that runs in a Docker container, communicates via Slack, and gets better every day.
Please walk me through this interactively, one step at a time. Ask me for information when you need it. Do not proceed to the next step until the current one is confirmed.
Download the Docker Compose file and env template:
mkdir phantom && cd phantom
curl -fsSL https://raw.githubusercontent.com/ghostwright/phantom/main/docker-compose.user.yaml -o docker-compose.yaml
curl -fsSL https://raw.githubusercontent.com/ghostwright/phantom/main/.env.example -o .envTell me to do these steps manually (you cannot do them for me):
- Go to https://api.slack.com/apps
- Click "Create New App" > "From an app manifest"
- Select my workspace
- Switch to the YAML tab
- Paste the manifest from https://raw.githubusercontent.com/ghostwright/phantom/main/slack-app-manifest.yaml
- Click Create
- Click "Install to Workspace" > Allow
- After creating, go to Settings > Basic Information and change the app name to whatever I want my Phantom to be called
Now collect three values:
- Bot Token: Go to "OAuth & Permissions" in the sidebar. Copy the token starting with xoxb-
- App Token: Go to "Basic Information" > "App-Level Tokens" > "Generate Token and Scopes". Name it "socket", add the "connections:write" scope, click Generate. Copy the token starting with xapp-
- My Slack User ID: Click my profile in Slack > three dots > "Copy member ID". Starts with U.
Ask me to paste each value as I get it. Confirm each one looks correct (xoxb- prefix for bot, xapp- prefix for app, U prefix for user ID).
Ask me for the Anthropic API key (starts with sk-ant-).
Once you have all four values, edit the .env file:
ANTHROPIC_API_KEY=<the api key>
SLACK_BOT_TOKEN=<the bot token>
SLACK_APP_TOKEN=<the app token>
OWNER_SLACK_USER_ID=<the user id>
PHANTOM_NAME=<whatever name I chose>
Optional additions:
PHANTOM_MODEL=claude-opus-4-7(default) orclaude-sonnet-4-6for lower costRESEND_API_KEY=<key>if the user wants email sending from {name}@ghostwright.dev
Show me the file (with secrets redacted) so I can confirm it looks right.
docker compose up -dThis starts three containers: Phantom, Qdrant (vector memory), and Ollama (embeddings). First boot takes 2-3 minutes to pull the embedding model and initialize config.
Check health:
curl -s http://localhost:3100/health | python3 -m json.toolTell me:
- Does status show "ok"?
- Does it show the Phantom name?
- Does channels.slack show true?
- Are there any errors?
Also check logs:
docker logs phantom --tail 30Tell me if it says "Introduction sent as DM."
Tell me to check Slack. I should have received a DM from my Phantom introducing itself. If I did, the deployment is complete.
If I want to deploy to a cloud VM instead of running locally:
- Provision an Ubuntu 22.04+ VM (minimum 2 vCPU, 4GB RAM)
- SSH in and install Docker
- Copy the .env and docker-compose.yaml to the VM
- Run
docker compose up -d
For HTTPS with a custom domain, set up Caddy as a reverse proxy (see docs/getting-started.md for details).
- Each Phantom needs its own Slack app (separate tokens per user)
- OWNER_SLACK_USER_ID controls who can interact with the Phantom (only that person gets responses)
- The Phantom DMs the owner directly on first start
- The .env file contains secrets and must NOT be committed to git
- To update later:
docker compose pull phantom && docker compose up -d phantom
That's it. Paste everything between the dashes into Claude Code and it will walk you through the deployment interactively.