DEV Community

Lightning Developer
Lightning Developer

Posted on

Sharing a Minecraft Server Running on Localhost with Friends Using Pinggy

Hosting a Minecraft server on your local machine is a great way to play with friends. However, by default, a local server is only accessible within your home network. This guide will show you how to expose your localhost Minecraft server to the internet using Pinggy, allowing friends to connect from anywhere.

Why Use Pinggy?

Pinggy provides a secure and simple way to expose your local server to the internet using a TCP tunnel. Unlike port forwarding, which requires router configuration, Pinggy works without additional network setup.

Steps to Share Your Minecraft Server

A. Install and Launch Minecraft:

  1. Download and install the Minecraft Launcher from minecraft.net.
  2. Create a Minecraft account if you don’t have one.
    Launch

  3. Purchase Minecraft (Java Edition or Bedrock Edition).

  4. Log in to the launcher and start Minecraft.

Launching Minecraft

B. Start a Local Minecraft Server:

  1. Open Minecraft and create a new world or load an existing one.
  2. Click Open to LAN in the game menu.
    Open to LAN

  3. Configure the server settings (game mode, cheats, etc.).

  4. Click Start LAN World.
    Start

  5. Note the port number displayed on the screen (e.g., 25565).

Port No

C. Expose Your Server Using Pinggy:

  1. Open a command prompt or terminal.
    cmd

  2. Run the following command (replace 25565 with your actual server port):

    ssh -p 443 -R0:localhost:25565 tcp@a.pinggy.io
    

    run

  3. If prompted, enter your Pinggy authentication token.

  4. After running the command, Pinggy will provide a public TCP address, such as:

   tcp://xyz.pinggy.link:42289
Enter fullscreen mode Exit fullscreen mode

D. Connect to the Server:

  1. Share the public TCP address with your friends.
  2. They can connect to your server by entering the Pinggy-provided address in Minecraft’s multiplayer menu.
  3. Ensure that your Minecraft server and Pinggy tunnel remain active while playing.

Additional Tips

Pinggy Dashboard

  • Enable Keep-Alive: To prevent disconnection, use:
  ssh -p 443 -o ServerAliveInterval=30 -R0:localhost:25565 tcp@a.pinggy.io
Enter fullscreen mode Exit fullscreen mode
  • Use Pinggy Dashboard: Manage your tunnels efficiently with Pinggy’s web interface.
  • Upgrade for Longer Sessions: Free tunnels last 60 minutes; upgrade for extended playtime.

Conclusion

By using Pinggy, you can easily share your local Minecraft server with friends without complex network configurations. Enjoy seamless multiplayer gaming while maintaining full control over your server.

Top comments (0)