Skip to content

Deploying Appsmith

Introduction

Appsmith is a powerful open-source low-code platform that enables developers and teams to rapidly build internal tools, admin panels, dashboards, and CRUD applications without writing extensive frontend code. With its intuitive drag-and-drop interface, pre-built UI widgets, and seamless integrations with databases, APIs, and third-party services, Appsmith accelerates application development while maintaining full control and customization.

Deploying Appsmith on Klutch.sh provides a production-ready, scalable infrastructure for your low-code applications with automated Docker deployments, persistent storage for application data, secure environment variable management, and enterprise-grade reliability. Whether you’re building customer support dashboards, inventory management systems, data visualization tools, or complex business applications, Klutch.sh simplifies the deployment process and ensures your Appsmith instance is always available.

This comprehensive guide walks you through deploying Appsmith on Klutch.sh using a Dockerfile, configuring MongoDB or PostgreSQL databases, setting up persistent volumes for data retention, managing environment variables for security, and implementing production best practices for scalable internal tool development.


Prerequisites

Before you begin deploying Appsmith on Klutch.sh, ensure you have:

  • A Klutch.sh account (sign up here)
  • A GitHub repository for your Appsmith deployment configuration
  • Basic understanding of Docker containers and environment variables
  • (Optional but recommended) A MongoDB or PostgreSQL database instance for production use
  • Access to the Klutch.sh dashboard

Understanding Appsmith Architecture

Appsmith consists of several key components:

  • Frontend Server: Node.js-based application serving the visual editor and runtime
  • Backend Server: Java Spring Boot application handling API requests and business logic
  • Database: MongoDB (default) or PostgreSQL for storing application metadata, user data, and configurations
  • Redis: (Optional) For session management and caching in production environments
  • Storage: Persistent volumes for uploaded files, plugins, and configuration data

When deployed on Klutch.sh, Appsmith automatically detects your Dockerfile and builds a container image that includes all necessary components. The platform manages traffic routing, SSL certificates, and provides persistent storage options for your application data.


Project Structure

A minimal repository structure for deploying Appsmith on Klutch.sh:

appsmith-deployment/
├── Dockerfile
├── .dockerignore
├── .gitignore
├── README.md
└── docker.env.example

This simple structure allows Klutch.sh to automatically detect and build your Appsmith container. You don’t need to include application code since Appsmith comes pre-packaged in the official Docker image.


Creating Your Dockerfile

Klutch.sh automatically detects a Dockerfile in the root directory of your repository. Create a Dockerfile that uses the official Appsmith image as the base:

FROM appsmith/appsmith-ce:latest
# Expose the default Appsmith port
EXPOSE 80
# The official image includes a startup script
# that handles initialization and service startup
CMD ["/opt/appsmith/run-java.sh"]

Option 2: Production Dockerfile with Health Checks

FROM appsmith/appsmith-ce:latest
# Set working directory
WORKDIR /opt/appsmith
# Expose the application port
EXPOSE 80
# Add health check for monitoring
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost/api/v1/health || exit 1
# Use the official startup script
CMD ["/opt/appsmith/run-java.sh"]

Option 3: Custom Dockerfile with Plugins

FROM appsmith/appsmith-ce:latest
# Install additional system dependencies if needed
RUN apt-get update && apt-get install -y \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
# Copy custom plugins or configurations (optional)
# COPY ./plugins /appsmith-stacks/plugins
# COPY ./custom-config /appsmith-stacks/configuration
# Expose the application port
EXPOSE 80
# Health check for production monitoring
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost/api/v1/health || exit 1
# Start Appsmith services
CMD ["/opt/appsmith/run-java.sh"]

Important Notes:

  • Appsmith’s official image listens on port 80 internally
  • Klutch.sh will route external HTTP traffic to port 80 in your container
  • The container includes NGINX, backend services, and the Appsmith runtime
  • All services are managed by the startup script included in the image

