Server Networking Overview - Current State

Gabriel Penman • December 30, 2025

With multiple projects running simultaneously on my development server, the networking landscape has grown more complex. This post documents the current state of all running services, their port allocations, and how they interconnect. This is primarily for my own reference as I consider improving the reverse proxy architecture.

Architecture Overview

The server currently runs a mix of different application types:

Network Architecture Diagram

graph TB subgraph Internet["External Traffic"] User[User Browser] SSH_Client[SSH Client] MC_Client[Minecraft Client] FTP_Client[FTP Client] end subgraph Nginx["Nginx Reverse Proxy :80/:443"] NginxCore[Nginx Core] end subgraph WebApps["Web Applications"] Flask[Flask Blog :5000] NextJS[Next.js geo-butler :3000] end subgraph Firebase["Firebase Emulators"] FB_UI[Firebase UI :4000] FB_Functions[Functions :5001] FB_Hosting[Hosting :5002] FB_Firestore[Firestore :8081] FB_Auth[Auth :9099] end subgraph Arbitrage["Arbitrage Microservices - Docker Swarm"] ARB_Web[Webapp :3005] ARB_Pool[Pool :7500] ARB_Registry[Registry :7503] ARB_Config[Config :7504] ARB_Telegram[Telegram :7505] ARB_Network[Network :8888-8889] end subgraph Databases["Database Services"] MongoDB[MongoDB :27017] MySQL[MySQL :3306] phpMyAdmin[phpMyAdmin :8080] end subgraph Other["Other Services"] Minecraft[Minecraft Server :25565] BlueMap[BlueMap :8100] Depopper[Depopper Research :5123] SSH[SSH :2222] FTP[FTP :21] end User -->|HTTPS :443| NginxCore User -->|HTTP :80| NginxCore NginxCore -->|/api/*| Flask NginxCore -->|static files| Flask NginxCore -->|/dev/3000| NextJS NginxCore -->|/dev/3005| ARB_Web NginxCore -->|/dev/4000, /dev/5001, etc| Firebase NginxCore -->|/dev/8100| BlueMap NginxCore -->|/dev/5123| Depopper NextJS --> FB_Functions NextJS --> FB_Firestore NextJS --> FB_Auth ARB_Web --> ARB_Pool ARB_Web --> ARB_Registry ARB_Registry --> ARB_Config ARB_Telegram --> ARB_Registry ARB_Pool --> MongoDB ARB_Registry --> MongoDB BlueMap --> Minecraft phpMyAdmin --> MySQL SSH_Client -->|Port 2222| SSH MC_Client -->|Port 25565| Minecraft FTP_Client -->|Port 21| FTP style NginxCore fill:#3b82f6,color:#fff style Flask fill:#22c55e,color:#fff style NextJS fill:#06b6d4,color:#fff style MongoDB fill:#10b981,color:#fff style Minecraft fill:#f59e0b,color:#fff

Service Inventory

Web Serving Layer

Service Port Purpose Status
Nginx 80, 443 Reverse proxy for gabrielpenman.com with SSL termination Running (systemd)
Flask Blog 5000 Production blog backend (blog-server.service) Running (systemd)
Next.js geo-butler 3000 Development/experimental SEO tool (geo-butler-dev.service) Running (systemd)

Firebase Development Emulators

Running as part of the geo-butler development environment:

Emulator Port Purpose
Firebase UI 4000 Web interface for emulator suite
Cloud Functions 5001 Serverless function emulation
Hosting 5002 Firebase hosting emulation
Firestore 8081 NoSQL database emulation
Authentication 9099 Auth service emulation

Arbitrage Trading Microservices

Docker Swarm-based microservice architecture for cryptocurrency arbitrage:

Service Port Container Purpose
Webapp 3005 arbitrage_webapp Web interface
Pool 7500 arbitrage_pool Liquidity pool monitoring
Registry 7503 arbitrage_registry Service registry and discovery
Config 7504 arbitrage_config Configuration management
Telegram 7505 arbitrage_telegram Telegram bot integration
Network 8888-8889 arbitrage_network Network monitoring

Database Services

Service Port Purpose Access
MongoDB 27017 Primary database for arbitrage services Docker container (mongo:7.0)
MySQL 3306 WordPress database Docker container (internal)
phpMyAdmin 8080 MySQL admin interface http://localhost:8080

Other Services

Service Port Purpose
Minecraft Server 25565 Multiplayer gaming server (Java edition)
BlueMap (Dynmap) 8100 Live Minecraft world map renderer
Depopper Research 5123 Experimental image processing pipeline playground
SSH 2222 Secure shell access (custom port)
FTP 21 File transfer protocol
DNS 53 Local DNS resolution (systemd-resolved)

Nginx Reverse Proxy Routes

Many services are exposed through Nginx using /dev/* paths, allowing web access to internal services without direct port exposure:

Public Path Proxies To Service
/dev/3000 localhost:3000 Next.js geo-butler development site
/dev/3005 localhost:3005 Arbitrage webapp dashboard
/dev/4000 localhost:4000 Firebase Emulator UI
/dev/5001 localhost:5001 Firebase Cloud Functions
/dev/5123 localhost:5123 Depopper research playground
/dev/8081 localhost:8081 Firebase Firestore emulator
/dev/8100 [::1]:8100 BlueMap (Minecraft live map)
/dev/9099 localhost:9099 Firebase Authentication emulator
/dev/api/ localhost:3005/api/ Arbitrage API endpoints

This pattern allows accessing services like https://gabrielpenman.com/dev/3005 instead of opening additional firewall ports.

Traffic Flow Patterns

Public Web Traffic (gabrielpenman.com)

  1. HTTPS requests hit Nginx on port 443
  2. Nginx routes /api/* paths to Flask backend (port 5000)
  3. Static content served from /home/gabriel/blog-new/output/
  4. /dev/* paths proxy to internal services:
    • /dev/3000 → Next.js geo-butler
    • /dev/3005 → Arbitrage webapp
    • /dev/4000, 5001, 8081, 9099 → Firebase emulators
    • /dev/8100 → BlueMap (Minecraft map)
    • /dev/5123 → Depopper research playground

Arbitrage System Communication

  1. All services run in Docker Swarm for orchestration
  2. Internal service discovery via the registry service (port 7503)
  3. Configuration pulled from config service (port 7504)
  4. Pool and registry services share MongoDB on port 27017
  5. Telegram bot provides external notifications
  6. Web dashboard accessible via /dev/3005 proxy path

Development Workflow

  1. Next.js dev server runs on port 3000, accessible via /dev/3000
  2. Firebase emulators provide backend services locally (all proxied via /dev/*)
  3. No need to deploy to Firebase for testing
  4. Auth, Firestore, Functions all emulated locally and web-accessible

Gaming & Visualization

  1. Minecraft server listens on port 25565 for game clients
  2. BlueMap plugin generates live world map on port 8100
  3. Map accessible via web at /dev/8100

Current Issues & Observations

Note: These are observations about the current state, not recommendations for changes yet.

Port Allocation Summary

Web Serving:        80, 443, 3000, 5000
Firebase Emulators: 4000, 5001, 5002, 8081, 9099
Arbitrage Services: 3005, 7500, 7503-7505, 8888-8889
Databases:          3306, 8080, 27017
Gaming:             25565, 8100 (Minecraft + BlueMap)
Research:           5123 (Depopper playground)
Infrastructure:     21, 53, 2222
Docker Swarm:       2377, 7946

Proxied via Nginx:  3000, 3005, 4000, 5001, 5123, 8081, 8100, 9099
Direct Access Only: 7500, 7503-7505, 8888-8889 (microservices)

Next Steps

This documentation serves as a baseline for future improvements. Potential areas to explore:

For now, this gives me a clear picture of what's running where, which is exactly what I needed.