VyOS icon

VyOS

Interact with VyOS router via HTTP API

Overview

This node enables interaction with VyOS routers via their HTTP API, specifically focusing on managing configuration files when using the "Config File" resource and the "Save Configuration" operation. It allows users to save the current router configuration to a file, either at a default location or a custom path.

Common scenarios include:

  • Backing up the current router configuration before making changes.
  • Saving configuration snapshots for version control or auditing.
  • Automating configuration management workflows in network operations.

For example, a user can automate saving the current configuration to a specific backup file path after applying updates to the router, ensuring that a recoverable state is always available.

Properties

Name Meaning
File Path Path where the configuration file will be saved. If left empty, saves to the default /config/config.boot location. Use an absolute path starting with /config/ for custom locations.
Additional Fields A collection of optional settings:
- Create Backup (boolean): Whether to create a backup before loading a new config (only relevant for load operation).
- Backup Path (string): Path for the backup file if creating a backup (only for load operation).
- Force Load (boolean): Force loading configuration without validation (load operation).
- Commit After Load (boolean): Automatically commit configuration after loading (load operation).
- Format Output (boolean): Whether to format the output for better readability (applies generally).

Note: For the "Save Configuration" operation, only the "File Path" and "Format Output" properties are relevant from this list.

Output

The node outputs JSON data representing the result of the save configuration operation. This typically includes confirmation details such as success status, file path saved to, and any messages returned by the VyOS API.

If the "Format Output" option is enabled, the JSON output will be formatted for better readability.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential to authenticate with the VyOS router's HTTP API.
  • The node expects the base URL and SSL validation preferences to be configured via credentials.
  • The router must have its HTTP API enabled and accessible from the n8n instance.

Troubleshooting

  • Common Issues:

    • Incorrect file path: Ensure the file path starts with /config/ and the directory exists on the router.
    • Authentication failures: Verify that the API key credential is valid and has sufficient permissions.
    • Network connectivity: Confirm that the n8n instance can reach the VyOS router's API endpoint.
    • Permission denied errors when saving files may indicate insufficient privileges on the router.
  • Error Messages:

    • "Failed to save configuration": Check API response details; could be due to invalid path or router restrictions.
    • SSL certificate errors: If using self-signed certificates, enable skipping SSL validation in credentials.
    • Timeout or connection refused: Verify network connectivity and API availability.

Links and References

Discussion