Deploying to Klutch.sh

  1. Create Your Repository

    Create a new GitHub repository and add your Dockerfile:

    Terminal window
    mkdir appsmith-deployment
    cd appsmith-deployment
    # Create Dockerfile
    cat > Dockerfile << 'EOF'
    FROM appsmith/appsmith-ce:latest
    EXPOSE 80
    HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
    CMD curl -f http://localhost/api/v1/health || exit 1
    CMD ["/opt/appsmith/run-java.sh"]
    EOF
    # Create .gitignore
    cat > .gitignore << 'EOF'
    node_modules/
    .env
    .DS_Store
    EOF
    # Initialize git and push
    git init
    git add .
    git commit -m "Initial Appsmith deployment setup"
    git remote add origin https://github.com/YOUR_USERNAME/appsmith-deployment.git
    git push -u origin main
  2. Access the Klutch.sh Dashboard

    Navigate to klutch.sh/app and log in to your account.

  3. Create a New Project

    • Click “New Project” in the dashboard
    • Enter a project name (e.g., “Internal Tools”)
    • Select your preferred region for deployment
  4. Create a New Application

    • Within your project, click “New App”
    • Name your application (e.g., “Appsmith”)
    • Connect your GitHub repository containing the Dockerfile
  5. Configure Build Settings

    Klutch.sh automatically detects the Dockerfile in your repository root. If your Dockerfile is in a subdirectory, specify the build context path in the dashboard.

  6. Set Up Persistent Storage

    Appsmith requires persistent storage to retain application data across deployments:

    • In the app settings, navigate to the “Volumes” section
    • Click “Add Volume”
    • Set the mount path to /appsmith-stacks
    • Set the volume size (recommended: 10GB minimum for production)
    • Click “Add” to attach the volume

    Critical: The /appsmith-stacks directory stores:

    • MongoDB/PostgreSQL data (if using embedded database)
    • Uploaded files and media
    • Application configurations
    • Custom plugins
    • SSL certificates
  7. Configure Environment Variables

    In the app settings, add the following required environment variables:

    Essential Variables:

    Terminal window
    APPSMITH_ENCRYPTION_PASSWORD=your-strong-encryption-password
    APPSMITH_ENCRYPTION_SALT=your-strong-encryption-salt

    Database Configuration (if using external database):

    For MongoDB:

    Terminal window
    APPSMITH_MONGODB_URI=mongodb://username:password@host:port/appsmith

    For PostgreSQL:

    Terminal window
    APPSMITH_DB_URL=postgresql://username:password@host:port/appsmith

    Optional Configuration:

    Terminal window
    APPSMITH_MAIL_ENABLED=true
    APPSMITH_MAIL_FROM=noreply@yourdomain.com
    APPSMITH_MAIL_HOST=smtp.your-provider.com
    APPSMITH_MAIL_PORT=587
    APPSMITH_MAIL_USERNAME=your-smtp-username
    APPSMITH_MAIL_PASSWORD=your-smtp-password
    APPSMITH_OAUTH2_GOOGLE_CLIENT_ID=your-google-oauth-client-id
    APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET=your-google-oauth-secret
    APPSMITH_OAUTH2_GITHUB_CLIENT_ID=your-github-oauth-client-id
    APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET=your-github-oauth-secret

    Security Best Practice: Always use the “Secret” checkbox for sensitive values like passwords, API keys, and encryption keys.

  8. Configure Traffic Settings

    • In the “Networking” section, select HTTP as the traffic type
    • Set the internal port to 80 (Appsmith’s default port)
    • Enable automatic HTTPS/SSL (provided by Klutch.sh)
  9. Deploy the Application

    • Review all settings
    • Click “Deploy” to start the build process
    • Klutch.sh will:
      • Clone your repository
      • Detect the Dockerfile
      • Build the container image
      • Deploy to your selected region
      • Provision persistent storage
      • Configure networking and SSL
  10. Monitor Deployment Progress

    • View real-time build logs in the dashboard
    • Wait for the deployment status to show “Running”
    • Initial startup may take 2-3 minutes as Appsmith initializes databases and services

Once deployment completes, your Appsmith instance will be accessible at https://your-app-name.klutch.sh or your configured custom domain.


Database Setup and Configuration

Appsmith can use either an embedded MongoDB instance (suitable for development) or an external database (recommended for production).

Embedded Database (Development)

By default, the Appsmith Docker image includes an embedded MongoDB instance. When you attach a persistent volume to /appsmith-stacks, the database files are stored there automatically.

Pros:

  • No external database setup required
  • Simplified configuration
  • Good for testing and small deployments

Cons:

  • Limited scalability
  • Backup complexity
  • Resource sharing with application

