How to Install Oxidized on Debian Latest

Oxidized is a network device configuration backup tool that retrieves configurations of network devices and stores them on a server. In this tutorial, we will guide you through the process of installing Oxidized on Debian latest.

Requirements

Step 1: Update the System

Before we start the installation process, we need to update the system to ensure all packages are up to date.

sudo apt update
sudo apt upgrade

Step 2: Install Dependencies

Oxidized requires a few dependencies to operate correctly. You can install them by running the following command:

sudo apt install ruby ruby-dev libsqlite3-dev libssl-dev pkg-config libssh2-1-dev zlib1g-dev cmake libicu-dev libreadline-dev

Step 3: Install Oxidized

We can install Oxidized by executing the following command:

sudo gem install oxidized oxidized-script oxidized-web

Step 4: Configure Oxidized

Oxidized configuration is stored in the /root/.config/oxidized directory. Create the directory and the configuration file:

mkdir -p ~/.config/oxidized
touch ~/.config/oxidized/config

Open the configuration file using your preferred text editor.

nano ~/.config/oxidized/config

Add the following lines to the configuration file:

---
username: admin
password: password
model: cisco
interval: 300
rest: 0.0.0.0:8888
source:
  default: ssh
  debug: true
  ssh:
    secure: false
    cipher: aes256-cbc
    remove_known_hosts: false
output:
  default: file
  file:
    directory: ~/.config/oxidized/output/
    default: !ruby/regexp /hostname/i
    rotate: 3

Replace the username and password with the desired login credentials. The above configuration is for a Cisco device, so change the model variable relevant to your devices.

Step 5: Add Devices

Add network devices to Oxidized by editing the router.db file:

nano ~/.config/oxidized/router.db

Add the router hostname and IP address separated by a colon.

router01: 192.168.0.1:cisco
router02: 192.168.0.2:cisco

Step 6: Start Oxidized

You can start Oxidized manually by running the oxidized command.

sudo oxidized

By default, Oxidized logs to the console. To run in daemon mode and send logs to Syslog use the following command:

sudo oxidized -d

Conclusion

Oxidized is now installed and configured to backup configurations for network devices. You can access the web interface by pointing your browser to the IP address and port you specified in the configuration file.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!