Skip to main content

Reliable-Auto-Update

via BitNinja RAU

As of the release of BitNinja 3.10.23, we introduced the BitNinja Reliable Autoupdate package, which checks for a BitNinja Agent update every 6 hours.

Config Location: /var/lib/bitninja-reliable-auto-update/main.json

Default main.json Config:

{
"apiUrl": "api.bitninja.io:443",
"etcDir": "/etc/bitninja",
"varDir": "/var/lib/bitninja-reliable-auto-update",
"versionType": [
"stable" //
],
"periodicUpdate": 6,
"licenseFile": "license-v2.json"
}

BitNinja Update channels

Currently, you can select between four BitNinja update channel options. You can make this change from your BitNinja Dashboards Servers section after you select the table view. The four possible options are: Frequent - "Frequent update" versions contain regular updates and new features; however, these versions typically have not yet reached "stable" status, as they require further testing and feedback to ensure they are fully reliable for everyday use.

Stable - A version is considered "stable" when it has completed the development phase and generally exhibits minimal bugs, error reports, or crashes in user environments after one month of usage. This indicates that nearly all functionalities of the software operate reliably, and the developers have achieved their objectives for this version. "Stable" versions are typically recommended for everyday use, as users do not need to worry about frequent errors or compatibility issues.

BleedingEdge - "Bleeding-edge" or beta versions are software releases that are still in the early or experimental stages of development. These versions often include new features and technologies that are still being tested and refined. As a result, they are generally not suitable for everyday use due to a higher risk of bugs or instability. However, users interested in new features have the opportunity to try these versions and can provide feedback to the developers.

No Update - If you chhoose the noUpdate option ,BitNinjaRAU will ignore the automatic updater for 30 days. After that it is automatically sets the Frequent update channel and search for updates every 6 hours.

Modifying the periodicUpdate value allows you to change how often (in hours) you would like to check for updates.

Disabling Automatic Updates

If you wish to disable the Auto Updates, you may set periodicUpdate value to 0.

Once this change is done and you saved the file, you will need to restart BitNinja's Reliable Auto-Update service.

This can be achieved by running the following command: service bitninja-reliable-auto-update restart

The service will still be in the background, but you will no longer look or update for new BitNinja Agents automatically.

Enabling auto-updates for BitNinja is also possible with package managers, which depending on your Linux distribution you can setup with the steps below.

via Unattended Updates

RHEL/CentOS/CloudLinux

Using Yum-Curl - RHEL7 / CentOS 7

  1. Install Dependencies

sudo yum install yum-cron

  1. Edit the file.

sudo nano /etc/yum/yum-cron.conf

# Update packages automatically
update_cmd = default

# Apply security updates only
apply_updates = yes

# Send email notifications
emit_via = email
email_from = root@yourdomain.com
email_to = your-email@example.com
  1. Start and Enable Yum cron on boot.

sudo systemctl start yum-cron

sudo systemctl enable yum-cron


Using DNF - RHEL8+ / CentOS 8+

  1. Install dependencies

sudo yum install dnf-automatic

  1. Edit the file.

nano /etc/dnf/automatic.conf

download_updates = yes
apply_updates = no

sudo systemctl enable --now dnf-automatic.timer

Debian/Ubuntu

  1. Install Dependencies

sudo apt-get update

sudo apt-get install unattended-upgrades

  1. Edit the file.

sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

Add BitNinja like this:

Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
// Extended Security Maintenance; doesn't necessarily exist for
// every release and this system may not have it installed, but if
// available, the policy for updates is such that unattended-upgrades
// should also install from here by default.
"${distro_id}ESMApps:${distro_codename}-apps-security";
"${distro_id}ESM:${distro_codename}-infra-security";
// "${distro_id}:${distro_codename}-updates";
// "${distro_id}:${distro_codename}-proposed";
// "${distro_id}:${distro_codename}-backports";
// Bitninja Repository
"bitninja:${distro_codename}";
};
info

You can remove the rest and keep BitNinja, if you want to only autoupdate BitNinja itself and leave the OS's Security Updates, although this is isn't recommended.

  1. Save the changes and Restart the SystemD process.

sudo systemctl restart unattended-upgrades

Enjoy automatic updates for BitNinja!