For production deployments, use a managed MongoDB instance:

  1. Provision a MongoDB Database

    You can use:

  2. Create Application Database

    Connect to your MongoDB instance and create a database:

    use appsmith
    db.createUser({
    user: "appsmith_user",
    pwd: "strong-secure-password",
    roles: [
    { role: "readWrite", db: "appsmith" }
    ]
    })
  3. Configure Connection String

    In your Klutch.sh app environment variables, set:

    Terminal window
    APPSMITH_MONGODB_URI=mongodb://appsmith_user:strong-secure-password@your-mongodb-host:27017/appsmith?authSource=appsmith

    For MongoDB Atlas with SSL:

    Terminal window
    APPSMITH_MONGODB_URI=mongodb+srv://appsmith_user:password@cluster.mongodb.net/appsmith?retryWrites=true&w=majority
  4. Restart Application

    After setting the environment variable, trigger a new deployment in the Klutch.sh dashboard for the changes to take effect.

PostgreSQL Configuration (Alternative)

Appsmith also supports PostgreSQL as an alternative to MongoDB:

  1. Provision PostgreSQL Database

    Follow the Klutch.sh PostgreSQL guide to deploy a PostgreSQL instance.

  2. Create Database and User

    CREATE DATABASE appsmith;
    CREATE USER appsmith_user WITH PASSWORD 'strong-secure-password';
    GRANT ALL PRIVILEGES ON DATABASE appsmith TO appsmith_user;
  3. Configure Environment Variable

    Terminal window
    APPSMITH_DB_URL=postgresql://appsmith_user:strong-secure-password@postgres-host:5432/appsmith
  4. Disable MongoDB

    When using PostgreSQL, ensure the MongoDB URI is not set, as Appsmith will prefer PostgreSQL when configured.


Setting Up Persistent Volumes

Persistent storage is critical for maintaining application state, user data, and configurations across deployments and restarts.

Required Mount Path

Configure a persistent volume in the Klutch.sh dashboard:

  • Mount Path: /appsmith-stacks
  • Recommended Size: 10GB minimum (20GB+ for production)

What Gets Stored

The /appsmith-stacks directory contains:

/appsmith-stacks/
├── data/ # MongoDB data files (if using embedded DB)
├── plugins/ # Custom plugins and extensions
├── configuration/ # Application configuration files
├── git-storage/ # Git-connected application repositories
└── logs/ # Application and server logs

Backup Strategy

For production deployments, implement regular backups:

  1. Schedule Volume Snapshots

    Use Klutch.sh’s volume snapshot feature (if available) or set up a backup script.

  2. Database Backups

    If using external MongoDB:

    Terminal window
    mongodump --uri="mongodb://user:pass@host:port/appsmith" --out=/backup/appsmith-$(date +%Y%m%d)

    If using PostgreSQL:

    Terminal window
    pg_dump -h host -U user -d appsmith > appsmith-backup-$(date +%Y%m%d).sql
  3. Store Backups Securely

    Upload backups to object storage (S3, etc.) or a secure backup service.


Environment Variables Reference

Required Variables

VariableDescriptionExample
APPSMITH_ENCRYPTION_PASSWORDEncryption key for sensitive data (min 32 chars)a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
APPSMITH_ENCRYPTION_SALTSalt for encryption (min 32 chars)z9y8x7w6v5u4t3s2r1q0p9o8n7m6l5k4

Database Variables

VariableDescriptionExample
APPSMITH_MONGODB_URIMongoDB connection stringmongodb://user:pass@host:27017/appsmith
APPSMITH_DB_URLPostgreSQL connection stringpostgresql://user:pass@host:5432/appsmith

Email Configuration

VariableDescriptionExample
APPSMITH_MAIL_ENABLEDEnable email notificationstrue
APPSMITH_MAIL_FROMSender email addressnoreply@example.com
APPSMITH_MAIL_HOSTSMTP server hostnamesmtp.sendgrid.net
APPSMITH_MAIL_PORTSMTP server port587
APPSMITH_MAIL_USERNAMESMTP usernameapikey
APPSMITH_MAIL_PASSWORDSMTP passwordyour-api-key

OAuth Configuration

VariableDescription
APPSMITH_OAUTH2_GOOGLE_CLIENT_IDGoogle OAuth client ID
APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRETGoogle OAuth client secret
APPSMITH_OAUTH2_GITHUB_CLIENT_IDGitHub OAuth client ID
APPSMITH_OAUTH2_GITHUB_CLIENT_SECRETGitHub OAuth client secret

