Skip to content

Commit

Permalink
docs: livekit quick start (#543)
Browse files Browse the repository at this point in the history
* docs: livekit quick start

* Update CODEOWNERS
  • Loading branch information
Bloomingg committed May 20, 2024
1 parent 67b3aed commit 1a4af90
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
63 changes: 27 additions & 36 deletions HOW_TO_SETUP_LIVEKIT_SERVER.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,45 @@
# How to setup LiveKit server
# Setting Up LiveKit Server for OpenIM Chat

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

## About LiveKit

## 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. For more information, visit the [LiveKit website](https://livekit.io/).

[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/).
## Quick Start


## 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.
To self-host LiveKit, start the server with the following Docker command:

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

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
## Viewing Logs

To generate configuration file for LiveKit server, please refer to [Generate configuration](https://docs.livekit.io/realtime/self-hosting/vm/#Generate-configuration).
To check the server logs and ensure everything is running correctly, use the following command:

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/).
```bash
docker logs livekit/livekit-server
```

### Run it
## Configuring the LiveKit Address in OpenIM Chat

For self hosting user, you may start LiveKit with:
Update the `config/chat-rpc-chat.yml` file to configure the LiveKit server address:

```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
```yaml
liveKit:
url: "ws://127.0.0.1:7880" # LIVEKIT_URL, LiveKit server address and port
```
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/).
By following these steps, you can set up and configure the LiveKit server for use with OpenIM Chat.
## More about Deploying LiveKit
## More about Deploying LiveKi
Please refer to the self hosting [Deploying LiveKit](https://docs.livekit.io/realtime/self-hosting/deployment/) documentation.
For detailed instructions on deploying LiveKit, refer to the self-hosting [deployment documentation](https://docs.livekit.io/realtime/self-hosting/deployment/).
2 changes: 1 addition & 1 deletion docs/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @openimsdk/go-code-review @skiffer-git @withchao
* @Bloomingg @FGadvancer @skiffer-git @withchao
9 changes: 9 additions & 0 deletions livekit/livekit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
port: 7880
rtc:
tcp_port: 7881
port_range_start: 50000
port_range_end: 60000
use_external_ip: true
enable_loopback_candidate: false
keys:
APIftrpEkL9x2pa: 23ztfSqsfQ8hKkHzHTl3Z4bvaxro0snjk5jwbp5p6Q3

0 comments on commit 1a4af90

Please sign in to comment.