1
1
Fork
You've already forked beacondb
0
forked from beacondb/beacondb
an in-development wireless geolocation database with public domain data dumps - alternative to Mozilla Location Services
  • Rust 98.4%
  • Nix 1.6%
2025年07月03日 08:24:44 -04:00
.sqlx build: update sqlx metadata 2025年03月05日 00:17:36 +10:00
docs feat: stop enforcing report uniqueness in database 2025年03月24日 17:25:40 +10:00
LICENSES chore: license using reuse spec 2024年07月09日 19:35:34 +10:00
migrations feat: stop enforcing report uniqueness in database 2025年03月24日 17:25:40 +10:00
src Fix typo 2025年07月03日 08:24:44 -04:00
.env.example Add function docs ( #99 ) 2025年03月31日 04:04:45 +00:00
.gitattributes Add .gitattributes for normalising line endings 2024年07月14日 11:19:24 +03:00
.gitignore feat(geoip): use postgres instead of in memory database 2024年12月09日 17:26:35 +10:00
.pre-commit-config.yaml add .pre-commit-config.yaml for running reuse 2024年07月14日 11:18:23 +03:00
Cargo.lock Remove unused dependencies 2025年03月27日 16:00:22 +01:00
Cargo.toml Enable unused lint and fix warnings 2025年04月01日 22:59:58 +02:00
config.example.toml Add function docs ( #99 ) 2025年03月31日 04:04:45 +00:00
flake.lock feat: switch to postgres 2024年11月28日 23:11:50 +10:00
flake.nix build: update nix deps 2024年09月06日 11:26:44 +10:00
README.md Add function docs ( #99 ) 2025年03月31日 04:04:45 +00:00
REUSE.toml reuse: fix deprecation warning through reuse convert-dep5 2024年07月14日 11:13:31 +03:00

beaconDB

A privacy focused aGPS service written in Rust.

beaconDB aims to be an alternative to Mozilla Location Services that offers public domain dumps of its WiFi database.

When Mozilla Location Services shut down, it wasn't able to publish the massive amount of access points its users had collected due to legal and privacy concerns. beaconDB obfuscates the data it releases so that it is not possible to reasonably estimate the location of a single device.

Data can be contributed by using apps such as NeoStumbler or TowerCollector 1 .

NOTE: beaconDB is still in development! Data exports are not ready yet. Some data is not yet obfuscated.

Setup

Configuration files

In order to run beaconDB you need to create configuration files. config.toml is read by beaconDB to configure parameters like the database address or the services port. .env is setting environment variables in order configure postgres and cargo build tool.

beaconDB provides examples for both of these files which can be copied as a starting points. The example files contain unsafe passwords and are not production ready.

cp .env.example .env
cp config.example.toml config.toml

Dependencies

To build and run beaconDB the following software needs to be installed on your device.

  • Rust build tool cargo
  • sqlx-cli
  • The postgres database, access to a postgres database or podman/docker

Database setup

beaconDB uses an external PostgreSQL database. The user has to somehow deploy it on their own.

The easiest way to set up a database is using Podman or Docker.

podman run -p 5432:5432 --name beacondb_postgres --env-file=.env -d postgres

Build

beaconDB is written in Rust. It can be build using the Rust build tool cargo. Cargo creates a debug or a release build. These can be build by running

# Debug build
cargo build
# Release build
cargo build --release

Run

In order to execute the sqlx scripts, you need to install sqlx-cli. This can be achieved by running

cargo install sqlx-cli

To run the server you first have to setup the database. This can be done by running the following commands

source .env
# Create database and schema
cargo sqlx database create
cargo sqlx migrate run
# Run server in release mode
cargo run --release serve

The server can now be reached at localhost:8080.

If you are using NeoStumbler, you can go to Settings > Reports > Endpoint > Endpoint and enter http://<your-ip>:8080 and hit save. Under Settings > Other > Reupload data you can reupload your collected and committed data for testing purposes. Make sure you are definitively your test server to not reupload data to a production database.


  1. TowerCollector does only collect cell data. ↩︎