Node HandbookNODE HANDBOOK
Geo data

Clash Verge Rev: Country.mmdb not found

GeoIP rules do not ship with the core. They live in a binary database downloaded separately, and when that download is blocked the core fails on the rule that needs it. The path in the error tells you which artifact is missing.

Last updated: 2026-11-24 · Every error string on this page was reproduced on a real client.

What the file is for

Rules like GEOIP,CN,DIRECT need to answer a question the core cannot answer alone: which country does this IP belong to. That mapping is not something you can compute — it is a dataset, updated periodically, distributed as a binary file. The core reads it at load time if any rule needs it.

Two database formats exist and they are not interchangeable:

FileFormatPairs with
Country.mmdbMaxMind DBGEOIP rules using the mmdb path
geoip.datv2ray datGEOIP rules using the dat path, and the legacy mode
geosite.datv2ray datGEOSITE rules — domain lists, not IP

An error naming Country.mmdb is about IP geography. An error naming geosite.dat is about domain lists and has a different fix. Mixing the two wastes time, because installing one does not satisfy the other.

Why it goes missing

  • The download never completed. The core fetches the database on first use in many builds. On a network where the download host is unreachable, the fetch fails silently and the file is simply absent.
  • The path moved. The core looks for the database relative to its working directory. Started from a different directory — a service, a shortcut with a different working folder, a terminal — the relative path resolves elsewhere.
  • A cleanup removed it. Disk tools and some uninstallers treat a multi-megabyte binary in a config folder as cache.
  • A fresh install has not fetched it yet. First run behind a restrictive network is the most common report, and it presents immediately rather than after some change.

Confirm the path before creating the file

The error names a path. Read it literally: absolute or relative, and relative to what.

ls -l <dir-from-the-error>/Country.mmdb

If the directory does not exist, the path is the problem rather than the file. Creating a database in the wrong place produces the same error on the next start, which is the loop people get stuck in.

Two ways to pin it down:

  • Run the core with an explicit directory. The core accepts a working directory argument; supply the one you expect, and the relative lookup becomes predictable.
  • Check the configuration for an explicit path. Some configurations set the database location directly. If one is set, that is the path that must exist, regardless of where the default would have been.

Which fix is right for you

Fetch the database

The normal case. The core or the interface has an action to download geo data; if the download is blocked, fetching it from another network and placing it at the exact reported path works identically, because the core only reads the file.

Switch to the other format

If your build supports both and the configuration already references one, aligning the rule to the database you have is a legitimate shortcut. Do it by changing the rule's mode or path, not by renaming a dat file to .mmdb — the formats are structurally different and a renamed file fails to parse rather than being accepted.

Remove the dependency

If no GeoIP rule is actually needed, removing those rules removes the requirement entirely. This is the smallest possible fix and worth considering before downloading anything: a profile with regional rules inherited from a template may not need them. Check whether any rule references GEOIP before assuming they are load-bearing.

The mistake that costs the most time

Creating an empty file at the path makes the error change from "not found" to a parse or read error, which reads like a different problem. An empty database is not an empty set of matches; it is an invalid file, and the core rejects it. The error text after doing this no longer mentions the missing file, so the original cause becomes invisible.

The same applies to copying a file of the other format under this name. The dat format has its own version of this failure, where the cause is usually a mode mismatch rather than an absent file — that case is separated here. The name does not select the parser — the content does — and a mismatched pair fails at load with a message that has nothing to do with the file being absent.

Keep it updated

The database is a snapshot. IP allocations change, so a year-old file produces rules that route recently reallocated ranges to the wrong country — a failure that shows up as a rule not matching rather than as an error. If your configuration depends on regional routing, treat the database as something with a refresh cadence, not as a one-time install.

Frequently asked

Is Country.mmdb the same as geoip.dat?

No. They carry similar data in different binary formats and are read by different code paths. Installing one does not satisfy a rule that asks for the other, and renaming one to the other name produces a parse failure rather than a working database.

Can I create an empty file to get past the error?

No. It changes the error from a missing file to an invalid file, and the new message no longer mentions what is actually missing, which makes the cause harder to find than it was.

Why does it fail on first run only?

Because the database is fetched on demand in many builds. A first run on a blocked network leaves it absent; once present it is not re-fetched for every start, so the error does not recur until something removes it.

Do I need it if I do not use regional rules?

No. Removing the GEOIP rules removes the dependency. Check the rules block before downloading anything — inherited templates often carry regional rules that the profile does not actually rely on.

Does the file need to match the core version?

The format is stable, so a database from an older release usually loads. What changes is the data inside it, and stale data produces rules that match the wrong country rather than an error, which is harder to notice.