A Node.js website that displays real Mullvad VPN servers (all 500+ active servers) and finds the closest server to your location using geolocation and optional ping testing.
Live Site: https://mullvadservers.com/
Repository: https://github.com/habualoush/mullvad
Version: 1.0.0
- Real-time Mullvad API integration - Fetches live server data from Mullvad's official API
- Find the closest server to your current location using browser geolocation
- Distance calculation using the Haversine formula
- Ping servers to measure actual latency (requires server to be accessible)
- Automatic geocoding of city locations using OpenStreetMap Nominatim API
- Modern, responsive UI with gradient styling and comprehensive instructions
- Server details - Shows provider, speed, ownership status, and more
- Back to top button for easy navigation
- Clickable homepage title to reset and return to start
- Visual server browsing on an interactive world map
- Color-coded markers - Yellow for Mullvad-owned, blue for rented servers
- Click markers to see detailed server information
- Filter servers by ownership type
- Geolocation support to center map on your location
- Latency testing for individual servers directly from the map
- Responsive design that works on desktop and mobile
- Smooth animations and professional UI
- See
QUICKSTART_MAP.mdfor setup instructions
- GitHub Sponsors integration for project support
- SEO optimized with comprehensive meta tags for better search visibility
- Mobile-friendly with responsive design and PWA capabilities
- Privacy-compliant cookie consent with GDPR/CCPA compliance
- Google Analytics integration with anonymized tracking and user consent
- Server Data: Mullvad API - Live WireGuard relay servers
- Geocoding: OpenStreetMap Nominatim - City coordinates lookup
- Node.js (v14 or higher)
- npm (comes with Node.js)
- Internet connection (to fetch real-time server data)
- Install dependencies:
npm install-
Set up Supabase:
- Create a free account at supabase.com
- Create a new project
- Go to SQL Editor and run the schema from
supabase-schema.sql - Copy your project URL and anon key from Project Settings > API
-
Configure environment variables:
cp env.example .env
# Edit .env and add your Supabase credentials- Populate the database:
npm run setup-dbThis will fetch all active Mullvad servers and populate your Supabase database with:
- City coordinates (90+ cities)
- Server locations grouped by city
- Individual server details (500+ servers)
-
GitHub Integration (Already Configured):
- Repository: https://github.com/habualoush/mullvad
- Sponsor Link: https://github.com/sponsors/habualoush
- All links are pre-configured in the project
-
Configure SEO Settings (Optional):
- The site is already configured for https://mullvadservers.com/
- If you want to use a different domain, update all URLs in
public/index.html - Create custom Open Graph images:
og:image- 1200x630px image saved aspublic/og-image.jpgtwitter:image- 1200x600px image saved aspublic/twitter-card.jpg
Start the server:
npm startThe application will be available at http://localhost:3000
-
Open your browser and navigate to
http://localhost:3000 -
Click "Find Closest Server":
- Requests your location (you must allow browser permission)
- Fetches all active Mullvad servers
- Geocodes city locations
- Calculates distances and displays the closest server
- Optionally click "Ping Server" to test latency
-
Click "Browse All Servers":
- Displays all Mullvad servers grouped by city
- Shows provider, speed, and server count per location
- Expand cities to see individual servers and test latency
-
Click "Map View" (NEW):
- Opens interactive map showing all server locations
- Click markers to see server details
- Filter by ownership type (owned vs rented)
- Test latency of individual servers
- Use "My Location" to center map on your position
- Requires Google Maps API key - See
QUICKSTART_MAP.md
Note:
- The browser will ask for permission to access your location. You must allow this for the closest server feature to work.
- The Geolocation API requires HTTPS in production (or localhost for development).
- All server data and coordinates are stored in Supabase for instant lookups.
- Map view requires a free Google Maps API key (see setup instructions)
GET /api/servers- Returns all active Mullvad WireGuard servers grouped by cityGET /api/servers-map- Returns all servers with latitude/longitude coordinates (optimized for map view)GET /api/servers/:city_code/:country_code- Returns individual servers for a specific cityGET /api/closest?lat={latitude}&lon={longitude}- Returns the closest server to the given coordinatesGET /api/ping/:hostname- Tests TCP latency to a specific server
- Database: All Mullvad server data is stored in Supabase (PostgreSQL)
- Coordinates: Pre-populated city coordinates eliminate the need for external geocoding APIs
- Distance Calculation: Haversine formula calculates great-circle distance between user and servers
- Ping Testing: Uses system ping command to measure actual network latency to servers (may not work as Mullvad blocks ICMP)
- Backend: Node.js, Express.js
- Database: Supabase (PostgreSQL)
- APIs: Mullvad API (for initial data population)
- Frontend: Vanilla JavaScript, HTML5 Geolocation API, CSS3
- Distance: Haversine formula
- Network Testing: System ping utility
As of the latest Mullvad data: ~526 active WireGuard servers across ~90 cities worldwide
The application includes comprehensive SEO optimization:
- Meta Tags: Title, description, keywords, author, robots, and language
- Open Graph Tags: For beautiful Facebook/LinkedIn sharing previews
- Twitter Card Tags: Optimized cards for Twitter sharing
- Structured Data: JSON-LD schema markup for search engines
- Mobile Meta Tags: PWA-ready with theme colors and app capabilities
- Canonical URLs: Prevents duplicate content issues
- Semantic HTML: Proper heading hierarchy and semantic elements
The project is pre-configured for https://mullvadservers.com/ with:
- All meta tags updated with the correct domain
- Canonical URLs properly set
- Open Graph and Twitter Card tags configured
- JSON-LD structured data for search engines
To customize:
- Create social sharing images in the
public/folder:- Open Graph: 1200x630px (saved as
og-image.jpg) - Twitter Card: 1200x600px (saved as
twitter-card.jpg)
- Open Graph: 1200x630px (saved as
- Modify meta descriptions if needed for your use case
The site includes Google Analytics (GA4) tracking with privacy-first features:
- Measurement ID:
G-43EGPNC37Y - IP Anonymization: All IP addresses are anonymized
- Consent-Based Loading: Analytics only loads after user consent
- Cookie Compliance: Full GDPR/CCPA compliance
A beautiful, privacy-respecting cookie consent banner that:
- Appears on first visit with a 1-second delay
- Stores user preference in
localStorage - Includes "Accept All" and "Decline" options
- Features a detailed cookie policy modal
- Allows users to change preferences anytime via footer link
- Blocks analytics tracking until consent is given
Features:
- Clean, professional design matching the site theme
- Fully responsive for mobile devices
- Detailed cookie policy explaining data usage
- Easy-to-access cookie settings in the footer
- No tracking without explicit user consent
The implementation follows privacy best practices:
- Opt-in by default: No tracking until user accepts
- Transparent: Clear explanation of what data is collected
- User control: Easy to decline or revoke consent
- Minimal data: Only anonymous usage statistics
- No PII: No personally identifiable information collected
Contributions are welcome! Feel free to:
- Report bugs and issues
- Suggest new features
- Submit pull requests
- Improve documentation
- Star the repository if you find it useful
If you find this tool useful, please consider:
- Star the repository on GitHub
- Sponsor on GitHub to support ongoing development
- Share https://mullvadservers.com/ with others who might benefit from it
- Contribute code or documentation improvements
Your support helps maintain and improve this tool for the privacy community!
MIT