Remote Linux Server Update via Secure API
detail.loadingPreview
Automate your Linux server updates with a simple, secure API call. This n8n workflow triggers `apt update` and `apt upgrade` commands via SSH, providing real-time feedback directly to your initiating system.
About This Workflow
Streamline your server maintenance with this powerful n8n workflow designed for remote Linux system updates. Trigger comprehensive apt update and apt upgrade commands on your Debian-based servers through a secure webhook endpoint. This automation eliminates manual SSH logins for routine updates, boosting efficiency and consistency. The workflow responds with the command's stdout, giving you instant feedback on the update process. Perfect for integrating server management into other tools, mobile shortcuts, or CI/CD pipelines, ensuring your systems are always up-to-date and secure with minimal effort.
Key Features
- API-Triggered Updates: Initiate server updates with a simple POST request to a secure webhook endpoint.
- Secure Authentication: Protect your webhook with basic HTTP authentication for controlled access.
- SSH Command Execution: Remotely execute
sudo apt update && sudo apt upgrade -yon your Linux servers. - Real-time Feedback: Receive the standard output of the SSH command directly in the webhook response.
- Easy Integration: Designed for seamless integration into other automation tools, scripts, or mobile shortcuts.
How To Use
- Configure the Webhook Node:
- Ensure the
pathis set to/update(or your desired endpoint). - Set
authenticationtobasicAuthand add yourhttpBasicAuthcredentials. Make sure to note down the username and password.
- Ensure the
- Set up the Execute a Command (SSH) Node:
- Provide your server's
sshPasswordcredentials. This will require the host, username, and password/key for your target server. - The
commandis pre-set tosudo apt update && sudo apt upgrade -yfor Debian-based systems. Adjust this command if you are using a different Linux distribution or require alternative update actions.
- Provide your server's
- Deploy and Test:
- Activate the workflow.
- Copy the custom webhook URL from the Webhook node.
- Test the workflow using the provided
curlexample (from the sticky note in the workflow), replacing<your-domain>andusername:passwordwith your actual n8n instance URL and webhook credentials.
Apps Used
Workflow JSON
{
"id": "9afe3671-e700-48b3-a190-c240b8bf95f2",
"name": "Remote Linux Server Update via Secure API",
"nodes": 26,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 9afe3671-e700...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Robust Concurrency Control for n8n Workflows with Redis
Prevent simultaneous execution of critical n8n workflows or tasks using a centralized, Redis-backed locking mechanism. This reusable utility workflow ensures data integrity and resource management by allowing other workflows to acquire, check, and release locks.