Category: Installation
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Appsmith SSL On a Different Port

Issue

I am trying to host a docker-compose based install of Appsmith on a Digital Ocean droplet that already has ports 80 and 443 occupied. Although Appsmith is working great on port 80 over HTTP, connection to port 8443 over HTTPS is being refused. Upon investigation, I found out that Appsmith is not listening on port 443 and has not provisioned a SSL certificate. I have tried various options of ports, forwarding, custom domains, and X-Forwarded headers but nothing has worked. I need help in properly configuring SSL for Appsmith and making it work with my existing Caddy server as a reverse proxy.

Resolution

  • Modify your Appsmith docker-compose.yml to listen on alternative ports:

    ports:
                   - "8080:80"
                   - "8443:443"
                  
  • Add the environment variable APPSMITH_CUSTOM_DOMAIN to your docker-compose.yml to allow Appsmith to provision an SSL certificate:

    APPSMITH_CUSTOM_DOMAIN=yourappsmithdomain.com
  • Temporarily make ports 80 and 443 available for a few minutes. 
  • Run docker-compose up to start Appsmith and let it provision the SSL certificate. Once SSL provisioning is complete, close ports 80 and 443 again.
  • Add an extra_hosts entry for Caddy in your docker-compose.yml for services like n8n, so that Caddy can resolve the Docker host:
  • extra_hosts:
      - "host.docker.internal:172.17.0.1"
  • Update your Caddy file to reverse proxy traffic to Appsmith, using the following configuration:

    yourappsmithdomain.com {
      reverse_proxy http://host.docker.internal:8080
    }
  • Restart Caddy to apply the updated Caddy file.
  • Navigate to your Appsmith domain (yourappsmithdomain.com) to test the configuration.