> ## 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.

# Quick start

> Set up a server on one computer, join it with the app on each person's computer, and start a room.

Socketchat has two pieces: a server that passes messages along, and the app you chat in. One person runs the server; everyone, that person included, uses the app. If this is new to you, read [How Socketchat works](/how-it-works) first.

* **Starting a group?** Do [On the server computer](#on-the-server-computer), then [On each person's computer](#on-each-person’s-computer-the-app).
* **A friend invited you?** Skip to [On each person's computer](#on-each-person’s-computer-the-app). You do not need a server.

## On the server computer

Do this once, on the computer that will stay on and run the server.

**1. Install Socketchat**

The same program runs the server and the app. See [Install](/install).

**2. Pick the address your friends will dial**

Your friends' apps reach the server by its host: a name or IP address. Which one depends on how you host:

| How you host | Host to use |
| - | - |
| [Same Wi-Fi](/hosting/local-network) | The computer's local IP, such as `192.168.1.20` |
| [Port forwarding](/hosting/port-forwarding) | Your public IP or a dynamic DNS name |
| [Cloud server](/hosting/cloud-server) | A domain name, such as `chat.example.com` |
| [Tailscale](/hosting/vpn/tailscale) | The computer's MagicDNS name, such as `pi.tail1234.ts.net` |
| [WireGuard](/hosting/vpn/wireguard) | The server's WireGuard address, such as `10.8.0.1` |

Not sure? [Host a server](/hosting/overview) compares the ways in one table.

**3. Set up the server**

`init` writes the server's settings and makes its certificate. Run it with your host:

```bash theme={"dark"}
socketchat server init --host chat.example.com
```

It prints the acceptable-use statement and the certificate fingerprint. The certificate lets apps check that they reached your server and no other, and invite links carry its fingerprint, a short code that identifies it. Without `--host`, the host is `localhost`, which only works on this same computer.

**4. Start the server**

`run` keeps the server going so apps can connect:

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

It prints "Socketchat server listening on" with the address and port, then the certificate fingerprint. Apps connect on TCP port 7444. Leave this terminal open; Ctrl-C stops the server.

**5. Make your own invite link**

You need a link to join your own server. In a second terminal on this computer:

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

It prints a one-time `socketchat://` link that registers one person. It expires after 24 hours unless you changed that setting. Use it in the next part, on whichever computer you chat from.

## On each person's computer (the app)

Everyone does this, including the person who runs the server.

**1. Install Socketchat**

See [Install](/install). The app is the same program.

**2. Join with your invite link**

The link tells your app which server to dial and proves you were invited. Keep the quotes, so your shell passes the link whole:

```bash theme={"dark"}
socketchat join "socketchat://chat.example.com:7444/j/..."
```

The first time, Socketchat asks for a display name and a passphrase. The passphrase encrypts everything Socketchat keeps on this computer, and nobody can recover it for you. Then the chat screen opens.

**3. Open the chat screen any time after**

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

It asks for your passphrase and shows your rooms.

## Start a room and invite friends

The person who started the group does this in the chat screen.

**1. Start a room and make a link**

```text theme={"dark"}
/new Friends
/invite
```

`/new` starts a room, and `/invite` makes a one-time link into it. The invite box shows the link and a QR code, and copies an invite message to your clipboard:

```text theme={"dark"}
Join me on Socketchat, an encrypted chat.
1. Install it from https://socketchat.org
2. Then run: socketchat join "socketchat://host:7444/j/..."
```

Paste it to one friend. Press C to copy it again, and run `/invite` again for each friend.

**2. Keep your app open while they join**

Your friend follows [On each person's computer](#on-each-person’s-computer-the-app) with that link. Their request waits on the server until your app lets them in, so keep the chat screen open. Their app checks that the link came from you and marks you verified.

## Server and app on one computer

The person who starts a group often chats on the computer that runs the server. That works with two terminal windows open side by side:

| Terminal | Command | Why |
| - | - | - |
| First | `socketchat server run` | Keeps the server running. Leave it open. |
| Second | `socketchat server invite` | Makes your own link. |
| Second | `socketchat join "<link>"` | Joins your server with the app and opens the chat screen. |
| Second, later | `socketchat` | Opens the chat screen again. |

Closing the first terminal stops the server for everyone. To keep it running after you close the terminal and start it again after a reboot, run it as a service; see [Cloud server](/hosting/cloud-server#run-it-as-a-service).

## Next

* [The chat screen](/use/chat-screen): panels, keys, the mouse and colors.
* [Rooms and invites](/use/rooms-and-invites): direct messages, admins, verifying a friend.
* [Commands](/use/commands): every slash command and terminal command.


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