Skip to content

Deploying WebDB

Introduction

WebDB is a modern, self-hosted web-based database management tool that provides a clean interface for working with multiple database types. It offers an intuitive way to browse tables, run queries, and manage database objects without installing desktop clients.

Supporting MySQL, PostgreSQL, SQLite, and MongoDB, WebDB serves as a universal database administration tool accessible from any web browser.

Key features of WebDB include:

  • Multi-Database Support: Connect to MySQL, PostgreSQL, SQLite, and MongoDB
  • SQL Editor: Write and execute queries with syntax highlighting
  • Table Browser: Browse and edit table data with an intuitive interface
  • Schema Management: View and modify database schemas
  • Export/Import: Export data in various formats
  • Connection Management: Save and manage multiple database connections
  • Query History: Review previously executed queries
  • Dark Mode: Comfortable viewing in low-light environments
  • Responsive Design: Works on desktop and mobile devices
  • SSH Tunneling: Connect to databases through SSH tunnels

This guide walks you through deploying WebDB on Klutch.sh using Docker for web-based database management.

Prerequisites

Before deploying WebDB on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your WebDB configuration
  • Database servers you want to manage
  • Basic familiarity with Docker concepts

Repository Structure

Create a GitHub repository with the following structure:

webdb-deploy/
├── Dockerfile
└── .dockerignore

Dockerfile

Create a Dockerfile in your repository:

FROM webdb/app:latest
# WebDB web interface
EXPOSE 3000
# The base image handles the entrypoint

Environment Variables

VariableRequiredDefaultDescription
PORTNo3000Web interface port

Deployment on Klutch.sh

  1. Push your Dockerfile to your GitHub repository.
  2. Log in to Klutch.sh and create a new project.
  3. Create a new app within your project and connect your GitHub repository containing the Dockerfile.
  4. Configure the deployment settings: - Select **HTTP** as the traffic type - Set the internal port to **3000**
  5. Attach a persistent volume for connection settings: - Mount path: `/root/.webdb` - Recommended size: 100 MB - Purpose: Saved connections and preferences
  6. Click **Deploy** and wait for the build to complete.
  7. Access your WebDB instance at the provided URL and add your database connections.

Post-Deployment Configuration

After deployment:

  1. Access the web interface
  2. Add database connections with appropriate credentials
  3. Test connections before saving
  4. Organize connections by project or environment

Security Considerations

  • Credential Storage: Database credentials are stored in WebDB. Use strong, unique passwords.
  • Network Access: Ensure your databases are accessible from the Klutch.sh network
  • HTTPS: All connections to WebDB are secured via HTTPS through Klutch.sh

Troubleshooting

Cannot Connect to Database

Verify the database host is reachable from Klutch.sh and that credentials are correct. Check firewall rules allow connections from external IPs.

Connections Not Saved

Ensure the persistent volume is correctly mounted at /root/.webdb.

Additional Resources