Advanced Configuration

VariableDescriptionDefault
APPSMITH_REDIS_URLRedis connection for cachingredis://localhost:6379
APPSMITH_SIGNUP_DISABLEDDisable new user registrationsfalse
APPSMITH_ADMIN_EMAILSComma-separated admin emails-
APPSMITH_DISABLE_TELEMETRYDisable anonymous usage datafalse

Custom Domain Configuration

To use your own domain with Appsmith on Klutch.sh:

  1. Add Domain in Dashboard

    • Navigate to your Appsmith app in the Klutch.sh dashboard
    • Go to “Domains” section
    • Click “Add Custom Domain”
    • Enter your domain (e.g., apps.yourdomain.com)
  2. Configure DNS Records

    Add a CNAME record in your DNS provider:

    Type: CNAME
    Name: apps (or your subdomain)
    Value: your-app-name.klutch.sh
    TTL: 3600
  3. Enable SSL/TLS

    Klutch.sh automatically provisions and manages SSL certificates for your custom domain using Let’s Encrypt.

  4. Update Appsmith Configuration

    Add an environment variable for the custom domain:

    Terminal window
    APPSMITH_INSTANCE_NAME=apps.yourdomain.com
  5. Verify Configuration

    • Wait for DNS propagation (usually 5-15 minutes)
    • Visit https://apps.yourdomain.com
    • Verify SSL certificate is active

For detailed domain configuration, see the Klutch.sh Custom Domains guide.


Getting Started with Appsmith

After deploying your Appsmith instance, follow these steps to create your first application:

Initial Setup

  1. Access Your Instance

    Navigate to https://your-app-name.klutch.sh (or your custom domain).

  2. Create Administrator Account

    • Enter your email address
    • Set a strong password
    • Complete the setup wizard
  3. Configure Organization

    • Set your organization name
    • Invite team members (optional)
    • Configure authentication settings

Creating Your First Application

  1. Create a New Application

    • Click “Create New” on the Appsmith homepage
    • Choose “Start from scratch” or select a template
    • Name your application (e.g., “Customer Dashboard”)
  2. Connect a Data Source

    Appsmith supports connecting to various databases and APIs:

    • Click “Datasources” in the left sidebar
    • Click “Create New”
    • Select your database type:
      • PostgreSQL
      • MySQL
      • MongoDB
      • REST API
      • GraphQL
      • And many more…

    Example: Connecting to PostgreSQL:

    Connection Mode: Read / Write
    Host Address: your-postgres-host.klutch.sh
    Port: 8000 (for TCP traffic on Klutch.sh)
    Database Name: your_database
    Username: your_user
    Password: your_password
  3. Build Your UI

    • Drag and drop widgets from the widget panel:
      • Tables for displaying data
      • Forms for data entry
      • Buttons for actions
      • Charts for visualizations
      • Input fields, dropdowns, etc.
  4. Write Queries

    • Click “Queries/JS” to create a new query
    • Select your connected datasource
    • Write SQL or use the query builder:
    SELECT * FROM customers WHERE status = 'active' ORDER BY created_at DESC;
  5. Bind Data to Widgets

    • Select a widget (e.g., a Table)
    • In the properties panel, set Table Data to {{Query1.data}}
    • Appsmith automatically binds the query results to the table
  6. Add Interactivity

    • Create queries for INSERT, UPDATE, DELETE operations
    • Bind button onClick events to run queries
    • Use JavaScript to handle complex logic:
    {{
    showAlert('Customer updated successfully!', 'success');
    Query1.run();
    }}
  7. Deploy Your Application

    • Click “Deploy” in the top right
    • Your application is now live and accessible to your team
    • Share the URL with users

Sample Application: Simple CRUD Dashboard

Here’s a complete example of building a product management dashboard:

Datasource: PostgreSQL database with a products table

