Docker Installation
The fastest and easiest way to deploy DBCraft. Perfect for development, testing, and production environments.
Quick Start
Get DBCraft running with a single command:
Terminal
docker run -d -p 3001:9000 -v dbcraft_data:/app/data --name dbcraft krishcdbry/dbcraft:latestThen open http://localhost:3001 in your browser.
Step-by-Step Installation
1
Pull the Docker Image
Download the latest DBCraft image from Docker Hub:
docker pull krishcdbry/dbcraft:latestYou can also use a specific version tag like krishcdbry/dbcraft:v0.4.4
2
Create a Data Volume
Create a Docker volume to persist your data (dashboards, queries, settings):
docker volume create dbcraft_data3
Run the Container
Start DBCraft with the following command:
Terminal
docker run -d \
--name dbcraft \
--restart unless-stopped \
-p 3001:9000 \
-v dbcraft_data:/app/data \
-e JWT_SECRET="your-secure-secret-key-min-32-chars" \
-e ADMIN_EMAIL="admin@example.com" \
krishcdbry/dbcraft:latestCommand breakdown:
-dRun in detached mode (background)--name dbcraftGive the container a friendly name--restart unless-stoppedAuto-restart on failure or system reboot-p 3001:9000Map host port 3001 to container port 9000-v dbcraft_data:/app/dataMount the data volume for persistence
4
Verify Installation
Check that DBCraft is running:
docker ps | grep dbcraftView logs if needed:
docker logs -f dbcraftEnvironment Variables
Configure DBCraft behavior with these environment variables:
| Variable | Default | Description |
|---|---|---|
PORT | 9000 | Server port inside container |
JWT_SECRET | auto-generated | Secret key for JWT tokens (min 32 chars) |
DATABASE_URL | sqlite:///app/data/dbcraft.db | Internal database connection string |
ADMIN_EMAIL | - | Default admin email (optional) |
LOG_LEVEL | info | Logging level (debug, info, warn, error) |
CORS_ORIGINS | * | Allowed CORS origins (comma-separated) |
Production Recommendations
Security
Always set a strong
JWT_SECRET in production. Use at least 32 random characters.Persistence
Use a named volume or bind mount for
/app/data to ensure your data survives container updates.Reverse Proxy
For HTTPS, put DBCraft behind a reverse proxy like Nginx, Caddy, or Traefik. See our Kubernetes guide for production deployment examples.
Upgrading
To upgrade to a new version:
Terminal
# Stop and remove the old container
docker stop dbcraft
docker rm dbcraft
# Pull the new image
docker pull krishcdbry/dbcraft:latest
# Start with the same volume
docker run -d \
--name dbcraft \
--restart unless-stopped \
-p 3001:9000 \
-v dbcraft_data:/app/data \
krishcdbry/dbcraft:latestYour data will be preserved in the dbcraft_data volume.
