> ## Documentation Index
> Fetch the complete documentation index at: https://docs.socketchat.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Host on your local network

> Run the server on a computer at home or in the office, for people on the same network.

> [!NOTE]
>
> New to this? Read [How Socketchat works](/how-it-works) first.

The quickest way to try Socketchat is on your own network: a computer at home or in the office runs the server, and people on the same Wi-Fi or wired network join it. It costs nothing and needs no router changes.

> [!WARNING]
>
> This only reaches people on the same network. A friend at their own home cannot connect. For that, use [port forwarding](/hosting/port-forwarding), a [cloud server](/hosting/cloud-server) or a [private network](/hosting/vpn/overview).

## Set it up

**1. Find the server's local IP address**

Your router gives each device on the network a local IP address, usually starting with `192.168.`, `10.` or `172.16.` to `172.31.`. Find the one for the machine that will run the server:

**macOS**

```bash theme={"dark"}
ipconfig getifaddr en0
```

`en0` is usually Wi-Fi on a Mac laptop. If it prints nothing, try `en1`, or look in System Settings, Network, then your connection's Details.

**Linux**

```bash theme={"dark"}
ip -4 addr
```

Look for the `inet` line under your Wi-Fi or Ethernet interface, such as `wlan0` or `eth0`, and skip `127.0.0.1`.

**Windows**

```powershell theme={"dark"}
ipconfig
```

Look for **IPv4 Address** under your Wi-Fi or Ethernet adapter.

**2. Set up the server with that address**

```bash theme={"dark"}
socketchat server init --host 192.168.1.20
socketchat server run
```

Replace `192.168.1.20` with the address you found.

**3. Allow the connection through the firewall**

The first time `socketchat server run` starts, your computer may ask whether to let it accept incoming connections.

* **macOS:** choose **Allow** when asked whether `socketchat` may accept incoming network connections. If you chose Deny, change it in System Settings, Network, Firewall, Options.
* **Windows:** Windows Defender Firewall asks whether to allow `socketchat.exe`. Tick **Private networks** and choose **Allow access**.
* **Linux:** most desktop systems have no firewall on by default. If yours uses `ufw`, run `sudo ufw allow 7444/tcp`.

**4. Invite people**

```bash theme={"dark"}
socketchat server invite
```

Join with that link from your own computer, then use `/invite` in a room for each friend. See the [Quick start](/quickstart).

## Keep the address from changing

Your router hands out local addresses with DHCP, the protocol that gives devices an address when they connect, and it can give the server a different one next week. Invite links and members' apps keep the old address, so they would stop reaching the server.

A DHCP reservation tells the router to always give the server the same address. Routers differ, but the steps look like this:

1. Open your router's admin page, often at `192.168.1.1` or `192.168.0.1`, or in the router maker's phone app.
2. Find the list of connected devices or the DHCP settings. It may be called **DHCP reservation**, **Address reservation** or **Static lease**.
3. Pick the server machine and reserve its current address.

Do this before you invite anyone.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.