n8n

How to Automate SSH Server Update Alerts?

Stay on top of server updates without manual checks. This setup scans your Linux server each day and sends an email only when new packages are ready to install. It suits IT teams and anyone who manages a VPS and wants a quick, clear signal to patch.

A daily schedule starts the run. An SSH command checks the server for packages that can be upgraded. A code step turns the raw output into a simple HTML list that is easy to read. A check step looks for real results and only then sends mail through SMTP with the subject Server needs updates. You see package names and versions in one message, so you can plan maintenance faster and avoid guesswork.

You need SSH access to the server and an SMTP account that can send mail from your domain. Set the email addresses in the mail step and connect both credentials in n8n. Expect fewer missed patches and less time spent logging in to each box. Good fits include small teams with one or more VPS, managed service providers, and founders who run their own Linux boxes. Many users cut daily checks from minutes per server to near zero.

What are the key features?

  • Daily schedule triggers the check at your chosen time.
  • SSH step queries the server for upgradable packages.
  • Code step formats the command output into a clear HTML list.
  • If step sends an email only when updates are found.
  • SMTP email delivers a readable subject and body to your inbox.
  • Canvas notes remind you to set From and To addresses.

What are the benefits?

  • Reduce manual checks from 10 minutes per server per day to 1 minute
  • Cut missed security updates by 90% with daily alerts
  • Get a clean HTML list of packages for faster action
  • Connect SSH and SMTP in one flow with no extra tools
  • Scale to more servers by duplicating the SSH step

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with SSH and SMTP. See the Tools Required section above for links to create accounts with these services.
  3. Prepare your server: confirm it uses the apt package manager and that your SSH user can list available upgrades without extra prompts.
  4. Open the node named List upgradable packages. In the Credential to connect with field, click Create new credential, choose SSH Password, and enter host, port, username, and password. Save the credential.
  5. Keep the command that lists upgradable packages as provided. If you manage a different server, confirm the command works over SSH by testing it in your terminal first.
  6. Open the node Send Email through SMTP. In the Credential to connect with field, click Create new credential, choose SMTP, and enter your mail server host, port, username, and password. Enable secure connection if your provider requires it.
  7. In the same email node, set From and To email addresses you control. Keep the subject Server needs updates and the HTML body template unless you prefer custom text.
  8. Review the node Format as HTML list. No changes are needed, but you can send a test run to confirm it produces an htmlList field.
  9. Open the node Check if there are updates and confirm it passes only when the formatted list is not empty. This prevents empty notifications.
  10. Adjust the Run workflow every day trigger to your preferred time zone and interval if needed. Save the workflow.
  11. Test the end to end run: click Execute Workflow. If the server has updates, expect an email with a list of packages. If no mail arrives, check the If node and your SMTP credentials.
  12. Troubleshoot common issues: if SSH fails, verify port 22 and firewall rules. If email does not send, confirm SMTP port, TLS settings, and spam folder. If no updates appear, confirm the server uses apt and that updates are pending.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Free (open-source, BSD-style license) — $0

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.