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:latest

Then 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:latest

You 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_data
3

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:latest

Command 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 dbcraft

View logs if needed:

docker logs -f dbcraft

Environment Variables

Configure DBCraft behavior with these environment variables:

VariableDefaultDescription
PORT9000Server port inside container
JWT_SECRETauto-generatedSecret key for JWT tokens (min 32 chars)
DATABASE_URLsqlite:///app/data/dbcraft.dbInternal database connection string
ADMIN_EMAIL-Default admin email (optional)
LOG_LEVELinfoLogging 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:latest

Your data will be preserved in the dbcraft_data volume.

Next Steps