eduardogsilva / routerfleet

RouterFleet: An open-source solution for centralized router and network equipment management. Initially focused on Mikrotik devices, it offers simplified backups, updates, and security. Perfect for managing a fleet of devices efficiently. Join us in evolving RouterFleet's capabilities
MIT License
73 stars 5 forks source link
backup-manager backup-solution mikrotik router

RouterFleet

Welcome to RouterFleet - the next step in centralized router backup and management. This open source project is designed to revolutionize the way we handle backups and configurations for routers and network equipment, focusing primarily on simplifying and securing network management tasks.

Introduction

RouterFleet is developed with the aim of easing the management of a fleet of devices, particularly focusing on Mikrotik devices during its initial launch phase. This project is a testament to countless hours of dedication towards developing a system that not only simplifies but also secures network management tasks across various devices.

Features

Screenshots

Backup comparison view (diff)

Easily compare backups to identify changes and track configuration history. Backup comparison view

Multiple Backup Profiles

Create multiple backup profiles to manage different schedules and retention policies. Multiple Backup Profiles

Router Details

View detailed information about your routers, including the complete backup history. Router Details

User Management

Manage users and their permissions to ensure secure access to RouterFleet. User Management

Deployment Instructions

These steps will guide you through deploying the RouterFleet project:

Step 1: Prepare the Environment

Create a dedicated directory for the RouterFleet project and navigate into it. This directory will serve as your working environment for the deployment.

mkdir routerfleet && cd routerfleet

Step 2: Fetch the Docker Compose File

Download the appropriate docker-compose.yml file directly into your working directory to ensure you're using the latest deployment configuration. Choose one of the following based on your deployment scenario:

With Postgres (default setup)

This is the recommended setup for production environments. Download the docker-compose.yml that includes the Postgres database container:

wget -O docker-compose.yml https://raw.githubusercontent.com/eduardogsilva/routerfleet/main/docker-compose.yml

Without Postgres (sqlite or remote database)

If you prefer to use SQLite or a remote database, download the docker-compose-no-postgres.yml file:

wget -O docker-compose.yml https://raw.githubusercontent.com/eduardogsilva/routerfleet/main/docker-compose-no-postgres.yml

Step 3: Create the .env File

Generate a .env file in the same directory as your docker-compose.yml with the necessary environment variables:

# Configure SERVER_ADDRESS to match the address of the server. If you don't have a DNS name, you can use the IP address.
# A missconfigured SERVER_ADDRESS will cause the app to have CSRF errors.
SERVER_ADDRESS=my_server_address
DEBUG_MODE=False
# Choose a timezone from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TIMEZONE=America/Sao_Paulo

# Available options are 'sqlite', 'postgres'
DATABASE_ENGINE=postgres
# If you want to use sqlite or postgres outside of docker, you should use docker-compose-no-postgres.yml
# and provide POSTGRES_HOST, POSTGRES_PORT below.
#POSTGRES_HOST=
#POSTGRES_PORT=
POSTGRES_DB=routerfleet
POSTGRES_USER=routerfleet
POSTGRES_PASSWORD=your_database_password

Adjust the variables according to your setup.

Step 4: Run Docker Compose

If you are upgrading from a previous version, you should consider running docker compose pull to ensure you are using the latest images.

Start the RouterFleet services using Docker Compose:

docker compose up -d

Step 5: Update SSL Certificates (Optional)

If you prefer to use your own SSL certificates instead of the auto-generated self-signed certificate:

Step 6: Access the Web Interface

Visit https://yourserver.example.com in your web browser to access the RouterFleet web interface. Remember, if you're using the self-signed certificate, you'll need to accept the certificate exception in your browser.

Following these steps will set up RouterFleet on your server, ensuring you're utilizing the latest configurations for optimal performance and security.

Upgrade Instructions for RouterFleet

To maintain security, performance, and access to new features in RouterFleet, it's important to follow these steps when upgrading:

Step 1: Prepare the Environment

Begin by navigating to your routerfleet directory:

   cd path/to/routerfleet

Step 2: Backup Database

Before starting the upgrade, it's crucial to back up your database. This step ensures you can revert to the previous state if the upgrade encounters problems. For the database, we recommend manually running a pg_dump command to create a backup.

docker exec -e PGPASSWORD=your_password routerfleet-postgres pg_dump -U routerfleet -d routerfleet > /root/routerfleet-$(date +%Y-%m-%d-%H%M%S).sql

Step 3: Shutdown Services

Prevent data loss by stopping all RouterFleet services gracefully:

   docker compose down

Step 4: Update Docker Compose File

Download the latest docker-compose.yml file from the repository to ensure you're using the most recent version:

   wget -O docker-compose.yml https://raw.githubusercontent.com/eduardogsilva/routerfleet/main/docker-compose.yml

Alternatively, if you're using SQLite or a remote database, download the docker-compose-no-postgres.yml file:

   # (alternative) No postgres container 
   wget -O docker-compose.yml https://raw.githubusercontent.com/eduardogsilva/routerfleet/main/docker-compose-no-postgres.yml

Step 5: Update image files

Pull the latest images to ensure you're using the most recent versions:

   docker compose pull

Step 6: Run Docker Compose

Start the RouterFleet services using Docker Compose:

   docker compose up -d

Post-Upgrade Checks

Following these instructions will help ensure a smooth upgrade process for your RouterFleet installation, keeping it secure and efficient.

Contributing

As an open source project, RouterFleet thrives on community support. Whether you're a developer, a network engineer, or just someone interested in network management, there are many ways you can contribute:

Support and Community

Join our community to get support, share ideas, and collaborate:

Your support and involvement are crucial in shaping the future of RouterFleet. Let's make network management easier and more secure together!

License

RouterFleet is released under the MIT License. Feel free to explore, modify, and distribute the software as per the license agreement.


We look forward to your contributions and are excited to see how RouterFleet evolves with your help and feedback. Let's build a robust community around efficient and secure network management. Thank you for your support!