Schedule Automatic Updates
This page provides steps to schedule automatic updates using cron expression for your self-hosted instance.
Docker
Follow the below steps to schedule automatic updates for Appsmith Docker installation:
Go to the root directory of the Appsmith installation and run:
docker-compose downOpen the
docker-compose.ymlfile and uncomment the below code block. Note that you must add a 6 space-separated fields cron expression, not the traditional 5 space-separated fields to thecommandattribute. See the CRON Expression Format section to learn more. Based on the specified cron expression, watchtower updates Appsmith at the stipulated time whenever a new version becomes available.labels:
com.centurylinklabs.watchtower.enable: "true"
auto_update:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# Update check interval in seconds.
command: --schedule "0 0 * ? * *" --label-enable --cleanup
restart: unless-stopped
depends_on:
- appsmith
environment:
- WATCHTOWER_LIFECYCLE_HOOKS=trueThe above 6 space-separated fields cron expression
0 0 * ? * *means that the task runs every day of every month, regardless of the day of the week or year, at midnight (0:00). You can change the schedule, adjust the cron expression accordingly. If you wish to update Appsmith immediately, you can opt for a manual update and follow the steps in the Update Appsmith guide.Below are some examples of 6 space-separated fields cron expressions:
Check for updates every Sunday at 12:00 noon:
command: --schedule "0 0 12 ? * SUN" --label-enable --cleanupCheck for updates every hour:
command: --schedule "0 0 * ? * *" --label-enable --cleanupCheck for updates once at 12:00 noon every day:
command: --schedule "0 0 12 * * ?" --label-enable --cleanupCheck for updates once at midnight every day:
command: --schedule "0 0 0 * * ?" --label-enable --cleanup
Restart the watchtower container with:
sudo docker-compose pull && sudo docker-compose up --force-recreate auto_updateVerify the logs that the scheduled update is in effect with:
docker-compose logs -f auto_update
Kubernetes
Follow the below steps to schedule automatic updates for Appsmith Kubernetes installation:
Go to the root directory of the Appsmith installation and open
values.yamlfile.Update the
values.yamland setenabledtotrueforautoupdateattribute, and set the desired cron expression in theschedulerattribute. Note that you must add a 5 space-separated fields cron expression, not the 6 space-separated fields. See the CRON Expression Format section to learn more. Based on the specified cron expression, watchtower updates Appsmith at stipulated time whenever a new version is available.autoupdate:
## @param autoupdate.enabled - Enable config autoupdate
##
enabled: true
## @param autoupdate.scheduler - Schedule cron job to check & update Helm image
##
scheduler: "0/10 * * * *"The above 5 space-separated fields cron expression
0/10 * * * *means that the task runs every day of the week and every month, regardless of the year, at the 0th minute of every hour. You can change the schedule, adjust the cron expression accordingly. If you wish to update Appsmith immediately, you can opt for a manual update and follow the steps in the Update Appsmith guide.Below are some examples of 5 space-separated fields cron expressions:
Check for updates every Sunday at 12:00 noon:
scheduler: 0 12 * * SUNCheck for updates every hour:
scheduler: 0 * * * *Check for updates once at 12:00 noon every day:
scheduler: 0 12 * * *Check for updates once at midnight every day:
scheduler: 0 0 * * *
Save the changes and update the Appsmith installation.
If you are on the Community Edition, update with:
helm upgrade -i appsmith appsmith/appsmith -f values.yamlIf you are on the Commercial Edition, update with:
helm upgrade -i appsmith appsmith-ee/appsmith -f values.yaml
Switch off automatic updates
Follow the below steps for your Appsmith installation to switch off automatic updates:
Docker
Go to the root directory of the Appsmith installation and run:
docker-compose downOpen the
docker-compose.ymlfile and comment out the below code block:#auto_update:
# image: containrrr/watchtower
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# # Update check interval in seconds.
# command: --schedule "0 0 * ? * *" --label-enable --cleanup
# restart: unless-stopped
# depends_on:
# - appsmith
# environment:
# - WATCHTOWER_LIFECYCLE_HOOKS=trueSave the changes and restart the Appsmith instance with:
docker-compose up -d --force-recreateVerify that the automatic update is turned off with:
docker-compose ps
Kubernetes
Follow the steps below to turn off auto updates:
If you are on the Community Edition on Kubernetes, update the configuration as shown below:
a. Go to the Appsmith installation directory, and edit
values.yaml, and setenabledtofalseforautoupdateattribute:autoupdate:
## @param autoupdate.enabled - Enable config autoupdate
##
enabled: false
## @param autoupdate.scheduler - Schedule cron job to check & update Helm image
##
scheduler: "0 * * * *"b. Save the changes and update the configuration with:
helm upgrade --values values.yaml appsmith appsmith/appsmithIf you are on the Commercial Edition on Kubernetes, update the configuration as shown below:
a. Go to the Appsmith installation directory, and edit
values.yaml, and setenabledtofalseforautoupdateattribute:autoupdate:
## @param autoupdate.enabled - Enable config autoupdate
##
enabled: falseb. Save the changes and update the configuration with:
helm upgrade --values values.yaml appsmith appsmith-ee/appsmith
Troubleshooting
If you face issues, contact the support team using the chat widget at the bottom right of this page.