Self-hosted JSON Hero packaged as a Docker image.
JSON Hero is a web app for exploring JSON with a clean UI and useful tooling:
Source repository: https://github.com/triggerdotdev/jsonhero-web
docker pull xuye0/jsonhero:latest
mkdir -p data
docker run -d \
--name jsonhero \
--restart unless-stopped \
-p 3000:3000 \
-e SESSION_SECRET=$(openssl rand -hex 32) \
-v $(pwd)/data:/app/data \
xuye0/jsonhero:latest
Open http://localhost:3000.
Recommended startup command:
docker run -d \
--name jsonhero \
--restart unless-stopped \
-p 3000:3000 \
-e SESSION_SECRET=$(openssl rand -hex 32) \
-v $(pwd)/data:/app/data \
xuye0/jsonhero:latest
Parameter reference:
-d: run in the background--name jsonhero: set the container name--restart unless-stopped: auto-start after Docker restarts-p 3000:3000: map host port 3000 to container port 3000-e SESSION_SECRET=...: session signing secret; set your own value in production-v $(pwd)/data:/app/data: persist SQLite data on the hostxuye0/jsonhero:latest: image name and tagSESSION_SECRET
Required for production use. If omitted, the container falls back to change-me-in-production, which is not secure.
PORT
Internal listening port for the app. Default: 3000.
DOCUMENTS_DB_PATH
SQLite database path inside the container. Default: /app/data/documents.db.
APIHERO_PROJECT_KEY
Optional.
Minimal run without persistent storage:
docker run --rm \
-p 3000:3000 \
-e SESSION_SECRET=test-secret \
xuye0/jsonhero:latest
Production-style run with persistent storage:
mkdir -p data
docker run -d \
--name jsonhero \
--restart unless-stopped \
-p 3000:3000 \
-e SESSION_SECRET=$(openssl rand -hex 32) \
-v $(pwd)/data:/app/data \
xuye0/jsonhero:latest
Use a different host port while keeping the container on port 3000:
docker run -d \
--name jsonhero \
-p 8080:3000 \
-e SESSION_SECRET=$(openssl rand -hex 32) \
-v $(pwd)/data:/app/data \
xuye0/jsonhero:latest
Change the internal app port as well:
docker run -d \
--name jsonhero \
-p 8080:8080 \
-e PORT=8080 \
-e SESSION_SECRET=$(openssl rand -hex 32) \
-v $(pwd)/data:/app/data \
xuye0/jsonhero:latest
Use a custom database path:
mkdir -p db
docker run -d \
--name jsonhero \
-p 3000:3000 \
-e SESSION_SECRET=$(openssl rand -hex 32) \
-e DOCUMENTS_DB_PATH=/app/db/documents.db \
-v $(pwd)/db:/app/db \
xuye0/jsonhero:latest
JSON Hero stores documents in a local SQLite file.
/app/data/documents.dbdocker pull xuye0/jsonhero:latest
docker rm -f jsonhero
docker run -d \
--name jsonhero \
--restart unless-stopped \
-p 3000:3000 \
-e SESSION_SECRET=$(openssl rand -hex 32) \
-v $(pwd)/data:/app/data \
xuye0/jsonhero:latest
3000 by defaultSESSION_SECRETContent type
Image
Digest
sha256:d30260f63…
Size
98.7 MB
Last updated
6 months ago
docker pull xuye0/jsonhero