Queries:

  1. GetProducts:

    SELECT * FROM products ORDER BY created_at DESC;
  2. CreateProduct:

    INSERT INTO products (name, price, stock, description)
    VALUES (
    {{NameInput.text}},
    {{PriceInput.text}},
    {{StockInput.text}},
    {{DescriptionInput.text}}
    )
    RETURNING *;
  3. UpdateProduct:

    UPDATE products
    SET
    name = {{NameInput.text}},
    price = {{PriceInput.text}},
    stock = {{StockInput.text}},
    description = {{DescriptionInput.text}}
    WHERE id = {{ProductsTable.selectedRow.id}}
    RETURNING *;
  4. DeleteProduct:

    DELETE FROM products WHERE id = {{ProductsTable.selectedRow.id}};

UI Layout:

  • Table Widget (ProductsTable): Display products, bound to {{GetProducts.data}}
  • Form Widget with inputs:
    • NameInput (Text Input)
    • PriceInput (Number Input)
    • StockInput (Number Input)
    • DescriptionInput (Text Area)
  • Buttons:
    • “Add Product” → CreateProduct.run().then(() => GetProducts.run())
    • “Update Product” → UpdateProduct.run().then(() => GetProducts.run())
    • “Delete Product” → DeleteProduct.run().then(() => GetProducts.run())

This creates a fully functional product management interface in minutes!


Connecting to Databases on Klutch.sh

When connecting Appsmith to databases deployed on Klutch.sh, use the following configuration:

TCP Traffic for Database Connections

If your database requires TCP traffic (like PostgreSQL, MySQL, MongoDB):

  1. Deploy Database with TCP

    When deploying your database on Klutch.sh:

    • Select TCP as the traffic type in the networking settings
    • Note that external connections will use port 8000
    • Configure the internal port based on the database:
      • PostgreSQL: 5432
      • MySQL: 3306
      • MongoDB: 27017
  2. Configure Connection in Appsmith

    When adding the datasource in Appsmith:

    Host: your-database-app.klutch.sh
    Port: 8000 (external TCP port)
  3. Test Connection

    Use the “Test” button in Appsmith’s datasource configuration to verify connectivity.

For more details on database deployments, see:


Production Best Practices

Security Hardening

  1. Disable Public Signups

    Set environment variable:

    Terminal window
    APPSMITH_SIGNUP_DISABLED=true
  2. Configure Admin Emails

    Terminal window
    APPSMITH_ADMIN_EMAILS=admin@yourdomain.com,manager@yourdomain.com
  3. Enable OAuth/SSO

    Configure Google, GitHub, or other OAuth providers to control access centrally.

  4. Use Strong Encryption Keys

    Generate secure encryption keys (minimum 32 characters):

    Terminal window
    # Linux/macOS
    openssl rand -hex 32
    # Or use a password generator
  5. Enable HTTPS Only

    Klutch.sh provides automatic HTTPS. Ensure all connections use HTTPS by configuring:

    Terminal window
    APPSMITH_REDIRECT_HTTP_TO_HTTPS=true
  6. Regular Security Updates

    Update your Dockerfile to use specific Appsmith versions:

    FROM appsmith/appsmith-ce:v1.9.50

    Then regularly update to newer stable versions and redeploy.

Performance Optimization

  1. Use External Redis

    For caching and session management:

    Terminal window
    APPSMITH_REDIS_URL=redis://your-redis-host:6379
  2. Enable Caching

    Configure response caching for queries:

    • In query settings, enable “Cache response”
    • Set appropriate TTL values
  3. Optimize Database Queries

    • Add indexes to frequently queried columns
    • Use pagination for large datasets
    • Implement query result caching in Appsmith
  4. Monitor Resource Usage

    • Set up monitoring in the Klutch.sh dashboard
    • Watch CPU, memory, and disk usage
    • Scale vertically (larger instance) if needed
  5. Use CDN for Assets

    Configure an external CDN for static assets if serving media-heavy applications.

Backup and Disaster Recovery

  1. Automated Volume Snapshots

    Schedule regular snapshots of the /appsmith-stacks volume through the Klutch.sh dashboard.

  2. Database Backups

    For external databases, set up automated backup schedules:

    MongoDB:

    Terminal window
    # Daily backup script
    mongodump --uri="${APPSMITH_MONGODB_URI}" --out=/backups/$(date +%Y%m%d)
    tar -czf /backups/appsmith-$(date +%Y%m%d).tar.gz /backups/$(date +%Y%m%d)
    # Upload to S3 or backup service
  3. Application Export

    • Regularly export your Appsmith applications
    • Go to Application Settings → Export
    • Store exports in version control
  4. Test Recovery Procedures

    Periodically test restoring from backups to ensure they work correctly.

