· · · ·

Raspberry Pi Minecraft Captive Portal

AI says, “Hello Babu, as a fellow traveler through the world of smidgens and community infrastructure, this project sounds like a fantastic way to merge your interests in community networking…

AI says, “Hello Babu, as a fellow traveler through the world of smidgens and community infrastructure, this project sounds like a fantastic way to merge your interests in community networking and technical design. Combining a Minecraft server with LocalWP and a Meshtastic node on a Raspberry Pi is an ambitious “jugaad” style build!

To pull this off, we need to orchestrate several layers: the game server, the web server (LocalWP) for the portal, the networking (Access Point/Captive Portal), and the Meshtastic integration.

Phase 1: The Foundation (Raspberry Pi & Minecraft)

First, ensure you are running a 64-bit OS (Raspberry Pi OS 64-bit) for better memory handling, as Minecraft is a resource hog.

  1. Install Java: Minecraft requires modern Java (typically Java 17 or 21).
    Bash
    sudo apt update && sudo apt upgrade -y
    sudo apt install openjdk-17-jdk-headless -y
  2. Setup Minecraft: Create a folder and download the server JAR (e.g., PaperMC is recommended for performance on Pi).
    Bash
    mkdir ~/minecraft && cd ~/minecraft
    # Replace with the latest version link from papermc.io
    wget [URL_TO_PAPER_JAR] -O server.jar
    java -Xmx1024M -Xms1024M -jar server.jar nogui
  3. Accept EULA: Edit eula.txt and change false to true.
  4. Public URL: To give the Minecraft server a public address (since your home IP is likely dynamic), use a tool like Playit.gg or ngrok. Playit.gg is excellent for Minecraft as it handles the TCP/UDP tunnels specifically for the game.

Phase 2: The Portal (LocalWP)

LocalWP is traditionally a local development tool for WordPress, but on a Linux machine (via the .deb installer), it can serve sites locally.

  1. Install LocalWP: Download the .deb for Linux from the LocalWP website and install it.
  2. Create Your Portal: Build a simple WordPress site. This will be the “Splash Page” users see.
  3. Local Exposure: Use the “Live Link” feature in LocalWP (powered by ngrok) to get a public URL for your site, or better yet, point your captive portal software to the local IP of the LocalWP site (usually localhost:100xx).

Phase 3: The Captive Portal & Mesh Connection

This is where the Raspberry Pi becomes an Access Point (AP) that redirects users to your LocalWP site.

  1. Install RaspAP: This is the easiest way to turn your Pi into a wireless AP with captive portal capabilities.
    Bash
    curl -sL https://install.raspap.com | bash
  2. Configure Portal: In the RaspAP web interface, enable the Captive Portal. Set the redirect URL to the address of your LocalWP site.
  3. Meshtastic Integration: Connect your Meshtastic node via USB. You can run meshtasticd (the Linux native daemon) on the same Pi to bridge the mesh to your local network.

Phase 4: Connecting the Dots

Summary Table

ComponentSoftwareRole
ServerPaperMC / JavaThe Minecraft engine.
WebsiteLocalWPThe landing page/portal design.
NetworkRaspAPManaging the WiFi AP and redirecting users.
TunnelPlayit.ggProviding the public address for the game.
CommunicationMeshtasticBroadcasting the address to the mesh community.

Would you like me to help you write a small Python script that links your Minecraft server logs to your Meshtastic node so it announces player joins to the mesh?