The MaxMind "Lite" databases are free to use, but you cannot redistribute them, and cannot (reliably) download them every time a server starts. To get a server to start without hitting MaxMind directly, I use an encrypted version that automatically updates once a week.
This is just for resolve.rs, but you can do the same thing with your own fork. You need to set the following Github secrets:
MAXMIND_LICENSE_KEY
- from MaxMindMAXMIND_ACCOUNT_ID
- also from MaxMindMMDB_ENCRYPTION_KEY
- generate a 32-byte (64 hex digits) encryption key
You will use the MMDB_ENCRYPTION_KEY
when decrypting the database files on your server. See the code in resolve.rs for an example of how to do this in TypeScript.
The script is licensed under the GNU Affero General Public License v3.0.
This product includes GeoLite2 data created by MaxMind, available from www.maxmind.com
- GeoLite2-ASN.mmdb.enc: encrypted ASN lookup database
- GeoLite2-City.mmdb.enc: encrypted city lookup database
- mmdb.iv: initialization vector used for encryption
- mmdb.md5: md5 hashes of the unencrypted files (to detect updates)