New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

orbital-sync

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orbital-sync

[![Tests](https://img.shields.io/github/actions/workflow/status/mattwebbio/orbital-sync/ci.yml?branch=master&label=tests&style=for-the-badge)](https://github.com/mattwebbio/orbital-sync/actions/workflows/ci.yml?query=branch%3Amaster) [![Coverage](https://

Source
npmnpm
Version
1.5.4
Version published
Weekly downloads
3
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source
Logo

Orbital Sync

Tests Coverage Version

Orbital Sync synchronizes multiple Pi-hole instances for high availability (HA) using the built-in "teleporter". In other words, it performs a "backup" in the Pi-hole admin interface of your primary Pi-hole instance, and then "restores" that backup to any number of "secondary" Pi-holes also via their admin interface. As a result, it supports the synchronization of anything currently supported by Pi-hole's "teleporter". See "Configuration" for the defaults.

Alternatives

I love Gravity Sync and have used it for some time, but I personally find it to be difficult to set up in some contexts (Docker, Unraid, Synology, etc.). Orbital Sync's approach is designed to rely less on the servers running Pi-hole by instead acting on their admin interface just like you would.

Why would I want multiple Pi-holes?

Ever had the server running your Pi-hole go down? Or have you ever needed to perform maintenance on that server? This can obviously be extremely disruptive to anyone using your network. By running multiple Pi-hole instances (replicas) and giving your network clients secondary/tertiary/etc DNS servers, any outage involving one of your Pi-hole instances doesn't bring down your whole network.

Getting Started

Set up your secondary Pi-hole instance(s) just like you did your primary. Once that's done, choose one of the following:

Docker

Docker Pulls Docker Image Size

The following is an example Docker Compose file for running this project. See the configuration section for more environment variables.

version: '3'
services:
  orbital-sync:
    image: mattwebbio/orbital-sync:1
    environment:
      PRIMARY_HOST_BASE_URL: 'https://pihole1.example.com'
      PRIMARY_HOST_PASSWORD: 'your_password1'
      SECONDARY_HOST_1_BASE_URL: 'https://pihole2.example.com'
      SECONDARY_HOST_1_PASSWORD: 'your_password2'
      SECONDARY_HOST_2_BASE_URL: 'http://192.168.1.3'
      SECONDARY_HOST_2_PASSWORD: 'your_password3'
      SECONDARY_HOST_3_BASE_URL: 'http://server:8080'
      SECONDARY_HOST_3_PASSWORD: 'your_password4'
      SECONDARY_HOST_3_PATH: '/apps/pi-hole'
      INTERVAL_MINUTES: 30

The Orbital Sync Docker image is published to both DockerHub and the GitHub Package Repository:
mattwebbio/orbital-sync
ghcr.io/mattwebbio/orbital-sync

Node

NPM Downloads

As with Docker, running with Node requires you export any required environment variables before running Orbital Sync. See the configuration section for more information.

npm install -g orbital-sync
orbital-sync

Requirements

The admin web interfaces of all Pi-holes must be accessible by the container/server running this service. In other words, they have to be on the same network.

It is recommended you run this service with Docker.

Configuration

Sync Configuration

Environment VariableRequiredDefaultExamplesDescription
PRIMARY_HOST_BASE_URLYesN/Ahttp://192.168.1.2 or https://pihole.example.comThe base URL of your Pi-hole, including the scheme (HTTP or HTTPS) and port but not including a following slash.
PRIMARY_HOST_PATHNo/admin/ or /apps/pi-holeThe path to be appended to your base URL. The default Pi-hole path is /admin, which is added automatically.
PRIMARY_HOST_PASSWORDYesN/AmypasswordThe password used to log in to the admin interface.
SECONDARY_HOST_(#)_BASE_URLYesN/Ahttp://192.168.1.3 or https://pihole2.example.comThe base URL of your secondary Pi-hole, including the scheme (HTTP or HTTPS) and port but not including a following slash. Replace (#) with a number, starting at 1, to add multiple secondary Pi-holes.
SECONDARY_HOST_(#)_PATHNo/admin/ or /apps/pi-holeThe path to be appended to your secondary base URL. The default Pi-hole path is /admin, which is added automatically. Replace (#) with a number, starting at 1, to add multiple secondary Pi-holes.
SECONDARY_HOST_(#)_PASSWORDYesN/Amypassword2The password used to log in to the admin interface.
INTERVAL_MINUTESNo30Any non-zero positive integer, for example 5, 30, or 1440How long to wait between synchronizations. Defaults to five minutes. Remember that the DNS server on your secondary servers restarts everytime a sync is performed.
UPDATE_GRAVITYNotruetrue/falseTriggers a gravity update after a backup has been uploaded to a secondary Pi-hole. This updates adlists and restarts gravity.
SYNC_WHITELISTNotruetrue/falseCopies the whitelist
SYNC_REGEX_WHITELISTNotruetrue/falseCopies the regex whitelist
SYNC_BLACKLISTNotruetrue/falseCopies the blacklist
SYNC_REGEXLISTNotruetrue/falseCopies the regex blacklist
SYNC_ADLISTNotruetrue/falseCopies the adlist
SYNC_CLIENTNotruetrue/falseCopies clients
SYNC_GROUPNotruetrue/falseCopies groups
SYNC_AUDITLOGNofalsetrue/falseCopies the audit log
SYNC_STATICDHCPLEASESNofalsetrue/falseCopies static dhcp leases
SYNC_LOCALDNSRECORDSNotruetrue/falseCopies local DNS records
SYNC_LOCALCNAMERECORDSNotruetrue/falseCopies local CNAME records
SYNC_FLUSHTABLESNotruetrue/falseClears existing data on the secondary (copy target) Pi-hole
RUN_ONCENofalsetrue/falseBy default, orbital-sync runs indefinitely until stopped. Setting RUN_ONCE to true forces it to exit immediately after the first sync.

Secondary hosts must be sequential (SECONDARY_HOST_1_BASE_URL, SECONDARY_HOST_2_BASE_URL, SECONDARY_HOST_3_BASE_URL, and so on) and start at number 1. Any gaps (for example, 3 to 5 skipping 4) will result in hosts after the gap being skipped in the sync process.

Notifications

Environment VariableRequiredDefaultExamplesDescription
NOTIFY_ON_SUCCESSNofalsetrue/falseSend a notification if a sync completes successfully.
NOTIFY_ON_FAILURENotruetrue/falseSend notifications if a sync fails for any reason.
NOTIFY_VIA_SMTPNofalsetrue/falseSend notifications via email.
HONEYBADGER_API_KEYNoN/Ahbp_xxxxxxxxxxxxxxxxxxGet notifications to honeybadger.io when the process crashes for any reason by creating a new project and putting your API key here.
VERBOSENofalsetrue/falseIncreases the verbosity of log output. Useful for debugging.
TZNoN/AAmerica/Los_AngelesThe timezone for the timestamps displayed in log output.

SMTP

Environment VariableRequiredDefaultExamplesDescription
SMTP_HOSTYesN/Asmtp.example.comThe SMTP server host.
SMTP_PORTNo58725/587/465The SMTP server port.
SMTP_TLSNofalsetrue/falseShould usually be set to true if using port 465. Otherwise, leave as is.
SMTP_USERNoN/Aorbitalsync@example.comThe SMTP account username.
SMTP_PASSWORDNoN/AyourpasswordhereThe SMTP account password.
SMTP_FROMNoN/Aorbitalsync@example.comThe email address to send notifications from.
SMTP_TOYesN/Ayou@example.comThe email address to send notifications to. Can be a comma-seperated list.

Disclaimer

GitHub

This project is not associated with the official Pi-hole project and is a community maintained piece of software. See the license.

Pi-hole is a registered trademark of Pi-hole LLC.

FAQs

Package last updated on 01 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts