# VyOS Administrator Guide

> Guides for VyOS administrators: automation, operational commands, troubleshooting, and best practices for production operations

Source: https://opennix.org/en/docs/vyos/admin-guide/


This section provides guides for administrators managing VyOS in production environments.

## Section contents

### [VyOS Automation](vyos-automation)
Managing a fleet of VyOS devices through the REST API, Ansible, and Python.

**Covers:**
- REST API for programmatic management
- Python client for the VyOS API
- Ansible playbooks and roles
- Bulk device configuration
- CI/CD integration
- Automated backups
- Monitoring and alerting

**Practical scenarios:**
- Bulk interface configuration
- Managing a fleet of routers with Ansible
- Automating backups with rotation
- CI/CD pipeline for testing
- Monitoring through the API

---

### [Operational Mode](vyos-operation-mode)
Commands for monitoring, diagnostics, and system management.

**Covers:**
- Show commands for monitoring
- Diagnostic commands
- System operations
- Viewing logs
- Network diagnostics
- Network debugging
- Real-time monitoring

---

### [Troubleshooting](vyos-troubleshooting)
Resolving common problems and running diagnostics.

**Covers:**
- Network connectivity problems
- VPN tunnel problems
- Routing problems
- System performance
- Diagnostic tools
- Troubleshooting methodology

---

### [Configuration Blueprints](vyos-blueprints)
Ready-made solutions for various scenarios.

**Covers:**
- NAT gateway for an office
- Border router with BGP
- VPN concentrator
- Firewall with security zones
- DHCP server with reservations

---

## Best practices

### Configuration management
1. **Version your configurations** in Git
2. **Automate backups** daily
3. **Use commit-confirm** for remote changes
4. **Document changes** through comments
5. **Test on staging** before production

### Security
1. **Disable password authentication** for SSH
2. **Use SSH keys only** for access
3. **Configure a firewall** on all interfaces
4. **Restrict API access** by IP
5. **Update the system** regularly

### Monitoring
1. **Set up syslog** to a remote server
2. **Monitor key metrics** (CPU, RAM, bandwidth)
3. **Track VPN tunnels** for availability
4. **Alerting** on critical events
5. **Collect metrics** for trend analysis

### Performance
1. **Enable hardware offloading** where available
2. **Set the correct MTU** for tunnels
3. **Use bonding** for link aggregation
4. **Optimize firewall rules** (specific rules at the top)
5. **Monitor** CPU and network load

---

## Automation for cloud environments

### Yandex Cloud
- Using cloud-init for initial configuration
- Integration with the Yandex Cloud API
- Automated deployment through Terraform
- Managed VPN in Yandex Cloud

### VK Cloud
- Using cloud-init for initialization
- Integration with the VK Cloud API
- Templates for fast deployment
- Scaling VPN infrastructure

---

## Administrator tools

### Command line
```bash
# Quick status check
show interfaces
show ip route
show system uptime

# Real-time monitoring
monitor interfaces ethernet eth0 traffic
monitor log

# Diagnostics
ping 8.8.8.8
traceroute 8.8.8.8
show log tail
```

### API and scripts
- REST API for automation
- Python scripts for bulk operations
- Ansible for orchestration
- GraphQL for complex queries

---

## Additional resources

- [VyOS Forum - Operations](https://forum.vyos.io/c/operations)
- [VyOS GitHub - Issues](https://github.com/vyos/vyos-1x/issues)
- [VyOS Documentation](https://docs.vyos.io/)

