npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nodebb-plugin-eu-only

v1.1.15

Published

Blocks or deletes newly registered users whose IP address resolves outside Europe

Downloads

1,059

Readme

nodebb-plugin-eu-only

Automatically deletes (or bans) newly registered users whose IP address resolves to a country outside Europe. Designed to combat the wave of fake / spam accounts that originate outside the continent.


How it works

  1. A user completes registration.
  2. The plugin intercepts NodeBB's filter:register.complete hook.
  3. It calls the free ip-api.com geo-IP service (no API key required, limit: 45 req/min).
  4. If the resolved country code is not in the European allow-list the account is either deleted or banned (your choice in the ACP), and the client receives an error message.
  5. All blocked attempts are stored in NodeBB's database so you can review them in the Admin Control Panel.

Installation

Option A — npm (recommended once published)

cd /path/to/nodebb
npm install nodebb-plugin-eu-only
./nodebb build
./nodebb restart

Option B — manual / development

cd /path/to/nodebb/node_modules
cp -r /path/to/nodebb-plugin-eu-only ./nodebb-plugin-eu-only
cd /path/to/nodebb
./nodebb build
./nodebb restart

Then activate the plugin in ACP → Extend → Plugins.


Configuration

Open ACP → Plugins → EU-Only Filter.

| Setting | Options | Default | Description | |---------|---------|---------|-------------| | Action | delete / ban | delete | What to do with a blocked account. Delete removes it entirely; Ban keeps it for audit. | | Allow localhost / private IPs | checkbox | ✅ | Lets you register from 127.0.0.1 or RFC-1918 addresses (useful during development). | | Log blocked registrations | checkbox | ✅ | Writes info-level log lines to the NodeBB logger for each blocked attempt. |


Covered countries

The plugin ships with a broad list of geographic-Europe country codes:

AD, AL, AT, BA, BE, BG, BY, CH, CY, CZ, DE, DK, EE, ES, FI, FO, FR, GB, GE, GI, GR, HR, HU, IE, IM, IS, IT, LI, LT, LU, LV, MC, MD, ME, MK, MT, NL, NO, PL, PT, RO, RS, RU, SE, SI, SK, SM, TR, UA, VA, XK

This includes EU members, EEA countries, the UK, Switzerland, and other geographically-European states. Edit EUROPEAN_COUNTRY_CODES in lib/index.js to add or remove entries.


Fail-open policy

If the geo-IP lookup fails (network error, timeout, ip-api outage) the plugin allows the registration through. This means a geo-IP service outage will never lock legitimate users out. You can see timeout warnings in the NodeBB log.


Rate limits

ip-api.com's free tier allows 45 requests per minute. For most forums this is more than sufficient. If your forum receives more signups than that, consider:

  • Purchasing an ip-api.com pro key and switching the URL in lib/index.js to https://pro.ip-api.com/json/...?key=YOUR_KEY
  • Or replacing the lookup function with another provider such as ipinfo.io or MaxMind GeoLite2.

GDPR note

IP addresses are personal data under GDPR. This plugin:

  • Only reads the IP already recorded by NodeBB during registration.
  • Sends it to ip-api.com (a third-party processor) solely for geo-location.
  • Stores uid:ip:countryCode pairs in your own NodeBB database for audit purposes.

Make sure your forum's privacy policy discloses this processing.


License

MIT