Skip to content

Deploying a CloudBeaver App

CloudBeaver is a powerful, open-source web-based database management platform that provides a unified interface for connecting to, managing, and querying multiple databases from any device. With CloudBeaver, teams can collaboratively manage databases including PostgreSQL, MySQL, MariaDB, Oracle, SQL Server, MongoDB, Redis, Elasticsearch, and many more—all through an intuitive web interface without requiring individual client installations. Whether you’re building a centralized database management solution for your organization, enabling remote database access for distributed teams, providing database administration tools to customers, or creating a collaborative data management workspace, CloudBeaver offers comprehensive features including query execution, schema management, data import/export, user collaboration, role-based access control, and audit logging.

This comprehensive guide walks through deploying CloudBeaver to Klutch.sh using a Dockerfile for reliable, containerized deployment. You’ll learn how to set up CloudBeaver with persistent storage for configurations and connections, create a production-ready Dockerfile, configure database connectivity, manage users and permissions, set up workspace configuration, implement security best practices, configure custom domains, set up monitoring and logging, and troubleshoot common issues. By the end of this guide, you’ll have a production-ready CloudBeaver instance running on Klutch.sh’s global infrastructure with automatic HTTPS, optimized performance, and reliable hosting for centralized database management.

Prerequisites

  • Docker installed locally for testing (optional but recommended)
  • Git installed locally and a GitHub account (Klutch.sh uses GitHub as the only git source)
  • Klutch.sh account with access to the dashboard at klutch.sh/app
  • Text editor or IDE for code editing (VS Code recommended)
  • Java knowledge (helpful but not required—CloudBeaver is Java-based)
  • Basic networking knowledge: Understanding of HTTP/HTTPS and database connectivity
  • Database access credentials for databases you want to connect to
  • Network access to remote databases (if connecting to external databases)

Understanding CloudBeaver Architecture

Technology Stack

Backend:

  • Java application server (Jetty/Apache Catalina)
  • H2 database for local metadata storage
  • PostgreSQL support for production metadata storage
  • JDBC drivers for database connectivity
  • RESTful API for backend operations

Frontend:

  • Modern web application (React-based)
  • WebSocket support for real-time updates
  • Responsive design for desktop and tablet
  • Admin dashboard for configuration

Key Features

Database Connectivity:

  • Support for 20+ database types
  • JDBC driver management
  • Connection pooling and management
  • Automatic driver downloads
  • Connection testing and validation

Database Management:

  • Schema browsing and visualization
  • Table and view management
  • Index management and monitoring
  • Constraint and relationship viewing
  • Data type inspection

Query Execution:

  • SQL query editor with syntax highlighting
  • Query execution and result viewing
  • Query history and saved queries
  • Result export to multiple formats
  • Explain plan visualization

Data Management:

  • Data browsing and filtering
  • Insert, update, delete operations
  • Bulk data import/export
  • CSV import support
  • Data visualization and charts

User Management:

  • User authentication and authorization
  • Role-based access control
  • Workspace management
  • Team collaboration features
  • Audit logging and activity tracking

Security Features:

  • HTTPS/SSL encryption
  • Database credential encryption
  • Session management
  • API token authentication
  • LDAP/SAML integration

Project Setup

1. Create Project Directory

Create a project directory for CloudBeaver deployment:

Terminal window
mkdir cloudbeaver-deployment
cd cloudbeaver-deployment
git init

2. Create Directory Structure

Create necessary directories:

Terminal window
mkdir -p {data,config,drivers,backup,scripts}

Resulting project structure:

cloudbeaver-deployment/
├── Dockerfile
├── entrypoint.sh
├── config/
│ └── default.env
├── scripts/
│ └── init-db.sh
├── data/
│ └── (workspace data and configurations)
├── drivers/
│ └── (JDBC drivers)
├── .dockerignore
├── .gitignore
└── README.md

3. Create .gitignore File

Create .gitignore to exclude unnecessary files:

.env.local
.env.*.local
*.log
*.swp
.DS_Store
.vscode
.idea
data/
drivers/
backup/
tmp/
logs/
*.db
.gradle
.m2

4. Create .dockerignore File

Create .dockerignore to exclude files from Docker build:

.git
.gitignore
*.log
.env.local
data/
drivers/
backup/
tmp/
.DS_Store
.vscode
.idea
.gradle
.m2
tests/
README.md

Creating a Production Dockerfile

Create a Dockerfile for production deployment:

# === Build Stage ===
FROM maven:3.8.6-eclipse-temurin-11 AS builder
WORKDIR /app
# Clone CloudBeaver from source
RUN git clone https://github.com/dbeaver/cloudbeaver.git . && \
git submodule update --init --recursive
# Build CloudBeaver
RUN mvn clean package -DskipTests -Dbuild.timestamp=$(date +%s) && \
mkdir -p /app/cloudbeaver-server/build/artifact && \
cp -r /app/server/products/cbserver/target/product/* /app/cloudbeaver-server/build/artifact/
# === Production Stage ===
FROM eclipse-temurin:11-jre-focal
WORKDIR /opt/cloudbeaver
# Install additional dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy built CloudBeaver from builder
COPY --from=builder /app/cloudbeaver-server/build/artifact/* ./
# Create app user
RUN useradd -m -u 1001 cloudbeaver && \
chown -R cloudbeaver:cloudbeaver /opt/cloudbeaver
# Create data and config directories
RUN mkdir -p /opt/cloudbeaver/workspace && \
mkdir -p /opt/cloudbeaver/drivers && \
chown -R cloudbeaver:cloudbeaver /opt/cloudbeaver
# Copy entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Use tini to handle signals properly
RUN apt-get update && apt-get install -y --no-install-recommends tini && \
rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/usr/bin/tini", "--"]
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:8978/health || exit 1
# Expose port
EXPOSE 8978
# Set user
USER cloudbeaver
# Start CloudBeaver
CMD ["./run-server.sh"]

Dockerfile Explanation

  • Build stage: Compiles CloudBeaver from source using Maven
  • Production stage: Lightweight JRE runtime with minimal dependencies
  • Data persistence: /opt/cloudbeaver/workspace for configurations and /opt/cloudbeaver/drivers for JDBC drivers
  • Non-root user: Runs as cloudbeaver user for security
  • Health checks: Automatic container health monitoring
  • Signal handling: Uses tini for proper signal handling
  • Multi-stage build: Reduces final image size by excluding build tools

Create Entrypoint Script

Create entrypoint.sh for initialization:

#!/bin/bash
set -e
echo "Starting CloudBeaver initialization..."
# Wait for network connectivity
echo "Waiting for network to be ready..."
sleep 5
# Check if workspace exists
if [ ! -d "/opt/cloudbeaver/workspace/GlobalConfiguration" ]; then
echo "Initializing CloudBeaver workspace..."
mkdir -p /opt/cloudbeaver/workspace
fi
# Set Java options
export JAVA_OPTS="${JAVA_OPTS:- -Xms512m -Xmx2g -XX:MaxMetaspaceSize=512m}"
# Set CloudBeaver specific options
export CB_WORKSPACE_DIR="/opt/cloudbeaver/workspace"
export CB_DRIVERS_DIR="/opt/cloudbeaver/drivers"
export CB_JAVA_OPTS="${JAVA_OPTS}"
echo "CloudBeaver initialization complete. Starting server..."
# Start CloudBeaver
cd /opt/cloudbeaver
exec ./run-server.sh

Building the Dockerfile Locally (Optional)

Test the Dockerfile locally:

Terminal window
# Build the Docker image (note: building CloudBeaver takes time)
docker build -t cloudbeaver:latest . --build-arg BUILD_TIME=$(date +%s)
# Run the container locally (for testing only)
docker run -d \
--name cloudbeaver-test \
-p 8978:8978 \
-e CB_WORKSPACE_DIR=/opt/cloudbeaver/workspace \
-v cloudbeaver-workspace:/opt/cloudbeaver/workspace \
cloudbeaver:latest
# Wait for container to start (CloudBeaver takes 30-60 seconds)
sleep 60
# Access the application
# http://localhost:8978

Deploying with Docker on Klutch.sh

Klutch.sh automatically detects a Dockerfile in your repository root and uses it for deployment.

Prerequisites for Docker Deployment

  • Your CloudBeaver project pushed to GitHub with Dockerfile
  • Persistent storage configured for workspace and driver data
  • Network access to any external databases you want to connect to

Steps to Deploy with Docker

  1. Prepare Your Repository

    Commit and push all necessary files:

    Terminal window
    git add Dockerfile entrypoint.sh .dockerignore
    git commit -m "Add Docker deployment configuration for CloudBeaver"
    git push origin main
  2. Log In to Klutch.sh Dashboard

    Go to klutch.sh/app and sign in with your GitHub account.

  3. Create a Project

    Navigate to the Projects section and create a new project for your CloudBeaver instance.

  4. Create an App

    Click “Create App” and select your GitHub repository containing the CloudBeaver Docker configuration.

  5. Select the Branch

    Choose the branch you want to deploy (typically main).

  6. Configure Traffic Type

    Select HTTP as the traffic type for CloudBeaver (a web application).

  7. Set the Internal Port

    Set the internal port to 8978 – this is the port where CloudBeaver server listens.

  8. Add Environment Variables

    Configure environment variables for your CloudBeaver instance:

    # Java Configuration
    JAVA_OPTS=-Xms512m -Xmx2g -XX:MaxMetaspaceSize=512m
    CB_WORKSPACE_DIR=/opt/cloudbeaver/workspace
    CB_DRIVERS_DIR=/opt/cloudbeaver/drivers
    # Application Configuration
    CB_SERVER_NAME=CloudBeaver
    CB_SERVER_URL=https://example-app.klutch.sh
    CB_PUBLIC_URL=https://example-app.klutch.sh
    # Admin User Configuration
    CB_ADMIN_NAME=admin
    CB_ADMIN_PASSWORD=change_this_to_secure_password
    # Security Configuration
    CB_DISABLE_AUTHENTICATION=false
    CB_ENABLE_HTTPS=true
    CB_HTTPS_PORT=443
    # Session Configuration
    CB_SESSION_TIMEOUT=3600000
    CB_SESSION_COOKIE_SECURE=true
    CB_SESSION_COOKIE_HTTPONLY=true
    # Database Configuration (optional - for metadata storage)
    CB_DATABASE_URL=jdbc:postgresql://db.example.com:5432/cloudbeaver
    CB_DATABASE_USER=cloudbeaver_user
    CB_DATABASE_PASSWORD=secure_database_password
    CB_DATABASE_POOL_SIZE=20
    # LDAP Configuration (optional)
    CB_LDAP_ENABLED=false
    CB_LDAP_URL=ldap://ldap.example.com:389
    CB_LDAP_BIND_DN=cn=admin,dc=example,dc=com
    CB_LDAP_BIND_PASSWORD=ldap_password
    CB_LDAP_BASE_DN=dc=example,dc=com
    # Email Configuration (optional)
    CB_MAIL_ENABLED=false
    CB_MAIL_SERVER=smtp.example.com
    CB_MAIL_PORT=587
    CB_MAIL_USERNAME=your-email@example.com
    CB_MAIL_PASSWORD=your-password
    CB_MAIL_FROM=noreply@example.com
    # Feature Flags
    CB_ENABLE_DEVELOPER_MODE=false
    CB_ENABLE_PRODUCT_UPDATES=true
    CB_ENABLE_FEATURES_MARKETPLACE=true
    # Performance Settings
    CB_MAX_CONNECTIONS_PER_USER=10
    CB_MAX_QUERIES_PER_CONNECTION=100
    CB_QUERY_EXECUTION_TIMEOUT=600
    # Logging Configuration
    CB_LOG_LEVEL=INFO
    TZ=UTC

    Replace with your actual values. Generate secure passwords for production.

  9. Configure Persistent Storage

    CloudBeaver needs persistent volumes for workspace configurations and driver caching:

    1. After creating the app, go to Volumes
    2. Add volume for workspace:
      • Mount path: /opt/cloudbeaver/workspace
      • Size: 5-10 GiB (adjust based on number of connections and saved queries)
    3. Add volume for drivers:
      • Mount path: /opt/cloudbeaver/drivers
      • Size: 2-5 GiB (for cached JDBC drivers)
  10. Configure Compute Resources

    Select appropriate resources:

    • Minimum: 2-4 CPU, 2-4 GB RAM (small deployments, <50 users)
    • Recommended: 4-8 CPU, 4-8 GB RAM (medium deployments, 50-200 users)
    • Large: 8-16 CPU, 8-16 GB RAM (large deployments, 200+ users)

    CloudBeaver is Java-based and memory-intensive, so allocate adequate resources. Select region closest to your databases.

  11. Deploy

    Click “Create” to start deployment. Klutch.sh will:

    1. Build the Docker image (building CloudBeaver takes 10-15 minutes)
    2. Start the CloudBeaver container
    3. Assign a public URL (e.g., example-app.klutch.sh)
    4. Configure HTTPS automatically
  12. Complete Initial Setup

    After deployment, access your CloudBeaver instance:

    1. Navigate to https://example-app.klutch.sh
    2. Log in with the administrator credentials (from environment variables)
    3. Configure workspace settings:
      • Workspace name and description
      • User access permissions
      • Feature enablement
    4. Add database connections:
      • Database type selection
      • Connection details (host, port, credentials)
      • Connection pooling options
      • Test connection
    5. Configure user access:
      • Create user accounts
      • Assign database permissions
      • Configure workspace access
    6. Set up security:
      • Enable LDAP/SAML if applicable
      • Configure session timeout
      • Review audit logging
    7. Configure email (if applicable):
      • SMTP settings
      • Email notifications for alerts
  13. Test Functionality

    Verify all features are working:

    1. Test database connections to at least one database
    2. Execute test SQL queries
    3. Create and test saved queries
    4. Test user account creation
    5. Verify role-based access control
    6. Test data import/export features
    7. Check workspace configuration persistence
    8. Review admin dashboard and logs

CloudBeaver Features and Configuration

1. Database Connections

Manage connections to multiple databases:

Supported Databases:

  • PostgreSQL and variants
  • MySQL, MariaDB
  • Oracle Database
  • Microsoft SQL Server
  • MongoDB
  • Redis
  • Elasticsearch
  • SQLite
  • H2
  • Derby
  • And many more via JDBC

Connection Features:

  • Connection pooling
  • SSL/TLS encryption
  • SSH tunneling
  • Connection testing
  • Credential management
  • Connection templates

Add database connections:

  1. Go to Connections section
  2. Click Create Connection
  3. Select database type
  4. Enter connection details (host, port, username, password)
  5. Configure SSL/TLS if needed
  6. Test connection
  7. Save connection with appropriate permissions

2. Query Execution

Execute SQL queries with advanced features:

Query Features:

  • SQL syntax highlighting
  • Query execution with results viewing
  • Query history and caching
  • Saved queries
  • Query templates
  • Result export to CSV/JSON
  • Explain plan visualization
  • Query execution timing

Execute queries:

  1. Go to Query section
  2. Select database connection
  3. Write SQL query in editor
  4. Execute query (Ctrl+Enter)
  5. View results in result set grid
  6. Export results if needed
  7. Save query for future use

3. Data Management

Browse and modify database data:

Data Operations:

  • View table data with filtering
  • Insert new records
  • Update existing records
  • Delete records
  • Bulk data import
  • CSV import/export
  • Data visualization

Manage data:

  1. Go to Databases section
  2. Browse schema and tables
  3. Select table to view data
  4. Use filters to find records
  5. Edit data inline
  6. Import data from files
  7. Export results

4. Schema Management

Manage database structure:

Schema Features:

  • Table and view management
  • Index creation and management
  • Constraint management
  • Relationship visualization
  • Column and data type management
  • Schema modification

Manage schema:

  1. Go to Databases section
  2. Browse tables and views
  3. View and modify columns
  4. Create/modify indexes
  5. Manage constraints
  6. View relationships
  7. Generate DDL statements

5. User Management

Manage user access and permissions:

User Features:

  • User authentication
  • Role-based access control
  • Workspace permissions
  • Database-specific permissions
  • Team management
  • API token generation

Manage users:

  1. Go to Admin > Users
  2. Create user accounts
  3. Set user roles
  4. Configure workspace access
  5. Assign database permissions
  6. Enable/disable users
  7. Generate API tokens

6. Workspace Configuration

Configure workspace settings:

Workspace Settings:

  • Workspace name and description
  • Feature enablement
  • Database driver management
  • Resource limits
  • Session settings
  • Backup configuration

Configure workspace:

  1. Go to Admin > Workspace
  2. Set workspace name
  3. Enable/disable features
  4. Configure resource limits
  5. Download JDBC drivers
  6. Set session timeouts
  7. Configure backup options

7. Team Collaboration

Enable team features:

Collaboration Features:

  • Shared connections
  • Shared queries
  • Team workspaces
  • Activity tracking
  • Comments and notes
  • Query sharing

Enable collaboration:

  1. Go to Admin > Team
  2. Create team workspaces
  3. Share connections with teams
  4. Share saved queries
  5. Configure permissions
  6. Enable team communication

8. Audit and Logging

Track activities and events:

Audit Features:

  • User activity logging
  • Query execution logging
  • Data modification tracking
  • Login/logout tracking
  • Configuration changes
  • Export audit logs

Configure audit:

  1. Go to Admin > Audit
  2. Enable audit logging
  3. Set retention policy
  4. Configure log levels
  5. View audit logs
  6. Export logs for analysis
  7. Set alerts for critical events

Persistent Storage

CloudBeaver requires persistent storage for configurations and cached drivers:

Critical Data Directories

/opt/cloudbeaver/workspace/
├── GlobalConfiguration/ (global settings)
├── teamXX/ (team-specific configs)
├── drivers/ (JDBC driver cache)
└── metadata/ (database metadata cache)
/opt/cloudbeaver/drivers/
└── (downloaded JDBC drivers)

Adding Persistent Volumes

  1. In Klutch.sh dashboard, go to your CloudBeaver app
  2. Navigate to Volumes section
  3. Add volume for workspace:
    • Mount path: /opt/cloudbeaver/workspace
    • Size: 5-10 GiB
  4. Add volume for drivers:
    • Mount path: /opt/cloudbeaver/drivers
    • Size: 2-5 GiB

Backup Strategy

Implement regular backup routine:

#!/bin/bash
# Daily backup script
BACKUP_DIR="/backups/cloudbeaver"
DATE=$(date +%Y%m%d_%H%M%S)
RETENTION_DAYS=30
# Create backup directory
mkdir -p $BACKUP_DIR
# Backup workspace configuration
tar -czf $BACKUP_DIR/workspace_$DATE.tar.gz /opt/cloudbeaver/workspace/
# Backup drivers
tar -czf $BACKUP_DIR/drivers_$DATE.tar.gz /opt/cloudbeaver/drivers/
# Delete old backups
find $BACKUP_DIR -name "*.tar.gz" -mtime +$RETENTION_DAYS -delete
# Upload to remote storage
# aws s3 sync $BACKUP_DIR s3://my-backup-bucket/cloudbeaver/

Security Best Practices

1. HTTPS/SSL Enforcement

Klutch.sh automatically provides HTTPS for your web interface. All traffic is encrypted by default.

2. Authentication and Authorization

Implement strong access control:

Authentication Methods:

  • Built-in authentication with strong passwords
  • LDAP integration for enterprise directories
  • SAML for federated identity
  • Multi-factor authentication (if available)

Configure authentication:

  1. Go to Admin > Authentication
  2. Enable appropriate authentication method
  3. Configure password policies
  4. Set session timeout
  5. Enable MFA if applicable
  6. Regular access audits

3. Database Credential Security

Protect database credentials:

Configuration:
- Encrypt stored credentials
- Use credential vaults
- Limit credential visibility
- Implement access logging
- Rotate credentials regularly
- Use SSL/TLS for connections

4. Network Security

Secure network access:

  • Use VPN for remote connections
  • Implement firewalls for database access
  • Use SSH tunneling for sensitive connections
  • Restrict network access by IP
  • Monitor network traffic
  • Enable DDoS protection

5. Access Control

Implement granular access control:

  • Role-based permissions
  • Database-level permissions
  • Query-level restrictions
  • Operation-level controls
  • Team-based isolation
  • Audit sensitive operations

6. Data Protection

Protect data in transit and at rest:

  • HTTPS for web traffic
  • SSL/TLS for database connections
  • Encryption of stored credentials
  • Encryption of workspace data
  • Secure backups
  • Data retention policies

7. API Security

Secure API access:

- Require API token authentication
- Generate secure API tokens
- Set API rate limits
- Log all API access
- Restrict API permissions
- Rotate tokens regularly

Performance Optimization

1. Java Memory Configuration

Configure Java memory settings:

JAVA_OPTS Environment Variables:
-Xms: Initial heap size (512m recommended minimum)
-Xmx: Maximum heap size (2-4g for typical use)
-XX:MaxMetaspaceSize: Metaspace size (512m-1g)
Example:
JAVA_OPTS=-Xms1g -Xmx4g -XX:MaxMetaspaceSize=512m

2. Connection Pooling

Optimize database connections:

Configuration:
- Set appropriate pool sizes per database
- Configure connection timeout
- Implement connection validation
- Monitor connection pool usage
- Adjust pool size based on load

3. Query Optimization

Optimize query execution:

Configuration:
- Set query execution timeout
- Enable query caching
- Monitor slow queries
- Use indexes effectively
- Archive old query history

4. Caching Strategy

Implement caching:

Caching Options:
- Enable driver caching
- Cache metadata
- Cache query results
- Cache schema information
- Implement time-based cache invalidation

5. Resource Monitoring

Monitor system resources:

Terminal window
# Monitor Java process
docker exec container_id jps -l
# Monitor memory usage
docker exec container_id jstat -gc $(docker exec container_id jps -l | grep -i cloudbeaver | awk '{print $1}')
# Check container stats
docker stats container_id
# View application logs
docker logs container_id --tail 100 -f

Monitoring and Logging

1. Access Application Logs

View CloudBeaver logs through Klutch.sh:

  1. Go to your app in Klutch.sh
  2. Click Logs
  3. Filter by time range and log level
  4. Search for specific errors or events

2. Configure Logging

Configure logging levels:

CB_LOG_LEVEL options:
- ERROR: Error messages only
- WARN: Warnings and errors
- INFO: Informational messages (default)
- DEBUG: Debug-level messages
- TRACE: All detailed messages

3. Monitor Real-Time Metrics

Track real-time performance:

Metrics to monitor:
- Active user sessions
- Database connection count
- Query execution times
- Memory usage and garbage collection
- CPU utilization
- Connection pool status
- Cache hit rates
- API response times

4. Health Checks

CloudBeaver includes health endpoints:

Terminal window
# Health check endpoint
curl -f http://localhost:8978/health
# Status information
curl http://localhost:8978/api/v1/admin/status

5. Monitoring Integration

Integrate with monitoring services:

  • Prometheus: Metrics collection
  • Grafana: Visualization dashboards
  • DataDog: Infrastructure monitoring
  • New Relic: Performance monitoring
  • ELK Stack: Centralized logging

Custom Domains

To use a custom domain with your CloudBeaver instance:

1. Add Domain in Klutch.sh

In the Klutch.sh dashboard, go to your app settings and add your custom domain (e.g., db.example.com).

2. Update DNS Configuration

Update your DNS provider:

CNAME: db.example.com → example-app.klutch.sh

3. Update Environment Variables

Update CloudBeaver configuration:

CB_SERVER_URL=https://db.example.com
CB_PUBLIC_URL=https://db.example.com

Redeploy the application to apply changes.

4. Verify DNS Propagation

Check DNS resolution:

Terminal window
nslookup db.example.com
# or
dig db.example.com CNAME

Once propagated, your CloudBeaver instance will be accessible at your custom domain with automatic HTTPS.


Troubleshooting

Issue 1: Container Won’t Start

Error: Container exits immediately or doesn’t respond

Solutions:

  • Check Docker logs: docker logs container_id
  • Verify Dockerfile builds locally: docker build -t cloudbeaver:test .
  • Ensure environment variables are set correctly
  • Check Java memory settings not too large for available memory
  • Verify entrypoint script has execute permissions
  • Wait for CloudBeaver to fully initialize (60+ seconds)

Issue 2: Cannot Access Web Interface

Error: 503 Service Unavailable or connection timeout

Solutions:

  • Verify CloudBeaver is running: Check container status
  • Verify port 8978 is exposed and traffic is HTTP
  • Check firewall rules: Ensure port 8978 is accessible
  • Verify DNS resolution: dig example-app.klutch.sh
  • Check CloudBeaver logs for startup errors
  • CloudBeaver requires time to initialize on first start
  • Check Java memory allocation is not causing OOM errors

Issue 3: Database Connection Failures

Error: Cannot connect to database from CloudBeaver

Solutions:

  • Verify database credentials are correct
  • Check network connectivity to database host
  • Verify database firewall allows connections
  • Test connection with database client locally first
  • Enable debug logging to see connection details
  • Check database driver compatibility
  • Verify database user has proper permissions
  • Test with simpler configuration first (no SSL/TLS)

Issue 4: Slow Performance

Error: CloudBeaver is slow or unresponsive

Solutions:

  • Check available memory: Increase -Xmx setting
  • Monitor Java garbage collection
  • Reduce number of active connections
  • Archive old query history
  • Disable unnecessary features
  • Increase container resources in Klutch.sh
  • Check database query performance (not CloudBeaver issue)
  • Monitor network latency to databases

Issue 5: Workspace Data Loss

Error: Workspace configurations and connections disappeared

Solutions:

  • Verify persistent volumes are mounted correctly
  • Check volume mount paths in Klutch.sh
  • Verify data persisted after container stop
  • Check disk space in workspace volume
  • Review backup strategy and recent backups
  • Restore from backups if necessary
  • Check for permission issues in persistent volumes

Issue 6: Driver Download Issues

Error: Cannot download or use JDBC drivers

Solutions:

  • Check network connectivity to driver repositories
  • Verify disk space in driver volume
  • Check driver directory permissions
  • Review CloudBeaver logs for driver errors
  • Manually upload drivers if needed
  • Clear driver cache and retry
  • Check for firewall blocking driver downloads

Issue 7: Memory Usage Too High

Error: CloudBeaver using excessive memory, OOM errors

Solutions:

  • Check current memory allocation: docker stats
  • Reduce -Xmx if it’s too high for container
  • Increase container memory allocation
  • Archive old query history and caches
  • Disconnect idle database connections
  • Reduce number of concurrent users/connections
  • Monitor garbage collection frequency

Issue 8: User Authentication Issues

Error: Cannot log in or users locked out

Solutions:

  • Verify database password is correct
  • Check user account exists and is enabled
  • Reset password if necessary
  • Clear session cookies in browser
  • Verify session timeout settings
  • Check LDAP/SAML configuration if using
  • Review audit logs for authentication attempts
  • Verify SSL/TLS certificates are valid

Best Practices

1. Connection Management

Manage database connections effectively:

  • Test connections before sharing
  • Use connection templates for consistency
  • Implement connection pooling
  • Monitor connection usage
  • Close unused connections
  • Document connection purposes
  • Organize connections by environment
  • Use read-only connections where appropriate

2. User Management

Manage user access effectively:

  • Implement strong password policies
  • Use LDAP/SAML for enterprise integration
  • Regular access reviews
  • Disable unused accounts
  • Implement role-based access control
  • Grant minimum necessary permissions
  • Enable audit logging
  • Regular training on security

3. Query Management

Manage saved queries effectively:

  • Organize queries by purpose/team
  • Document complex queries
  • Version control important queries
  • Test queries before sharing
  • Set execution timeouts
  • Monitor slow queries
  • Archive obsolete queries
  • Document data lineage

4. Security Maintenance

Keep platform secure:

  • Regular security updates
  • Monitor for vulnerabilities
  • Review access logs regularly
  • Audit permission settings
  • Rotate credentials regularly
  • Test disaster recovery
  • Document security policies
  • Incident response planning

5. Backup Strategy

Maintain comprehensive backups:

  • Daily workspace backups
  • Regular driver backups
  • Test restore procedures regularly
  • Offsite backup storage
  • Document backup procedures
  • Monitor backup success
  • Document recovery procedures
  • Plan for disaster scenarios

6. Performance Tuning

Continuously optimize performance:

  • Monitor memory usage
  • Optimize Java settings
  • Tune connection pools
  • Monitor database performance
  • Archive query history
  • Cache frequently accessed data
  • Distribute load across instances
  • Document performance baselines

7. Capacity Planning

Plan for platform growth:

  • Monitor user growth
  • Plan memory scaling
  • Monitor storage usage
  • Estimate future needs
  • Document scaling procedures
  • Budget for growth
  • Plan infrastructure improvements
  • Build redundancy and failover

8. Documentation

Maintain comprehensive documentation:

  • Connection setup procedures
  • User guides for features
  • Admin procedures and workflows
  • System configuration details
  • Emergency procedures
  • Troubleshooting guides
  • API documentation
  • Security policies

9. Team Training

Ensure team knows how to use CloudBeaver:

  • Onboard new users
  • Provide training documentation
  • Share best practices
  • Document common tasks
  • Create query templates
  • Establish naming conventions
  • Hold regular training sessions
  • Get user feedback

10. Compliance

Maintain compliance requirements:

  • Document data access
  • Maintain audit logs
  • Implement access controls
  • Encrypt sensitive data
  • Data retention policies
  • GDPR compliance
  • SOC 2 requirements
  • Regular compliance audits

Verifying Your Deployment

After deployment completes:

  1. Check the App URL: Visit https://example-app.klutch.sh
  2. Log In: Use administrator credentials from environment variables
  3. Add Test Connection: Create connection to a test database
  4. Execute Test Query: Run a simple SELECT query
  5. Test User Management: Create a test user account
  6. Test Permissions: Verify role-based access control
  7. Check Persistence: Verify workspace data persists after restart
  8. Review Admin Console: Check system health and status
  9. Test Export: Export query results to CSV
  10. Review Logs: Check CloudBeaver logs for errors

If your CloudBeaver instance doesn’t work as expected, review the troubleshooting section and check the Klutch.sh dashboard logs for detailed error messages.


External Resources


Deploying CloudBeaver to Klutch.sh using Docker provides a powerful, open-source web-based database management platform with complete control over your database administration infrastructure. By following this guide, you’ve learned how to create a production-ready Dockerfile with Java and Maven, configure persistent storage for workspace configurations and JDBC drivers, set up user management and role-based access control, configure database connectivity for multiple database types, enable team collaboration features, implement security best practices, optimize Java memory and performance settings, configure custom domains, monitor system health and performance, and troubleshoot common issues. Your CloudBeaver instance is now running on Klutch.sh’s global infrastructure with professional-grade hosting, automatic HTTPS, scalable resources, and reliable infrastructure for centralized database management. For additional help or questions, consult the official CloudBeaver documentation or contact Klutch.sh support.