oxen-observer/local_config.py
Ian Macdonald 3c55bb8106
Add country data to display of service nodes.
To enable:

```
$ sudo apt install python3-geoip2  # or: 'pip install geoip2' for the latest
$ sudo apt install geoipupdate
```

If necessary, sign up for an account with MaxMind:

  https://www.maxmind.com/en/geolite2/signup

Edit `/etc/GeoIP.conf` with the details of your MaxMind account:

```
AccountID 123456
LicenseKey xxxxxxxxxxxxxxxx
EditionIDs GeoLite2-City GeoLite2-ASN
```

Edit `/etc/cron.d/geoipupdate`:

```
 # MaxMind database updates take place on Tuesdays and Fridays.
 #
00 12    * * 2,5   root    test -x /usr/bin/geoipupdate && grep -q '^AccountID .*[^0]\+' /etc/GeoIP.conf && /usr/bin/geoipupdate
```

Edit `./local_config.py`:

```
config.geoip_dir = '/var/lib/GeoIP'
```
2022-06-30 09:48:28 +02:00

10 lines
238 B
Python

from observer import config
# Local settings. Changes to this file are meant for a local installation (and should not be
# committed to git).
# Example config override:
#config.blocks_per_page = 10
config.geoip_dir = '/var/lib/GeoIP'