Saves every Claude Code and GitHub Copilot answer on your own computer and makes it searchable.
440
Never lose an AI answer again. PromptBackup keeps every prompt and answer from Claude Code, GitHub Copilot and Claude Desktop in a database on your own computer, and makes them searchable across all your projects.
http://localhost:18080/mcp.localhost.Website: promptbackups.com. The same guide, step by step: promptbackups.com/docker.
You need Docker with the Compose plugin (Docker Desktop includes it). In an empty folder:
curl -fsSLO https://promptbackups.com/docker-compose.yml
docker compose up -d
Then open http://localhost:18080. Port 18080 already taken? Start it with
PROMPTBACKUP_PORT=18081 docker compose up -d, and use that port in the steps below.
The Compose file runs this image with its own PostgreSQL 17. Only your computer can reach the app, and the database isn't published at all:
name: promptbackup
services:
db:
image: postgres:17-alpine
environment:
POSTGRES_DB: promptbackup
POSTGRES_USER: promptbackup
POSTGRES_PASSWORD: ${PROMPTBACKUP_DB_PASSWORD:-promptbackup}
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U promptbackup -d promptbackup"]
interval: 5s
timeout: 5s
retries: 12
restart: unless-stopped
app:
image: ${PROMPTBACKUP_IMAGE:-connctedkart/promptbackup:latest}
depends_on:
db:
condition: service_healthy
environment:
DB_URL: jdbc:postgresql://db:5432/promptbackup
DB_USERNAME: promptbackup
DB_PASSWORD: ${PROMPTBACKUP_DB_PASSWORD:-promptbackup}
ports:
- "127.0.0.1:${PROMPTBACKUP_PORT:-18080}:18080"
volumes:
- backups:/data/backups
restart: unless-stopped
volumes:
db:
backups:
docker network create promptbackup
docker run -d --name promptbackup-db --network promptbackup \
-e POSTGRES_DB=promptbackup -e POSTGRES_USER=promptbackup -e POSTGRES_PASSWORD=change-me \
-v promptbackup_db:/var/lib/postgresql/data --restart unless-stopped postgres:17-alpine
docker run -d --name promptbackup-app --network promptbackup -p 127.0.0.1:18080:18080 \
-e DB_URL=jdbc:postgresql://promptbackup-db:5432/promptbackup \
-e DB_USERNAME=promptbackup -e DB_PASSWORD=change-me \
-v promptbackup_backups:/data/backups --restart unless-stopped connctedkart/promptbackup:latest
Choose your own password instead of change-me. Keep 127.0.0.1: in the port, so that only your computer can reach
PromptBackup.
The commands below are for a macOS or Linux terminal, or Git Bash on Windows.
claude mcp add --scope user --transport http prompt-backup http://localhost:18080/mcp
curl -fsSL https://promptbackups.com/claude-instructions.md >> ~/.claude/CLAUDE.md
The first line connects PromptBackup for all your projects. The second adds the instructions to back up every answer; run it once. Then restart Claude Code.
Run MCP: Open User Configuration from the command palette and make your mcp.json contain PromptBackup:
{
"servers": {
"prompt-backup": { "type": "http", "url": "http://localhost:18080/mcp" }
}
}
If the file already lists other servers, add only the "prompt-backup" line inside "servers". Then add the
instructions that ask Copilot to back up every answer, and reload VS Code (Developer: Reload Window):
mkdir -p ~/.copilot
curl -fsSL https://promptbackups.com/copilot-instructions.md >> ~/.copilot/copilot-instructions.md
Use Copilot Chat in Agent mode, where it can use PromptBackup's tools.
Click the GitHub Copilot icon in the status bar, choose Edit settings, and under MCP click
Edit in mcp.json. Add the same "prompt-backup" entry inside "servers", as for VS Code. Then paste
the instructions under
Settings › Tools › GitHub Copilot › Customizations › Global, and use Copilot Chat in Agent mode.
Run /mcp add, name the server prompt-backup, choose HTTP and enter http://localhost:18080/mcp. It reads the
same ~/.copilot/copilot-instructions.md as VS Code, so add the instructions as shown above if you haven't yet.
Open Settings › Developer › Edit Config and add PromptBackup to mcpServers:
"prompt-backup": {
"command": "docker",
"args": ["exec", "-i", "promptbackup-app-1",
"java", "-jar", "/app/prompt-store.war", "mcp-stdio"]
}
If you started PromptBackup without Compose, the container is called promptbackup-app instead of
promptbackup-app-1. Quit Claude Desktop and open it again; the first time Claude uses a PromptBackup tool, choose
Always allow. On macOS, if Claude can't find docker, write its full path instead, such as
/usr/local/bin/docker.
| Environment variable | Default | What it does |
|---|---|---|
DB_URL | none: set it | Your PostgreSQL 17 database, such as jdbc:postgresql://db:5432/promptbackup |
DB_USERNAME | promptbackup | The database user |
DB_PASSWORD | empty | The database password |
PROMPTSTORE_BACKUP_CRON | 0 30 2 * * * | When the nightly backup runs (second, minute, hour, day, month, weekday) |
PROMPTSTORE_ATTACHMENTS_MAX_BYTES | 104857600 | The largest image, video or audio file kept with a note (100 MB) |
PROMPTSTORE_ALLOWED_HOSTS | localhost,127.0.0.1,[::1],::1 | The host names PromptBackup answers to |
The Compose file also reads PROMPTBACKUP_PORT (default 18080) and PROMPTBACKUP_DB_PASSWORD (default
promptbackup; only the app can reach the database, but you can choose your own the first time you start it).
promptbackup_db. The nightly backups are in promptbackup_backups (the
container's /data/backups), and the app's Backup page lists them.docker compose pull && docker compose up -d. Your data stays.docker compose down. Adding -v also deletes your data.latest: the newest release.1.3.0: PromptBackup 1.3.0, whose Chrome extension can save to a PromptBackup on your network.1.2.0: PromptBackup 1.2.0, which adds the Claude Desktop connection.1.1.1: PromptBackup 1.1.1.Every tag is built for linux/amd64 and linux/arm64, so it runs on Intel and AMD computers, ARM servers and Macs
with Apple silicon.
localhost, and refuses requests from other websites' pages. Publish its port
on 127.0.0.1, as above.PromptBackup is free for personal and work use under the
PromptBackup license. It isn't open source. The image also contains Eclipse
Temurin (GPLv2 with the Classpath Exception) and other open-source parts: see /app/THIRD-PARTY-NOTICES.txt in the
image.
A question or a problem? Contact us. Missing something? Suggest a feature.
Content type
Image
Digest
sha256:e9a5353d5…
Size
136.3 MB
Last updated
1 day ago
docker pull connctedkart/promptbackup