Two small Docker containers that continuously download every prediction and its output files from your Replicate account into a local folder, then serve a browser UI to browse and preview them.
| Image | Purpose |
|---|---|
nopenix/replicate-safe | Daemon — pulls predictions + outputs from Replicate (~15 MB, distroless) |
nopenix/replicate-safe-frontend | Web UI — file list, preview, metadata viewer (~15 MB, distroless) |

mkdir replicate-safe && cd replicate-safe
cat > .env <<'EOF'
REPLICATE_API_TOKEN=r8_your_token_here
POLL_INTERVAL=900
LOG_LEVEL=info
EOF
curl -O https://raw.githubusercontent.com/NopeNix/Replicate-Safe/main/docker-compose.yml
docker compose up -d
docker compose logs -f
Open http://localhost:8080. The daemon writes predictions and outputs into
./data/, prefixed with the prediction id so nothing collides:
data/
├── .state.json
├── 01w9p8j4pdrmw0czsr3bcwtyh4__00_tmpagwigfij.png
├── 01w9p8j4pdrmw0czsr3bcwtyh4.metadata.json
└── ...
services:
replicate-safe:
image: nopenix/replicate-safe:latest
restart: unless-stopped
env_file: [.env]
environment:
OUTPUT_DIR: /data
STATE_FILE: /data/.state.json
volumes: [./data:/data]
frontend:
image: nopenix/replicate-safe-frontend:latest
restart: unless-stopped
depends_on: [replicate-safe]
environment:
DATA_DIR: /data
LISTEN_ADDR: ":8080"
ports: ["8080:8080"]
volumes: [./data:/data:ro]
The frontend mounts the data volume read-only — it can never write to your backups even if compromised.
replicate-safe)| Variable | Default | Notes |
|---|---|---|
REPLICATE_API_TOKEN | — | required, from https://replicate.com/account/api-tokens |
OUTPUT_DIR | /data | Where files land |
STATE_FILE | /data/.state.json | Tracks processed ids |
POLL_INTERVAL | 900 | Seconds between full passes |
HTTP_TIMEOUT | 60 | Per-request timeout (seconds) |
WRITE_METADATA | true | Write <id>.metadata.json per prediction |
LOG_LEVEL | info | debug, info, warn, error |
replicate-safe-frontend)| Variable | Default | Notes |
|---|---|---|
DATA_DIR | /data | Folder the daemon writes to |
LISTEN_ADDR | :8080 | Where to listen |
metadata.json content — prompt text, model name, version, raw API response+/−/0 keyboard shortcuts◐ button cycles auto / light / darkAll UI state (panel widths, column widths, zoom, theme, thumbnail size) is
persisted in localStorage so your layout survives reloads.
| Endpoint | Returns |
|---|---|
GET /api/predictions?q=<text> | JSON array, newest-first. One entry per output file. Optional q filters by substring match against metadata.json content. |
GET /api/metadata?id=<id> | Raw metadata.json for a prediction. |
GET /file?id=<id>[&file=<name>] | Streams the output file. |
GET /thumb?id=<id> | 128×128 JPEG thumbnail (server-side resize via imaging). |
GET /convert?id=<id>&to=<fmt> | Re-encodes the image to <fmt> (jpg/png/gif/bmp/tiff) and returns it as an attachment. |
data_removed=true and
the output URLs 404 — the metadata is still saved but the files are gone.
Run the container continuously to catch outputs before they expire.Both Docker Hub images are built from this repo by GitHub Actions on every
push to main. To hack locally:
git clone https://github.com/NopeNix/Replicate-Safe.git
cd Replicate-Safe
go run . # daemon
docker build -t replicate-safe:dev .
go run ./frontend # frontend on :8080
docker build -f frontend/Dockerfile -t replicate-safe-frontend:dev .
docker compose up -d
See LICENSE.
Content type
Image
Digest
sha256:d39f33a4a…
Size
2.9 MB
Last updated
about 1 month ago
docker pull nopenix/replicate-safe