Monitoring and Logging

  1. Enable Application Logs

    View logs in the Klutch.sh dashboard or access them from the volume:

    Terminal window
    /appsmith-stacks/logs/
  2. Set Up Alerts

    Configure alerts for:

    • Application downtime
    • High error rates
    • Resource exhaustion
    • Failed login attempts
  3. Monitor Query Performance

    Use Appsmith’s built-in query execution time tracking to identify slow queries.

  4. Track User Activity

    Enable audit logging to track user actions and application usage.


Troubleshooting Common Issues

Application Won’t Start

Symptoms: Container starts but Appsmith UI is not accessible

Solutions:

  1. Check logs in the Klutch.sh dashboard
  2. Verify environment variables are set correctly
  3. Ensure persistent volume is attached to /appsmith-stacks
  4. Check that encryption password and salt are at least 32 characters
  5. Verify database connectivity if using external database

Database Connection Errors

Symptoms: “Unable to connect to database” errors in logs

Solutions:

  1. Verify connection string format:

    • MongoDB: mongodb://user:pass@host:port/database
    • PostgreSQL: postgresql://user:pass@host:port/database
  2. Check TCP port configuration (use 8000 for Klutch.sh TCP traffic)

  3. Verify database credentials

  4. Ensure network connectivity between services

  5. Test connection from Appsmith container:

    Terminal window
    # For PostgreSQL
    psql -h host -p 8000 -U user -d database
    # For MongoDB
    mongosh "mongodb://user:pass@host:8000/database"

Slow Performance

Symptoms: Slow page loads, query timeouts

Solutions:

  1. Check resource usage in Klutch.sh dashboard
  2. Upgrade to a larger instance size
  3. Optimize database queries:
    • Add indexes
    • Use pagination
    • Enable query caching
  4. Enable Redis for caching
  5. Review slow query logs

Login Issues

Symptoms: Cannot log in to Appsmith

Solutions:

  1. Reset admin password using the container shell:

    Terminal window
    docker exec -it <container-id> appsmithctl reset-admin-password
  2. Verify OAuth configuration if using SSO

  3. Check browser console for JavaScript errors

  4. Clear browser cache and cookies

  5. Verify email configuration if using email-based login

Data Loss After Redeployment

Symptoms: Applications or data missing after redeployment

Solutions:

  1. Critical: Ensure persistent volume is correctly attached to /appsmith-stacks

  2. Verify volume wasn’t accidentally deleted

  3. Check volume mount configuration in Klutch.sh dashboard

  4. Restore from backup if necessary

SSL/HTTPS Issues

Symptoms: SSL certificate errors, mixed content warnings

Solutions:

  1. Verify custom domain DNS is correctly configured

  2. Wait for SSL certificate provisioning (usually 5-15 minutes)

  3. Check that APPSMITH_INSTANCE_NAME matches your domain

  4. Ensure all external resources use HTTPS URLs

  5. Clear browser cache and retry


Scaling Your Appsmith Deployment

As your usage grows, consider these scaling strategies:

Vertical Scaling

Increase resources for your Appsmith instance:

  • Upgrade to a larger instance type in the Klutch.sh dashboard
  • Increase persistent volume size if storage is constrained
  • Recommended specs for production:
    • Small deployments (< 50 users): 2 CPU, 4GB RAM
    • Medium deployments (50-200 users): 4 CPU, 8GB RAM
    • Large deployments (200+ users): 8+ CPU, 16+ GB RAM

Database Scaling

  • Use managed MongoDB or PostgreSQL with read replicas
  • Enable database connection pooling
  • Separate read and write operations

Caching Strategy

  • Deploy Redis for session and query caching
  • Configure CDN for static assets
  • Enable browser caching for UI components

Migration from Other Platforms

