HUB
Sign inSign up

connctedkart/promptbackup

By connctedkart

•Updated 1 day ago

Saves every Claude Code and GitHub Copilot answer on your own computer and makes it searchable.

Image
Machine learning & AI
Developer tools
0

440

connctedkart/promptbackup repository overview

⁠PromptBackup

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.

  • Saved automatically, word for word. Your AI tools send each answer to PromptBackup's MCP server at http://localhost:18080/mcp.
  • Easy to find again. Search for exact phrases, close matches or regular expressions, and filter by project, model, tag and date.
  • Keep the best. Put the answers you want to keep in notebooks, export them as PDF, and get a backup every night.
  • Private. Your answers stay on your computer. PromptBackup has no cloud service and no analytics, and it only answers requests addressed to localhost.

Website: promptbackups.com⁠. The same guide, step by step: promptbackups.com/docker⁠.

⁠Quick start

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:

⁠Run it without Compose

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.

⁠Connect your AI tools

The commands below are for a macOS or Linux terminal, or Git Bash on Windows.

⁠Claude Code
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.

⁠GitHub Copilot in VS 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.

⁠GitHub Copilot in IntelliJ and other JetBrains IDEs

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.

⁠GitHub Copilot CLI

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.

⁠Claude Desktop

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.

⁠Settings

Environment variableDefaultWhat it does
DB_URLnone: set itYour PostgreSQL 17 database, such as jdbc:postgresql://db:5432/promptbackup
DB_USERNAMEpromptbackupThe database user
DB_PASSWORDemptyThe database password
PROMPTSTORE_BACKUP_CRON0 30 2 * * *When the nightly backup runs (second, minute, hour, day, month, weekday)
PROMPTSTORE_ATTACHMENTS_MAX_BYTES104857600The largest image, video or audio file kept with a note (100 MB)
PROMPTSTORE_ALLOWED_HOSTSlocalhost,127.0.0.1,[::1],::1The 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).

⁠Your data

  • Your saved answers are in the volume promptbackup_db. The nightly backups are in promptbackup_backups (the container's /data/backups), and the app's Backup page lists them.
  • Update: docker compose pull && docker compose up -d. Your data stays.
  • Stop: docker compose down. Adding -v also deletes your data.

⁠Tags

  • 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.

⁠Security

  • PromptBackup runs as an unprivileged user inside the container.
  • It only answers requests addressed to localhost, and refuses requests from other websites' pages. Publish its port on 127.0.0.1, as above.
  • It sends nothing over the internet.

⁠License

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⁠.

Tag summary

Content type

Image

Digest

sha256:e9a5353d5…

Size

136.3 MB

Last updated

1 day ago

docker pull connctedkart/promptbackup