# Server

Every collaborator connects to one small server. It is a single executable. SQLite is built in, so there is nothing else to install. One server can host several projects. Each project gets its own room.

![One small server. The editor only needs a Server URL and a room name.](https://3124660912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCzO6BrBWHeqbWYPwcAp9%2Fuploads%2FpT0AWQmfDBiohpMwQ38H%2Fself-hosted.jpg?alt=media)

[!card layout="compact" icon="device-desktop" title="Windows" text="Run it on a PC, with a taskbar icon or a scheduled task."](windows.md)
[!card layout="compact" icon="terminal" title="Linux" text="A PC, a server, or a Raspberry Pi, with systemd."](linux.md)
[!card layout="compact" icon="device-mobile" title="macOS" text="Apple Silicon or Intel, including launchd at sign-in."](macos.md)
[!card layout="compact" icon="container" title="Docker" text="Any machine with Docker, including a NAS."](docker.md)
[!card layout="compact" icon="globe" title="Internet" text="VPN, HTTPS with Caddy, or a certificate on the server."](internet.md)
[!card layout="compact" icon="issue-opened" title="Maintenance" text="Backups, updates, and the errors you are likely to see."](maintenance.md)
[!card layout="compact" icon="list-unordered" title="Options" text="Flags and environment variables."](options.md)

## Short path

>>> Step 1
From the server repository, run `./build.ps1` on Windows or `./build.sh` on Linux and Mac. You need [Go](https://go.dev/dl/) or Docker. The binaries land in `dist/`.

| File                              | Machine                                          |
| --------------------------------- | ------------------------------------------------ |
| `collab-server-windows-amd64.exe` | 64-bit Windows                                   |
| `collab-server-linux-amd64`       | Linux on Intel or AMD                            |
| `collab-server-linux-arm64`       | 64-bit ARM Linux, including Raspberry Pi 4 and 5 |
| `collab-server-darwin-arm64`      | Apple Silicon (M1 and later)                     |
| `collab-server-darwin-amd64`      | Intel Mac                                        |

You can build on one machine and copy the executable to another.

>>> Step 2
Set `COLLAB_PASSWORD`, or pass `-password`. Share that password with the people who will connect. An empty password is accepted, and it is a bad idea as soon as the port is reachable.

>>> Step 3
Pass `-data` as an absolute path. A double-click, a shortcut, and a scheduled task do not share a working directory, so a relative `data` folder can silently become a second, empty database.

>>> Step 4
Allow it in the machine firewall. The plugin **Server URL** is `ws://<address>:7878/ws`.

>>> Step 5
Open `http://<address>:7878/health` in a browser. A healthy server returns JSON with `"status":"ok"` and a `protocolVersion`. The plugin and the server must report the same protocol version.

>>>

!!!warning
After you update the plugin, rebuild and restart the server. If the protocol numbers differ, the editor shows that the plugin and server versions are incompatible.
!!!

!!!info
A running server checks [GitHub Releases](https://github.com/400Interactive/EditorCollaboration_Server/releases) and can replace itself. The steps are on [Maintenance](maintenance.md).
!!!
