Use this powerful n8n workflow to automate checking and updating your self-hosted n8n Docker instance. This n8n template integrates SSH for executing Docker commands and Telegram for secure, manual approval.
Download this n8n workflow template and start using it instantly.
DevOps Engineers managing self-hosted infrastructure.
Technical users running n8n via Docker and docker-compose.
Anyone needing a scheduled, hands-off monitoring system for their critical n8n services.
System administrators seeking secure, approved container update automation using an n8n node.
Keeping a self-hosted application like n8n up-to-date is crucial but often repetitive. This n8n workflow solves this by creating a highly secure, scheduled automation for container management. Instead of manually checking GitHub releases and running SSH commands, this n8n automation handles the entire pipeline.
The unique value of this n8n template lies in its safety mechanism: it requires explicit user approval via a Telegram message before any modification commands (like docker compose up) are executed. This provides peace of mind, ensuring that updates only happen when you are ready, making this n8n workflow an essential tool for robust DevOps practices. By utilizing various powerful n8n node types, the entire update process is reliable and fully auditable.
The n8n workflow is designed to run automatically on a schedule (defined by the n8n trigger) or manually.
Schedule Trigger (set to run every three days) or the manual When clicking ‘Test workflow’ n8n trigger. Initial variables, including the working-directory and n8n-container-name, are defined in the Set Default variable n8n node.check n8n installed version SSH n8n node determines the current container version via docker inspect, and the Github HTTP Request n8n node fetches the latest released version tag from the official n8n repository.Edit Version String n8n node cleans this prefix for accurate comparison.Merge Results n8n node combines the installed and latest versions. The Comapre Two Input n8n node then checks if the versions are equal.Telegram Notif n8n node.Telegram Approve n8n node, which sends a notification asking for permission to proceed. This specific n8n node pauses the execution until an answer is received.Pull n8n Image, docker compose pull, and finally, docker compose up to recreate the container with the latest image.Telegram Notif1 n8n node sends a final confirmation that the n8n update has been successfully completed.To deploy this automated n8n workflow, follow these steps:
tqNyOVbQTikb35Tk) that allows password authentication and execution of sudo docker commands on the host machine where n8n is running.Zx3ibmlSzRKZQsFa) connected to a bot for sending notifications and receiving approvals.Set Default variable n8n node and provide values for:working-directory: The full path to the directory containing your docker-compose.yml file.n8n-container-name: The exact name of your running n8n Docker container.telegram-id: Your personal Telegram Chat ID (obtainable from bots like @getidbot).Schedule Trigger to start working. Schedule Trigger / Manual Trigger: These n8n triggers initiate the version check, allowing the n8n workflow to run periodically or on demand.
Set Default variable (Set n8n node): Crucial configuration node defining environment variables (working-directory, n8n-container-name, telegram-id) used throughout the n8n workflow for dynamic command execution.
check n8n installed version (SSH n8n node): Executes sudo docker inspect... | jq -r '.[0].Config.Labels["org.opencontainers.image.version"]' to securely retrieve the currently installed n8n version label from the Docker host.
Github HTTP Request (HTTP Request n8n node): Connects to the GitHub API to fetch the tag_name of the latest n8n release.
Edit Version String (Set n8n node): Data manipulation step that strips 'n8n@' from the release tag, ensuring a clean version number for comparison with the installed version.
Comapre Two Input (IF n8n node): The core decision point of the n8n workflow. It compares the two version strings (installed vs. latest) to determine if an update is required.
Telegram Approve (Telegram n8n node): Uses the sendAndWait operation, creating a manual gate. The n8n workflow pauses here, waiting for the user to approve the update before executing risky SSH commands.
Pull n8n Image / docker compose pull (SSH n8n node): Executes the remote docker pull and docker compose pull commands to fetch the necessary updated images.
sudo docker compose up -d to safely stop the old container and start a new one using the recently pulled image, completing the n8n update process.Automate digital product delivery using this n8n workflow. Triggered by Stripe payments, it handles logging in Google Sheets, securing file links from Google Drive, and sending the product via email.

Automate your e-commerce backend using n8n. This n8n workflow processes Stripe payments, sends product-specific emails, logs sales to Notion, and notifies Telegram upon successful checkout.

Use this powerful n8n workflow to automate 24/7 dental appointment booking using an AI Agent, Google Calendar availability checks, Google Sheets logging, and instant Gmail confirmations.

Use this robust n8n workflow to automate Docker-based n8n updates securely. Features scheduled checks, digest comparison, and required email approval before executing critical SSH commands.

Automate sophisticated multi-level document approval processes using this n8n workflow template, leveraging Supabase as the backend database and Gmail for secure, tokenized approval links. Track every step with audit logs.

Use this powerful n8n workflow to automatically ingest, chunk, embed, and index Google Drive documents into Pinecone for a custom RAG (Retrieval Augmented Generation) knowledge base, powered by OpenAI. Discover how to create efficient n8n templates.

I'm Jaber Zare, a freelance DevOps engineer specializing in cloud infrastructure, automation, and scalable systems. With expertise in Kubernetes, CI/CD, and cloud platforms, I help businesses optimize their workflows and improve system reliability. If you're looking for top-notch DevOps/Cloud solutions, let's connect!







































