The Serviceberry project aims to provide reliable, accurate location data to your system therefore improving the accuracy of public geolocation databases for everyone. It collects location data from your mobile phone's GNSS/GPS sensor, and combines it with Wi-Fi and Bluetooth adapter data from a companion computer. By default, Serviceberry contributes this data to BeaconDB, whom then anonymizes and obfuscates it to ensure privacy. Serviceberry operates as two interconnected components: the desktop program and the iOS app, which communicate to each other via Wi-Fi or Bluetooth.
Serviceberry responds to location requests at the hostname https://serviceberry-<your-username>.local/request for any browser implementing the Google Maps Geolocation API request format. Before this can happen, Serviceberry registers two mDNS services _serviceberry-https._tcp.local. and _serviceberry-http._tcp.local., at ports 8443 and 8080 respectively. In order to use HTTPS, you'll need to generate a self-signed certificate and private key pair, and import the certificate in your browser's Certificate Manager, authorizing the cert for use in identifying websites. Serviceberry is designed to submit to any database implementing the MLS/Ichnaea API's Geosubmit V2 format, with BeaconDB being the default.
Currently, Serviceberry only offically supports Linux machines, iOS devices; and has only been confirmed to support BeaconDB. See the todo for current progress.
Before running Serviceberry, install the required system dependencies:
Debian/Ubuntu:
sudo apt-get install pkg-config libdbus-1-dev bluez libbluetooth-dev wireless-tools iw wpasupplicant avahi-daemon openssl libssl-dev mkcertFedora/RHEL:
sudo dnf install pkgconf-pkg-config dbus-devel bluez bluez-libs-devel wireless-tools iw wpa_supplicant avahi avahi-tools openssl openssl-devel mkcertArch Linux:
sudo pacman -S pkgconf dbus bluez bluez-utils wireless_tools iw wpa_supplicant avahi openssl mkcertAfter installing packages, enable and start the necessary system services:
sudo systemctl enable --now bluetooth
sudo systemctl enable --now avahi-daemonServiceberry by default hosts on port 8080 for HTTP traffic and 8443 for HTTPS traffic. These are configurable in config.rs as HTTP_SERVER_PORT and HTTPS_SERVER_PORT. Depending on your distro you may need to manually unblock these ports for discovery.
In Arch Linux using FirewallD you can permeantly allow these two ports with
sudo firewall-cmd --zone=home --add-port=8080/tcp --permanent \
sudo firewall-cmd --zone=home --add-port=8443/tcp --permanent
sudo firewall-cmd --reloadEnsure you have setup the exclsuion in the correct zone by listing your active zones, firewall-cmd --get-active-zones.
- Ensure you have installed the mobile IOS app with the correct permissions
- Download the latest release
- Install all the system packages
- Set the
geo.provider.network.urlinabout:configtohttps://serviceberry-<your-username>.local/request - Watch logs for sucessful location
For detailed contributing guidelines, please see CONTRIBUTING.md.
- Ensure you have the latest stable version of Rust installed
- Install all necessary system packages (see System Requirements)
- Fork and clone the repository
- Create a new branch for your changes
- Make your changes following our coding standards
- Run tests and linting:
cargo test && cargo fmt && cargo clippy - Submit a pull request
- Add TLS encryption
- Set up mDNS services
- Support geo.provider browser requests
- Verify support for Chromium-based browsers
- Add Bluetooth connectivity
- Build iOS mobile app
- Build Tauri desktop app
- Ensure support for other geolocation databases
This project is licensed under the terms specified in the LICENSE file.