Before running Dust in Docker, ensure you have:
- Docker installed (version 20.10+ recommended)
- Docker Compose installed (or Docker Desktop)
- Book/comic files to serve
- OpenSSL for generating JWT secrets (or any secure random generator)
git clone <repository-url>
cd dust# Create environment file with required settings
cat > .env << EOF
JWT_SECRET=$(openssl rand -base64 32)
DUST_DIRS=/app/books
PORT=4001
DATABASE_URL=file:/app/data/dust.db
EOF# Create local book directory
mkdir -p ./books
# Copy your ebooks/comics to this directory
# cp /path/to/your/books/* ./books/# Start with Docker Compose
docker compose up -d
# Check logs
docker compose logs -f
# Access the server
open http://localhost:4001| Variable | Status | Description | Example |
|---|---|---|---|
JWT_SECRET |
REQUIRED | Secret for JWT authentication | $(openssl rand -base64 32) |
DUST_DIRS |
REQUIRED | Book directories to scan (colon-separated) | /app/books:/app/comics |
PORT |
Optional | Server port | 4001 |
DATABASE_URL |
Optional | Database location | file:/app/data/dust.db |
GOOGLE_BOOKS_API_KEY |
Optional | Metadata enrichment | your-api-key |
| Container Path | Purpose | Host Example | Access |
|---|---|---|---|
/app/books |
Book files | ./books |
Read-only |
/app/data |
Database & app data | Named volume | Read-write |
/app/comics |
Comics (optional) | ./comics |
Read-only |
4001:4001- Web server access (or custom port viaPORTenv var)
dust/
├── .env # Environment variables
├── docker-compose.yml # Docker configuration
├── books/ # Your book directory
│ ├── author1/
│ │ └── book1.epub
│ └── author2/
│ └── book2.pdf
└── README-Docker.md # This guide
dust/
├── .env
├── docker-compose.yml
├── docker-compose.override.yml # Production overrides
├── data/ # Persistent database
├── books/ # Ebooks
│ ├── Fiction/
│ ├── Technical/
│ └── Biography/
└── comics/ # Comics collection
├── Marvel/
└── DC/
After starting the server, verify everything works:
# 1. Health check
curl http://localhost:4001/health
# 2. Check environment
docker exec dust-dust-server-1 env | grep JWT_SECRET
# 3. Verify volumes
docker exec dust-dust-server-1 ls -la /app/books
docker exec dust-dust-server-1 ls -la /app/data
# 4. Check logs for success messages
docker compose logs | grep -E "(Dust is bookin|Found.*files|Created tag)"# Copy example environment file
cp .env.example .env
# Edit with secure values
vim .env# Copy production template
cp docker-compose.prod.yml docker-compose.override.yml
# Edit paths and settings
vim docker-compose.override.yml# Start in production mode
docker compose up -d
# Enable automatic restarts
docker update --restart unless-stopped dust-dust-server-1# Add to .env file
echo "JWT_SECRET=$(openssl rand -base64 32)" >> .env# Create book directories
mkdir -p ./books
# Check docker-compose.yml volume mounts# Fix file permissions
chmod -R 755 ./books# Check what's using port 4001
lsof -i :4001
# Or change port in .env
echo "PORT=4002" >> .envWhen everything is working correctly, you should see:
- "Dust is bookin' it on port 4001"
- "Created tag: [various tags]"
- "Found X files to process"
- "Finished processing X books"
{
"status": "ok",
"version": "1.0.0",
"service": "dust-server"
}- http://localhost:4001 loads successfully
- Shows Dust server page with embedded content
- JWT_SECRET: Keep this secret secure and use a strong random value
- Book mounts: Use read-only mounts (
:ro) for book directories - User context: Container runs as non-root
dustappuser - Database isolation: App data is contained in
/app/data - Environment variables: Use
.envfile for sensitive config
- Add books: Copy your ebook/comic collection to the mounted directories
- Configure metadata: Set up Google Books API key for enhanced metadata
- Set up users: Access the web interface to create user accounts
- Organize content: Use the tagging and categorization features
- Monitor usage: Check logs and health endpoints regularly
If you encounter issues:
- Check logs:
docker compose logs -f - Verify config: Review
.envand volume mounts - Test health:
curl http://localhost:4001/health - Validate environment: Use the validation commands above
- Review documentation: See
README-Docker.mdfor detailed troubleshooting
🎉 You're ready to serve your digital library with Dust!