# Resolving MaxMindDB warnings in error logs

**URL:** https://meta.discourse.org/t/maxminddb/401193
**Category:** General
**Created:** [April 22, 2026, 2:13am UTC](https://meta.discourse.org/t/maxminddb/401193 "2026-04-22T02:13:38Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![sniper756](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sniper756/32/545002_2.png) [@sniper756](https://meta.discourse.org/u/sniper756)
#### Post date: [April 22, 2026, 2:13am UTC](https://meta.discourse.org/t/maxminddb/401193/1 "2026-04-22T02:13:40Z")

</div>

Server Environment: VPS, Discourse deployed via Docker in 1Panel

This solution applies when maxmind ID and key are not set in app.yml, and GeoLite2-City.mmdb and GeoLite2-ASN.mmdb are automatically downloaded on a regular schedule via a GitHub mirror.

This resolves the following two MaxMindDB warnings found in the error logs:

MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb) could not be found: No such file or directory @ rb\_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb

MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb\_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb

**Procedure:**

**1. Create the maxmind directory on the host machine and set permissions**

```plaintext
mkdir -p /opt/1panel/apps/discourse/shared/standalone/maxmind && chmod 755 /opt/1panel/apps/discourse/shared/standalone/maxmind && chown 1000:1000 /opt/1panel/apps/discourse/shared/standalone/maxmind

```

**2. Configure mounting of GeoLite2-City.mmdb and GeoLite2-ASN.mmdb files to the host as follows:**

Edit app.yml and add:

```plaintext
  - volume:
      host: /opt/1panel/apps/discourse/shared/standalone/maxmind/GeoLite2-City.mmdb
      guest: /var/www/discourse/vendor/data/GeoLite2-City.mmdb
  - volume:
      host: /opt/1panel/apps/discourse/shared/standalone/maxmind/GeoLite2-ASN.mmdb
      guest: /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb

```

**3. Set up a scheduled task in 1Panel to regularly download and update the GeoLite2-City.mmdb and GeoLite2-ASN.mmdb map files from GitHub on a weekly basis**

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/b/7/0b7af3539eb0a1666bd13102682eb83575255b4e.png)

The scheduled task script is as follows:

```plaintext
cd /opt/1panel/apps/discourse/shared/standalone/maxmind && rm -f GeoLite2-City.mmdb GeoLite2-ASN.mmdb && wget -O GeoLite2-City.mmdb https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-City.mmdb && wget -O GeoLite2-ASN.mmdb https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-ASN.mmdb && chmod 644 GeoLite2-City.mmdb GeoLite2-ASN.mmdb && chown 1000:1000 GeoLite2-City.mmdb GeoLite2-ASN.mmdb

```

---

_[View the full topic](https://meta.discourse.org/t/maxminddb/401193)._
