Deploying a Budibase App
Introduction
Budibase is an open-source low-code platform that empowers you to build powerful internal tools, business apps, and workflows in minutes rather than months. With an intuitive drag-and-drop interface, powerful database integrations, and automation capabilities, Budibase is perfect for teams looking to quickly develop custom applications without extensive coding.
Budibase features:
- Visual App Builder: Create applications with a drag-and-drop interface
- Database Integration: Connect to PostgreSQL, MySQL, MongoDB, CouchDB, REST APIs, and more
- Automation: Build workflows with triggers, actions, and integrations
- Custom Components: Extend with custom JavaScript components
- Role-Based Access Control: Secure your apps with granular permissions
- Self-Hosted: Full control over your data and infrastructure
- Mobile Responsive: Apps automatically adapt to mobile devices
- Multi-Tenancy: Deploy apps for multiple organizations
This comprehensive guide walks you through deploying Budibase on Klutch.sh using Docker, including detailed installation steps, sample configurations, and production-ready best practices for persistent storage.
Prerequisites
Before you begin, ensure you have the following:
- A Klutch.sh account
- A GitHub account with a repository for your Budibase project
- Docker installed locally for testing (optional but recommended)
- Basic understanding of Docker and containerization concepts
Installation and Setup
Step 1: Create Your Project Directory
First, create a new directory for your Budibase deployment project:
mkdir budibase-klutchcd budibase-klutchgit initStep 2: Create the Dockerfile
Create a Dockerfile in your project root directory. This will define your Budibase container configuration:
FROM budibase/budibase:latest
# Set working directoryWORKDIR /app
# Optional: Add custom configuration# COPY ./config /app/config
# Expose the default Budibase portEXPOSE 10000
# The base image already has the CMD configured# CMD is typically: ["./budibase"]Note: Budibase provides official Docker images that are pre-configured and ready to use. The example above uses the latest stable version.
Step 3: (Optional) Create Environment Variables File
Create a .env.example file to document the environment variables your deployment might need:
# .env.example - Environment variables template
# Application settingsBUDIBASE_ENVIRONMENT=productionPORT=10000
# SecurityJWT_SECRET=your-jwt-secret-hereINTERNAL_API_KEY=your-internal-api-key-hereMINIO_ACCESS_KEY=your-minio-access-keyMINIO_SECRET_KEY=your-minio-secret-key
# CouchDB ConfigurationCOUCH_DB_USER=adminCOUCH_DB_PASSWORD=your-couchdb-password
# Redis Configuration (for multi-instance deployments)REDIS_URL=redis://localhost:6379
# Email Configuration (optional)SMTP_HOST=smtp.example.comSMTP_PORT=587SMTP_USER=your-smtp-userSMTP_PASSWORD=your-smtp-password
# Optional: Custom brandingPLATFORM_TITLE="My Budibase Platform"LOGO_URL=https://example.com/logo.pngImportant: Never commit actual secrets to your repository. This file is just a template.
Step 4: (Optional) Create a Docker Ignore File
Create a .dockerignore file to exclude unnecessary files from your Docker build:
.git.gitignore.env.env.examplenode_modules*.logREADME.mdStep 5: Test Locally (Optional)
Before deploying to Klutch.sh, you can test your Budibase setup locally:
# Build the Docker imagedocker build -t my-budibase .
# Run the containerdocker run -d \ --name budibase-test \ -p 10000:10000 \ -v budibase-data:/data \ -e JWT_SECRET=test-secret \ -e INTERNAL_API_KEY=test-api-key \ -e MINIO_ACCESS_KEY=test-access \ -e MINIO_SECRET_KEY=test-secret \ -e COUCH_DB_USER=admin \ -e COUCH_DB_PASSWORD=admin \ my-budibase
# Check if it's runningdocker ps
# View logsdocker logs budibase-test
# Access Budibase at http://localhost:10000
# Stop and remove the test container when donedocker stop budibase-testdocker rm budibase-testStep 6: Push to GitHub
Commit your Dockerfile and configuration files to your GitHub repository:
git add Dockerfile .env.example .dockerignoregit commit -m "Add Budibase Docker configuration"git remote add origin https://github.com/yourusername/budibase-klutch.gitgit push -u origin mainDeploying Without a Dockerfile
Klutch.sh uses Nixpacks to automatically detect and build your application. However, since Budibase is primarily distributed as pre-built Docker images, we recommend using the Dockerfile approach for Budibase deployments to ensure you’re using the official, tested images.
If you want to deploy Budibase from source or with custom modifications:
- Clone the Budibase repository and push your customizations to GitHub
- Log in to Klutch.sh
- Create a new project
- Create a new app:
- Select your GitHub repository and branch
- Select HTTP as the traffic type
- Set the internal port to 10000
- Add environment variables as needed
Note: If you need to customize the start or build command, you can set environment variables like START_COMMAND or BUILD_COMMAND for Nixpacks.
Deploying With a Dockerfile (Recommended)
Klutch.sh will automatically detect a Dockerfile in your repository’s root directory. This is the recommended approach for Budibase deployments.
Follow these steps to deploy Budibase on Klutch.sh with persistent storage:
-
Log in to Klutch.sh
Navigate to klutch.sh/app and sign in to your account.
-
Create a New Project
Go to Create Project and give your project a meaningful name (e.g., “Budibase Platform”).
-
Create a New App
Navigate to Create App and configure the following settings:
-
Select Your Repository
- Choose GitHub as your Git source
- Select the repository containing your Dockerfile
- Choose the branch you want to deploy (usually
mainormaster)
-
Configure Traffic Type
- Traffic Type: Select HTTP (Budibase web interface uses HTTP/HTTPS)
- Internal Port: Set to
10000(the port your container listens on)
-
Set Environment Variables
Add the following environment variables for your Budibase configuration:
BUDIBASE_ENVIRONMENT: Set toproductionJWT_SECRET: A strong secret key for JWT token signing (use a secure password generator)INTERNAL_API_KEY: A strong secret key for internal API authenticationMINIO_ACCESS_KEY: Access key for MinIO object storageMINIO_SECRET_KEY: Secret key for MinIO object storageCOUCH_DB_USER: CouchDB admin username (default:admin)COUCH_DB_PASSWORD: Strong password for CouchDB- Add any other custom environment variables your setup requires
Security Note: Always use strong, unique secret keys for production deployments. Each key should be at least 32 characters long and randomly generated.
-
Attach a Persistent Volume
This is critical for ensuring your application data, databases, and user-uploaded files persist across deployments and restarts:
- In the Volumes section, click “Add Volume”
- Mount Path: Enter
/data(this is where Budibase stores application data, databases, and file uploads) - Size: Choose an appropriate size based on your expected data volume (minimum 5GB recommended, 10GB or more for production)
Important: Budibase requires persistent storage to maintain your apps, database records, user uploads, and configurations between container restarts.
-
Configure Additional Settings
- Region: Select the region closest to your users for optimal latency
- Compute Resources: Choose CPU and memory based on your workload (minimum 1GB RAM recommended for Budibase)
- Instances: Start with 1 instance (you can scale up later based on usage)
-
Deploy Your Application
Click “Create” to start the deployment. Klutch.sh will:
- Automatically detect your Dockerfile in the repository root
- Build the Docker image
- Attach the persistent volume
- Start your Budibase container
- Assign a URL for external access
-
Access Your Budibase Instance
Once deployment is complete, you’ll receive a URL like
example-app.klutch.sh. Navigate to this URL in your browser to access your Budibase instance and complete the initial setup.
Getting Started with Budibase
Once your Budibase instance is deployed and running, you can start building applications:
Initial Setup
- Open your deployed Budibase URL (
example-app.klutch.sh) in a browser - Create your admin account when prompted
- Set up your organization details
- You’ll be taken to the Budibase builder interface
Creating Your First App
Here’s how to create a simple employee directory application:
Step 1: Create a New App
- Click “Create new app” on the Budibase home screen
- Enter a name (e.g., “Employee Directory”)
- Choose to start from scratch or use a template
Step 2: Create a Data Source
// Example: Define employee table structure{ "name": "employees", "schema": { "first_name": { "type": "string", "required": true }, "last_name": { "type": "string", "required": true }, "email": { "type": "string", "required": true }, "department": { "type": "string" }, "hire_date": { "type": "date" }, "phone": { "type": "string" }, "active": { "type": "boolean", "default": true } }}Step 3: Build Your Interface
- Go to the “Design” tab
- Drag and drop components (tables, forms, buttons)
- Connect components to your data source
- Customize styling and layout
Step 4: Add Automation
// Example automation: Send welcome email on new employee{ "trigger": "Row Created", "table": "employees", "actions": [ { "type": "Send Email", "to": "{{ trigger.row.email }}", "subject": "Welcome to the team!", "body": "Hi {{ trigger.row.first_name }}, welcome aboard!" } ]}Sample Application Structure
Here’s a sample multi-screen application structure:
📱 Employee Management App├── 🏠 Dashboard│ ├── Total Employees (Card)│ ├── Department Breakdown (Chart)│ └── Recent Hires (Table)├── 👥 Employees List│ ├── Search & Filter Bar│ ├── Employee Table│ └── Add Employee Button├── 📝 Employee Details│ ├── Profile Information│ ├── Department & Role│ ├── Contact Details│ └── Edit/Delete Actions└── 📊 Reports ├── Headcount by Department ├── Tenure Analysis └── Export OptionsConnecting to External Databases
Budibase can connect to external data sources. Here’s an example PostgreSQL connection:
// PostgreSQL connection configuration{ "type": "PostgreSQL", "host": "your-postgres-host.com", "port": 5432, "database": "your_database", "username": "your_username", "password": "{{ env.DB_PASSWORD }}", // Use environment variable "ssl": true}Using REST API Integration
Connect to external APIs:
// REST API datasource example{ "name": "External API", "config": { "url": "https://api.example.com", "defaultHeaders": { "Authorization": "Bearer {{ env.API_TOKEN }}", "Content-Type": "application/json" } }, "queries": { "getUsers": { "method": "GET", "path": "/users", "transformer": "return data.users" } }}Production Best Practices
Security Recommendations
-
Use Strong Secrets: Never use default or weak secret keys in production. Generate strong, random keys using a password manager or cryptographic tools:
Terminal window # Generate secure random keysopenssl rand -base64 32 # For JWT_SECRETopenssl rand -base64 32 # For INTERNAL_API_KEYopenssl rand -base64 32 # For MINIO_SECRET_KEY -
Environment Variables: Store all sensitive credentials as environment variables in Klutch.sh, never in your Dockerfile or repository.
-
HTTPS: Klutch.sh provides HTTPS by default, ensuring encrypted connections to your Budibase instance.
-
Regular Backups: Implement a backup strategy for your persistent volume data, especially the
/datadirectory. -
Access Control: Configure role-based access control (RBAC) within Budibase for your apps.
-
Database Security: If using external databases, ensure they’re properly secured with strong passwords and network restrictions.
-
Update Regularly: Keep your Budibase Docker image updated to the latest stable version for security patches.
Performance Optimization
- Resource Monitoring: Monitor your Budibase instance’s CPU and memory usage through Klutch.sh dashboard.
- Volume Size: Allocate sufficient storage for your expected data growth. Budibase stores databases, uploads, and app definitions.
- Scaling: If you experience high traffic, consider:
- Scaling up compute resources (CPU/RAM)
- Using Redis for caching and session management
- Implementing a load balancer for multiple instances
- Database Optimization: For large datasets, use external databases (PostgreSQL, MySQL) instead of internal CouchDB.
- Caching: Enable caching for frequently accessed data and static assets.
Data Management
-
Persistent Volumes: Always use persistent volumes for production deployments to prevent data loss.
-
Regular Maintenance: Periodically check disk usage and clean up unnecessary data:
Terminal window # Monitor volume usagedocker exec budibase df -h /data -
Database Backups: Implement automated backup schedules for your CouchDB or external database:
- Back up the
/datavolume regularly - Test backup restoration procedures
- Store backups in a separate location or cloud storage
- Back up the
-
File Upload Management: Monitor and manage user-uploaded files to prevent storage exhaustion.
Monitoring
Monitor your Budibase deployment for:
- Response times and page load speeds
- CPU and memory utilization
- Disk space usage on persistent volumes
- Database query performance
- Application errors and logs (viewable in Klutch.sh dashboard)
- User activity and concurrent connections
- API rate limits and usage patterns
Multi-Instance Deployment
For high availability, deploy multiple Budibase instances:
-
Set up Redis for session management:
Terminal window REDIS_URL=redis://your-redis-host:6379ENABLE_REDIS_CLUSTERING=true -
Configure shared storage: Ensure all instances share the same persistent volume or use S3-compatible storage:
Terminal window USE_MINIO=trueMINIO_URL=https://your-minio-host -
Enable clustering: Configure Budibase for cluster mode:
Terminal window CLUSTER_MODE=trueCLUSTER_PORT=10001
Troubleshooting
Cannot Access Budibase
- Verify that your deployment is running in the Klutch.sh dashboard
- Check that the internal port is set to 10000
- Ensure HTTP is selected as the traffic type
- Review deployment logs for any startup errors
- Verify all required environment variables are set
Data Not Persisting
- Verify that the persistent volume is correctly attached at
/data - Check that the volume has sufficient space allocated
- Ensure the volume mount path matches Budibase’s data directory
- Check file permissions on the volume
Performance Issues
- Review resource utilization in the Klutch.sh dashboard
- Consider increasing CPU and memory allocation (minimum 1GB RAM for Budibase)
- Check if disk I/O is a bottleneck (upgrade volume if needed)
- Monitor database query performance
- Consider using external databases for better performance
- Enable Redis caching for improved response times
Configuration Problems
- Verify all environment variables are set correctly in Klutch.sh
- Check Docker logs for configuration errors
- Ensure the Dockerfile is correctly formatted and builds locally
- Verify JWT_SECRET and other secrets are properly set
- Check CouchDB credentials and connectivity
Database Connection Issues
- For external databases, verify network connectivity
- Check database credentials in environment variables
- Ensure database server allows connections from Klutch.sh
- Test database connection strings locally first
Email/SMTP Issues
- Verify SMTP credentials and server settings
- Test email configuration with a simple test email
- Check SMTP port is correct (usually 587 for TLS)
- Ensure firewall rules allow outbound SMTP connections
Additional Resources
- Klutch.sh Documentation
- Official Budibase Documentation
- Budibase GitHub Repository
- Klutch.sh Volumes Guide
- Klutch.sh Networking Guide
- Klutch.sh Quick Start Guide
- Budibase Community Forum
Conclusion
Deploying Budibase to Klutch.sh with Docker provides a robust, self-hosted low-code platform with full control over your business applications and data. By following this guide, you’ve set up a production-ready Budibase instance with persistent storage, proper security configurations, and the ability to scale as your needs grow. Your platform is now ready to empower your team to build custom internal tools, automate workflows, and connect to various data sources—all while maintaining complete control over your infrastructure and data privacy.