# Exposing local Minecraft server

## 1. Installing Minecraft Launcher

Go to Official mine-craft store and download the game launcher. Once you download the game launcher, you can proceed with logging in.

![](/files/-MBJrSZJX1JXbx0DEeiC)

## 2. Starting a map

Once you have your Minecraft downloaded, you may start a map. Next click on "**Open to LAN**" to invite your friends to the map.

![](/files/-MBJvGrGPS-1YyoH1b2X)

In the next menu, you can set some options for your friends. You should click on "**Start LAN World**" to start inviting players.

![](/files/-MBJvm9G-xKZ54P_AZDW)

You should see Minecraft open a port for incoming multiplayer connection. In this case the port is **46629**.

![](/files/-MBJw6W0Au9TZdKh36jV)

## 3. Exposing with LocalXpose

Next, You can go ahead and expose the port **46629** with LocalXpose.

```bash
$loclx tunnel tcp --to 127.0.0.1:46629 --port 46629 --region ap
✓ Creating TCP tunnel...
Tunneling TCP: ap-2.loclx.io:46629 --> 127.0.0.1:46629
```

{% hint style="info" %}
Choosing a region closer to you will give you lower latency, also you can choose any endpoint port if port 46629 is taken.
{% endhint %}

Your friends can use the endpoint provided by LocalXpose \[**ap-2.loclx.io:46629**] to connect to your Local game server.

![](/files/-MBJzGtms0fbfeK9UOfy)

{% hint style="warning" %}
You need to have your Minecraft and LocalXpose running in background, else your friends won't be able to connect.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://localxpose.gitbook.io/docs/tutorials/exposing-localhost-minecraft-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
