traefik-geoip-filter

traefik-geoip-filter

Docker app from Emphyrio's Repository

Overview

A Docker container that works as a GeoIP allow/blocklist middleware for Traefik. Uses the Maxmind GeoLite2 database.

Requirements

Traefik on the same Docker network
Middleware (forwardAuth) configuration in Traefik
Account on MaxMind.com (free)

Runtime arguments

Network
bridge
Shell
sh
Privileged
false

Template configuration

MaxMind account idVariable

Your (numeric) MaxMind account id

Target
MAXMIND_ID
Default
1234567
MaxMind license keyVariable

The MaxMind license key you generated

Target
MAXMIND_KEY
Default
long_string_of_gibberish
Filter typeVariable

Set the filter as an allow or blocklist (possible values: allow, blocklist)

Target
FILTER_TYPE
Default
allow
Value
allow
Country codesVariable

List of countries you want to allow/block IPs from, separated by spaces. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements

Target
COUNTRY_CODES
Default
NL DE BE LU
Value
NL DE BE LU
Sub codesVariable

List of locations smaller than a country that you want to allow/block IPs from. Separated by spaces. See https://en.wikipedia.org/wiki/ISO_3166-2#Current_codes

Target
SUB_CODES
Extra IPsVariable

Append additional IPs to the filter list, separated by spaces. E.g. LAN, Vaultwarden network. E.g. 10.0.0.0/32 172.16.0.0/16 192.168.0.0/24. Optional.

Target
EXTRA_IPS
Appdata folderPathrw

Location to store Geolite2 databases

Target
/geoip
Default
/mnt/user/appdata/traefik-geoip-filter
Value
/mnt/user/appdata/traefik-geoip-filter

Details

Repository
mpdcampbell/traefik-geoip-filter
Last Updated2026-05-31
First Seen2026-05-16

Run traefik-geoip-filter on Unraid.

traefik-geoip-filter is listed in Community Apps for Unraid OS. Explore Unraid to build a flexible home server, NAS, or homelab.