Heroku is a platform that enables developers to build, run, and operate applications entirely in the cloud. Let's see how to self-host Appsmith on Heroku.
The administrative privileges (Admin settings) are not available due to deployment restrictions with the Heroku container (dynos).
- Sign up for a free account on Heroku
- Click the button
- Fill in the required
APPSMITH_ENCRYPTION_PASSWORD: Encryption password to encrypt all credentials in the database. You can use any random string (Eg. abcd). The more random, the better.
APPSMITH_ENCRYPTION_SALT: Encryption salt is used to encrypt all credentials in the database. You can use any random string (Eg. abcd). The more random, the better.
APPSMITH_MONGODB_URI: Your Mongo Database URI. Since Heroku doesn't support a managed MongoDB instance, you'll have to create a Mongo DB instance on another service such as https://cloud.mongodb.com. Check out this link for steps on creating a free account with MongoDB Atlas and setting up your first cluster.
- (Optional) Customize the default settings in Heroku
App Name: Optionally select a name for your application (it will be used in the application URL)
Runtime Selection: Select which region your app should run in (the United States or Europe)
- Sign Up
APPSMITH_SIGNUP_DISABLED: Set this value to true to disable allowing users to signup on your Appsmith instance. Users can only sign up if a workspace administrator invites them.
- Email Configuration:
APPSMITH_MAIL_ENABLED: Set this value to true to enable email sending (value should be
APPSMITH_MAIL_FROM: Email ID using which emails will be sent from your installation.
APPSMITH_REPLY_TO: Email ID to which all email replies will be sent.
APPSMITH_MAIL_HOST: The host endpoint for the SMTP server.
APPSMITH_MAIL_SMTP_TLS_ENABLED: Set this value to enable TLS for your SMTP server (value should be
APPSMITH_MAIL_USERNAME: SMTP username.
APPSMITH_MAIL_PASSWORD: SMTP password.
- OAuth Configuration:
- Google OAuth:
APPSMITH_OAUTH2_GOOGLE_CLIENT_ID: Client ID provided by Google for OAuth2 login.
APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET: Client secret provided by Google for OAuth2 login.
- Github OAuth2:
APPSMITH_OAUTH2_GITHUB_CLIENT_ID: Client ID provided by Github for OAuth2 login.
APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET: Client secret provided by Github for OAuth2 login.
- Google OAuth:
APPSMITH_GOOGLE_MAPS_API_KEY: Google Maps API key that is required if you wish to leverage Google Maps widget. Read more here.
APPSMITH_DISABLE_TELEMETRY: We want to be transparent and request that you share anonymous usage data with us. This data is purely statistical and helps us understand your needs & provide better support to your self-hosted instance. You can read more about what information is collected in our documentation here.
- Sign Up
After Heroku finishes setting up the app, click "View," and your Appsmith should be up and running. It will take you to the account creation page, where you can enter credentials to create an account and get started.
- We use the Heroku Redis add-on for caching, which requires your account to have billing information, but we use the free plan of this add-on so that it will charge you nothing. Please make sure your account has already finished providing billing information.
- You may need to wait 2-3 minutes before accessing the application as Heroku may take a while to spin up the dyno and start the Appsmith application.
If you wish to link a custom domain (Eg: https://appsmith.yourcompany.com)to your Appsmith installation, please follow these steps below:
- Go to the
Settingstab in your Heroku app.
- Click the
Add domainbutton in the
- Input your domain name & click
- Heroku will provide you with a
DNS targetto which you can map your domain.
- Now, go to your DNS provider and make sure that your custom DNS Record (
Eg appsmith.yourcompany.com) is updated to map to the
Change the CNAME records of your domain like this:
Points to: "Paste the DNS Value"
TTL: 1 hour
- Once you finish, now you can access Appsmith from your custom domain.
- Once you use a custom domain, You might want to set up SSL for your dyno. Please check the official document of Heroku on how to configure SSL.
- Your dyno will need to be upgraded to at least a
hobbytype to use this feature of Heroku.
Re-Deploy your App using Heroku CLI
To re-deploy your app (re-build & re-run), make sure you have Docker & Heroku CLI setup locally. Docker is required to build the updated image locally before being pushed to the Heroku platform.
Then follow the steps below:
Pull the Appsmith repository from Github & move to the
git clone --branch master https://github.com/appsmithorg/appsmith
Login to Heroku CLI.
Login to Container Registry.
Get your application name.
Push your Docker-based app.
heroku container:push web -a <Your App Name>
Deploy the changes.
heroku container:release web -a <Your App Name>
Please wait for a couple of minutes to let Heroku re-deploy Appsmith with the latest changes. You can check if Appsmith is running by visiting your Heroku URL (or custom domain if you've set one up).