Skip to content

Dashboard Shows All Visits as Coming from the United States (GeoIP not working) #272

@Swamp2k9

Description

@Swamp2k9

After integrating MaxMind GeoIP into my Docker‑based Plausible Community Edition deployment, the dashboard reports 100 % of visits as originating from the United States. Prior to switching to the Community Edition (when I was on a paid plan), traffic from multiple countries was displayed correctly.

Output from the 3 containers appear normal:

Plausible:

07:21:47.302 [notice] Elixir.Plausible.Cache.Warmer running &Plausible.Site.TrackerScriptCache.refresh_updated_recently/1 on tracker_script_cache...
07:21:47.309 [notice] Elixir.Plausible.Cache.Warmer running &Plausible.Shield.HostnameRuleCache.refresh_updated_recently/1 on hostname_allowlist_by_domain...
07:21:47.402 [notice] Elixir.Plausible.Cache.Warmer running &Plausible.Site.Cache.refresh_updated_recently/1 on sites_by_domain...
07:21:49.699 [notice] Flushing 363 byte(s) RowBinary from Elixir.Plausible.Session.WriteBuffer
07:21:49.999 [notice] Flushing 317 byte(s) RowBinary from Elixir.Plausible.Event.WriteBuffer
07:21:52.158 [notice] Elixir.Plausible.Cache.Warmer running &Plausible.Shield.IPRuleCache.refresh_updated_recently/1 on ip_blocklist_by_domain...
07:21:52.158 [notice] Elixir.Plausible.Cache.Warmer running &Plausible.Shield.CountryRuleCache.refresh_updated_recently/1 on country_blocklist_by_domain...

Plausible-db:

2026-02-02 07:04:34.548 UTC [27] LOG: checkpoint starting: time
2026-02-02 07:04:36.663 UTC [27] LOG: checkpoint complete: wrote 22 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=2.107 s, sync=0.003 s, total=2.116 s; sync files=9, longest=0.002 s, average=0.001 s; distance=107 kB, estimate=281 kB; lsn=0/A1C316D8, redo lsn=0/A1C31678
2026-02-02 07:09:34.763 UTC [27] LOG: checkpoint starting: time
2026-02-02 07:09:35.172 UTC [27] LOG: checkpoint complete: wrote 5 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.403 s, sync=0.002 s, total=0.409 s; sync files=3, longest=0.001 s, average=0.001 s; distance=33 kB, estimate=256 kB; lsn=0/A1C39B70, redo lsn=0/A1C39B10
2026-02-02 07:14:34.272 UTC [27] LOG: checkpoint starting: time
2026-02-02 07:14:34.280 UTC [27] LOG: checkpoint complete: wrote 1 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.001 s, total=0.009 s; sync files=1, longest=0.001 s, average=0.001 s; distance=4 kB, estimate=231 kB; lsn=0/A1C3AC00, redo lsn=0/A1C3ABC8
2026-02-02 07:19:34.380 UTC [27] LOG: checkpoint starting: time
2026-02-02 07:19:36.494 UTC [27] LOG: checkpoint complete: wrote 22 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=2.106 s, sync=0.004 s, total=2.115 s; sync files=12, longest=0.002 s, average=0.001 s; distance=88 kB, estimate=217 kB; lsn=0/A1C50F10, redo lsn=0/A1C50EB0

Plausible Events DB:

/entrypoint.sh: explicitly skip changing user 'default'
ClickHouse Database directory appears to contain a database; Skipping initialization
Processing configuration file '/etc/clickhouse-server/config.xml'.
Merging configuration file '/etc/clickhouse-server/config.d/docker_related_config.xml'.
Logging trace to /var/log/clickhouse-server/clickhouse-server.log
Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log

Docker (Portainer)

services:
plausible_db:
image: postgres:16-alpine
restart: always
volumes:
- /mnt/Plausible/db-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
start_period: 1m

plausible_events_db:
image: clickhouse/clickhouse-server:24.12-alpine
restart: always
volumes:
- /mnt/Plausible/event-data:/var/lib/clickhouse
- /mnt/Plausible/event-logs:/var/log/clickhouse-server
- ./clickhouse/logs.xml:/etc/clickhouse-server/config.d/logs.xml:ro
# This makes ClickHouse bind to IPv4 only, since Docker doesn't enable IPv6 in bridge networks by default.
# Fixes "Listen [::]:9000 failed: Address family for hostname not supported" warnings.
- ./clickhouse/ipv4-only.xml:/etc/clickhouse-server/config.d/ipv4-only.xml:ro
# This makes ClickHouse consume less resources, which is useful for small setups.
# https://clickhouse.com/docs/en/operations/tips#using-less-than-16gb-of-ram
- ./clickhouse/low-resources.xml:/etc/clickhouse-server/config.d/low-resources.xml:ro

ulimits:
  nofile:
    soft: 262144
    hard: 262144
environment:
  - CLICKHOUSE_SKIP_USER_SETUP=1
healthcheck:
  test: ["CMD-SHELL", "wget --no-verbose --tries=1 -O - http://127.0.0.1:8123/ping || exit 1"]
  start_period: 1m

plausible:
image: ghcr.io/plausible/community-edition:v3.2.0
restart: always
command: sh -c "/entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
depends_on:
plausible_db:
condition: service_healthy
plausible_events_db:
condition: service_healthy
volumes:
- /mnt/Plausible/plausible-data:/var/lib/plausible
ulimits:
nofile:
soft: 65535
hard: 65535
ports:
- '8001:8000'
environment:
- TMPDIR=/var/lib/plausible/tmp
# required: https://github.com/plausible/community-edition/wiki/configuration#required
- BASE_URL=https://plausible.domain.com
- SECRET_KEY_BASE=RANDOMVALUE
# optional: https://github.com/plausible/community-edition/wiki/configuration#optional
# registration: https://github.com/plausible/community-edition/wiki/configuration#registration
#- TOTP_VAULT_KEY=RANDOMVALUE
#- DISABLE_REGISTRATION
- ENABLE_EMAIL_VERIFICATION=true
# web: https://github.com/plausible/community-edition/wiki/configuration#web
#- HTTP_PORT=8000
#- HTTPS_PORT=443
# databases: https://github.com/plausible/community-edition/wiki/configuration#database
#- DATABASE_URL
#- CLICKHOUSE_DATABASE_URL
# Google: https://github.com/plausible/community-edition/wiki/configuration#google
- GOOGLE_CLIENT_ID=RANDOMVALUE
- GOOGLE_CLIENT_SECRET=RANDOMVALUE
# geolocation: https://github.com/plausible/community-edition/wiki/configuration#ip-geolocation
#- IP_GEOLOCATION_DB
#- GEONAMES_SOURCE_FILE
- MAXMIND_LICENSE_KEY=RANDOMVALUE
- MAXMIND_EDITION=GeoLite2-City

volumes:
db-data:
event-data:
event-logs:
plausible-data:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions