Self-Hosting Appsmith with Docker Compose

Unlike most self-hosted platforms that need you to wire up databases and reverse proxies separately, Appsmith bundles everything — MongoDB, Redis, Caddy, and the app server — into a single container. One docker compose up -d, and you have a full low-code platform for building internal tools, admin panels, and dashboards.

Quick Verdict

Appsmith is the simplest low-code platform to self-host. The all-in-one container means no multi-service orchestration, no database setup, no reverse proxy configuration. The trade-off: you get less control over individual components, and scaling requires breaking out of the single-container model. For teams that want more granular control over infrastructure, ToolJet uses a traditional multi-container architecture. For most internal tool needs, Appsmith’s simplicity wins.

Use Cases

  • Admin panels — CRUD interfaces for your PostgreSQL, MySQL, or MongoDB databases
  • Customer support dashboards — pull data from Stripe, Intercom, REST APIs into a single view
  • Approval workflows — forms with conditional logic, email notifications, and database writes
  • Data visualization — charts and tables connected to live data sources

Prerequisites

  • A Linux server (Ubuntu 22.04+ recommended)
  • Docker and Docker Compose installed (guide)
  • 4 GB of RAM minimum (the all-in-one container runs 6 internal services)
  • 5 GB of free disk space
  • A domain name (optional, for remote access)

Docker Compose Configuration

Appsmith ships as a single container with MongoDB, Redis, PostgreSQL (for Keycloak), Caddy, and the Java backend all managed by supervisord internally.

Create a docker-compose.yml:

services:
  appsmith:
    image: appsmith/appsmith-ce:v1.97
    container_name: appsmith
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    environment:
      # Encryption keys — CHANGE THESE for production
      APPSMITH_ENCRYPTION_PASSWORD: "change-this-encryption-password"
      APPSMITH_ENCRYPTION_SALT: "change-this-encryption-salt"
    volumes:
      - appsmith-stacks:/appsmith-stacks
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost/api/v1/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 120s

volumes:
  appsmith-stacks:

Start the stack:

docker compose up -d

The first startup takes 2-3 minutes as internal MongoDB, PostgreSQL, and Redis initialize. Watch progress with docker logs -f appsmith.

Initial Setup

  1. Open http://your-server-ip in your browser (the container serves on port 80)
  2. Create your admin account — the first user becomes the superadmin
  3. You’ll see a welcome wizard — choose whether to connect a data source immediately or skip to explore
  4. Create your first app with New → Application
  5. The canvas editor opens — drag components from the widget panel on the right

Configuration

Appsmith stores its runtime configuration in /appsmith-stacks/configuration/docker.env inside the container. You can override settings via container environment variables or by editing this file directly.

SettingEnvironment VariableDefaultNotes
Encryption passwordAPPSMITH_ENCRYPTION_PASSWORDabcdEncrypts datasource credentials — MUST change
Encryption saltAPPSMITH_ENCRYPTION_SALTabcdSalt for encryption — MUST change
Custom domainAPPSMITH_CUSTOM_DOMAINNoneEnables auto-SSL via Caddy
Disable signupsAPPSMITH_SIGNUP_DISABLEDfalseRestrict to invited users
Allowed signup domainsAPPSMITH_SIGNUP_ALLOWED_DOMAINSAllComma-separated domain list
Admin emailsAPPSMITH_ADMIN_EMAILSFirst userComma-separated superadmin emails
Disable telemetryAPPSMITH_DISABLE_TELEMETRYfalseStop sending usage analytics
Server timeoutAPPSMITH_SERVER_TIMEOUT60sQuery execution timeout

SMTP Configuration

For email invitations, password resets, and notifications:

environment:
  APPSMITH_EMAIL_ENABLED: "true"
  APPSMITH_EMAIL_SERVER_HOST: "smtp.yourdomain.com"
  APPSMITH_EMAIL_SERVER_PORT: "587"
  APPSMITH_EMAIL_SERVER_USERNAME: "your-smtp-user"
  APPSMITH_EMAIL_SERVER_PASSWORD: "your-smtp-password"
  APPSMITH_EMAIL_FROM_ADDRESS: "[email protected]"
  APPSMITH_SMTP_AUTH_ENABLED: "true"
  APPSMITH_MAIL_SMTP_TLS_ENABLED: "true"

OAuth / SSO

Enable Google or GitHub OAuth login:

environment:
  APPSMITH_OAUTH2_GOOGLE_CLIENT_ID: "your-client-id"
  APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET: "your-client-secret"
  APPSMITH_OAUTH2_GITHUB_CLIENT_ID: "your-client-id"
  APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET: "your-client-secret"

Advanced Configuration

Custom Domain with Auto-SSL

Appsmith’s built-in Caddy proxy handles Let’s Encrypt certificates automatically:

environment:
  APPSMITH_CUSTOM_DOMAIN: "appsmith.yourdomain.com"

Point your DNS A record to the server IP. Caddy will obtain and renew SSL certificates without manual configuration.

External Database

For production deployments, use an external MongoDB instead of the embedded one:

environment:
  APPSMITH_DB_URL: "mongodb://user:password@your-mongo-host:27017/appsmith"
  APPSMITH_ENABLE_EMBEDDED_DB: "0"

Similarly, use an external Redis:

environment:
  APPSMITH_REDIS_URL: "redis://your-redis-host:6379"

Automated Backups to S3

