Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions HOW_TO_SETUP_LIVEKIT_SERVER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# How to setup LiveKit server

OpenIM Chat uses LiveKit server as the media server to support video call and video meeting services.


## Something about LiveKit

[Livekit](https://github.com/livekit/livekit-server) is an open source WebRTC SFU written in go, built on top of the excellent [Pion](https://github.com/pion) project. You can get more information about it on its website [livekit.io](https://livekit.io/).


## Setup LiveKit server on Linux

Please follow the following instructions to setup a LiveKit server to work with OpenIM Chat and OpenIM server on Linux server.

### Docker installation

For self hosting user, we suggest you install LiveKit server by docker pull. You can get a server ready for use in a short time.

```bash
sudo docker pull livekit/livekit-server
```

For cloud deployment, you may follow the [Deploy to a VM](https://docs.livekit.io/realtime/self-hosting/vm/#Deploy-to-a-VM) on [livekit.io](https://docs.livekit.io/).

### Generate configuration

To generate configuration file for LiveKit server, please refer to [Generate configuration](https://docs.livekit.io/realtime/self-hosting/vm/#Generate-configuration).

The keys section of the generated .yaml file is the "apiKey: apiSecret" pair. This key pair should be set to the LiveKit section as the value of <font color="#FF8000">key</font> and <font color="#FF8000">secret</font> arguments.

### Generate access token for video call participant

Please refer to [Generating tokens](https://docs.livekit.io/realtime/server/generating-tokens/) on [livekit.io](https://docs.livekit.io/).

### Run it

For self hosting user, you may start LiveKit with:

```bash
docker run --rm \
-p 7880:7880 \
-p 7881:7881 \
-p 7882:7882/udp \
-v $PWD/livekit.yaml:/livekit.yaml \
livekit/livekit-server \
--config /livekit.yaml \
--bind 0.0.0.0
```

For cloud deployment user, you may follow the [Deploy to a VM](https://docs.livekit.io/realtime/self-hosting/vm/#Deploy-to-a-VM) on [livekit.io](https://docs.livekit.io/).

## More about Deploying LiveKit

Please refer to the self hosting [Deploying LiveKit](https://docs.livekit.io/realtime/self-hosting/deployment/) documentation.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ $ ./scripts/stop-all.sh

Please refer to "[How to add REST RPC API for OpenIM Chat](./HOW_TO_ADD_REST_RPC_API.md)".

## Setup LiveKit if you want to enable Audio and Video chat

Please refer to "[How to setup LiveKit server](./HOW_TO_SETUP_LIVEKIT_SERVER.md)".

## Contributing

Contributions to this project are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
Expand Down