If you’re migrating from self-hosted or cloud-hosted Appsmith to Klutch.sh:

  1. Export Applications

    From your existing Appsmith instance:

    • Go to each application
    • Click Settings → Export
    • Download JSON files
  2. Backup Database

    Export your MongoDB or PostgreSQL database:

    Terminal window
    mongodump --uri="mongodb://..." --out=/backup
    # or
    pg_dump -h host -U user database > backup.sql
  3. Deploy New Instance on Klutch.sh

    Follow the deployment steps in this guide

  4. Restore Database

    Import your database to the new instance:

    Terminal window
    mongorestore --uri="mongodb://..." /backup
    # or
    psql -h host -U user -d database < backup.sql
  5. Import Applications

    In your new Appsmith instance:

    • Create a new application
    • Click Settings → Import
    • Upload the JSON file
  6. Update Datasource Connections

    Reconfigure datasource connections with new hostnames/credentials

  7. Test Thoroughly

    Verify all applications, queries, and workflows work correctly

  8. Update DNS

    Point your domain to the new Klutch.sh deployment


Advanced Customization

Custom Plugins

To add custom plugins to your Appsmith deployment:

  1. Create Plugin Directory

    In your repository, create a plugins directory with your custom plugins.

  2. Update Dockerfile

    FROM appsmith/appsmith-ce:latest
    COPY ./plugins /appsmith-stacks/plugins
    RUN chown -R appsmith:appsmith /appsmith-stacks/plugins
    EXPOSE 80
    CMD ["/opt/appsmith/run-java.sh"]
  3. Redeploy

    Push changes to GitHub and trigger a new deployment in Klutch.sh.

Custom Branding

Customize Appsmith’s appearance:

  1. Configure Branding Variables

    Terminal window
    APPSMITH_BRAND_NAME=Your Company
    APPSMITH_BRAND_LOGO_URL=https://yourdomain.com/logo.png
    APPSMITH_BRAND_FAVICON_URL=https://yourdomain.com/favicon.ico
  2. Custom CSS

    Add custom CSS in Appsmith’s theme editor under Settings → Theme.


Cost Optimization Tips

  • Right-size your instance: Start small and scale up based on actual usage
  • Use embedded database for development: Save costs by using the built-in MongoDB for non-production environments
  • Implement auto-scaling policies: Scale down during off-hours if possible
  • Optimize storage: Regularly clean up old logs and unused data from /appsmith-stacks/logs
  • Monitor resource usage: Use Klutch.sh monitoring to identify optimization opportunities

Example Deployment Repository

For a complete working example, you can reference this sample repository structure:

appsmith-on-klutch/
├── Dockerfile
├── .dockerignore
├── .gitignore
├── README.md
└── docker.env.example

Dockerfile:

FROM appsmith/appsmith-ce:v1.9.50
WORKDIR /opt/appsmith
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost/api/v1/health || exit 1
CMD ["/opt/appsmith/run-java.sh"]

docker.env.example:

Terminal window
# Required
APPSMITH_ENCRYPTION_PASSWORD=change-me-to-32-char-random-string
APPSMITH_ENCRYPTION_SALT=change-me-to-32-char-random-string
# Database (optional, uses embedded MongoDB if not set)
# APPSMITH_MONGODB_URI=mongodb://user:pass@host:27017/appsmith
# Email (optional)
# APPSMITH_MAIL_ENABLED=true
# APPSMITH_MAIL_FROM=noreply@yourdomain.com
# APPSMITH_MAIL_HOST=smtp.sendgrid.net
# APPSMITH_MAIL_PORT=587
# APPSMITH_MAIL_USERNAME=apikey
# APPSMITH_MAIL_PASSWORD=your-sendgrid-api-key
# OAuth (optional)
# APPSMITH_OAUTH2_GOOGLE_CLIENT_ID=your-client-id
# APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET=your-client-secret

README.md:

# Appsmith on Klutch.sh
Production-ready Appsmith deployment for internal tools and dashboards.
## Quick Start
1. Clone this repository
2. Copy `docker.env.example` to `.env` and configure
3. Push to GitHub
4. Deploy on Klutch.sh following the official guide
## Support
See the full deployment guide at docs.klutch.sh

Additional Resources


Conclusion

Deploying Appsmith on Klutch.sh provides a powerful, scalable platform for building internal tools without the complexity of managing infrastructure. With automatic Dockerfile detection, persistent storage, secure environment management, and production-ready configurations, you can focus on building applications that drive your business forward.

Whether you’re creating simple CRUD dashboards, complex multi-page applications, or integrating with multiple data sources, Appsmith on Klutch.sh offers the reliability and flexibility you need. Start building your internal tools today and accelerate your development workflow with low-code simplicity and full deployment automation.

For additional help or questions, reach out to the Appsmith community or Klutch.sh support.