environment:
  APPSMITH_BACKUP_CRON_EXPRESSION: "0 2 * * *"     # Daily at 2 AM
  APPSMITH_BACKUP_ARCHIVE_LIMIT: "7"                # Keep 7 backups
  APPSMITH_BACKUP_S3_ACCESS_KEY: "your-access-key"
  APPSMITH_BACKUP_S3_SECRET_KEY: "your-secret-key"
  APPSMITH_BACKUP_S3_BUCKET_NAME: "appsmith-backups"
  APPSMITH_BACKUP_S3_REGION: "us-east-1"

Reverse Proxy

Appsmith includes its own Caddy reverse proxy that handles SSL. If you want to put it behind Nginx Proxy Manager or another proxy, there are two approaches:

  1. Map only port 80, let your external proxy handle SSL, and don’t set APPSMITH_CUSTOM_DOMAIN
  2. Map port 443, set APPSMITH_CUSTOM_DOMAIN, and let Appsmith’s Caddy handle SSL directly

For option 1 with Nginx Proxy Manager, proxy to http://appsmith:80. See Reverse Proxy Setup.

Backup

Built-in Backup Tool

Appsmith includes a backup/restore CLI:

# Create backup
docker exec appsmith appsmithctl backup

# Backups are stored in /appsmith-stacks/data/backup/
# Copy to host
docker cp appsmith:/appsmith-stacks/data/backup/ ./appsmith-backups/

# Restore from backup
docker exec appsmith appsmithctl restore

Manual Volume Backup

Since everything lives in /appsmith-stacks, a single volume backup covers the entire installation:

docker run --rm -v appsmith-stacks:/data -v $(pwd):/backup alpine \
  tar czf /backup/appsmith-full-backup.tar.gz -C /data .

See Backup Strategy for automated approaches.

Troubleshooting

Container starts but web UI never loads

Symptom: docker logs appsmith shows services starting but http://server-ip times out. Fix: Appsmith takes 2-3 minutes on first boot. The start_period: 120s in the health check accounts for this. If it still doesn’t load after 5 minutes, check logs for Java out-of-memory errors — Appsmith needs 4 GB RAM minimum.

”Invalid credentials” error on datasource test

Symptom: You enter correct database credentials but the connection test fails. Fix: If connecting to a database on the Docker host, use host.docker.internal (macOS/Windows) or the host’s actual IP (Linux). localhost inside the container refers to the container itself, not the host.

Git sync fails with SSH errors

Symptom: Connecting an Appsmith app to a Git repository fails with SSH authentication errors. Fix: Appsmith generates an SSH key pair per app. Copy the public key from Settings → Git Connection and add it as a deploy key on your Git repository. Ensure the repository URL uses SSH format ([email protected]:user/repo.git), not HTTPS.

Supervisord services keep restarting

Symptom: docker logs appsmith shows services crashing and restarting in a loop. Fix: Usually a memory issue. Check docker stats appsmith — if the container is hitting its memory limit, increase the Docker memory allocation. The Java backend alone needs ~1.5 GB. Check the supervisord dashboard at http://server-ip/supervisor/ for per-service status.

Custom domain SSL certificate not issued

Symptom: HTTPS doesn’t work after setting APPSMITH_CUSTOM_DOMAIN. Fix: Ensure ports 80 and 443 are both mapped and reachable from the internet. Caddy needs port 80 for the ACME HTTP challenge. Verify DNS resolves correctly: dig +short appsmith.yourdomain.com. Restart the container after setting the domain.

Resource Requirements

ResourceMinimumRecommended
RAM4 GB8 GB
CPU2 cores4 cores
Disk5 GB20 GB
Containers1 (all-in-one)1

The single container runs MongoDB, PostgreSQL, Redis, Caddy, Java backend, and a Node.js real-time service internally via supervisord. Idle memory usage is around 2.5-3 GB. Building complex apps with many queries increases CPU usage significantly.

Verdict

If you need a low-code platform running in five minutes with zero infrastructure decisions, Appsmith is the right choice. The all-in-one container architecture eliminates the complexity of managing databases, caches, and reverse proxies separately. The widget library covers 90% of internal tool use cases. For teams that need more data source integrations or multiplayer editing, ToolJet is more capable. For solo developers who want a lighter footprint, PocketBase as a backend plus a simple frontend framework may be more appropriate.

FAQ

What’s the difference between Appsmith CE and EE?

Community Edition (CE, appsmith-ce) is fully open-source under Apache 2.0. Enterprise Edition (EE, appsmith-ee) adds SSO via SAML/OIDC, granular access controls, audit logs, custom branding, and priority support. EE has a free plan with limited features.

Can Appsmith connect to my existing database?

Yes. Appsmith supports PostgreSQL, MySQL, MongoDB, MSSQL, Redis, Elasticsearch, DynamoDB, Firestore, and more. You write SQL or NoSQL queries directly in the query editor and bind results to UI widgets.

Does Appsmith support version control?

Yes. Appsmith has built-in Git integration — connect any app to a GitHub, GitLab, or Bitbucket repository. Each save creates a commit, and you can branch, merge, and roll back through the UI.

How does Appsmith handle authentication?

Built-in email/password auth, Google OAuth, and GitHub OAuth are available. The EE adds SAML and OIDC SSO. You can restrict signups by email domain or disable public signups entirely.

Can I migrate from Retool to Appsmith?

There’s no automated migration tool. You’ll need to recreate apps manually — but Appsmith’s query editor and widget model are similar enough to Retool that the rebuild is straightforward. See Self-Hosted Alternatives to Retool.

Comments