-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
303 additions
and
339 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
api: | ||
# Listening IP; 0.0.0.0 means both internal and external IPs are listened to, default is recommended | ||
listenIP: 0.0.0.0 | ||
# Listening ports; if multiple are configured, multiple instances will be launched | ||
ports: [ 10009 ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
api: | ||
# Listening IP; 0.0.0.0 means both internal and external IPs are listened to, default is recommended | ||
listenIP: 0.0.0.0 | ||
# Listening ports; if multiple are configured, multiple instances will be launched | ||
ports: [ 10008 ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
enable: "etcd" | ||
etcd: | ||
rootDirectory: openim | ||
address: [ localhost:12379 ] | ||
username: '' | ||
password: '' | ||
|
||
zookeeper: | ||
schema: openim | ||
address: [ localhost:12181 ] | ||
username: '' | ||
password: '' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
# Log storage path, default is acceptable, change to a full path if modification is needed | ||
storageLocation: ../../../../logs/ | ||
# Log rotation period (in hours), default is acceptable | ||
rotationTime: 24 | ||
# Number of log files to retain, default is acceptable | ||
remainRotationCount: 2 | ||
# Log level settings: 3 for production environment; 6 for more verbose logging in debugging environments | ||
remainLogLevel: 6 | ||
# Whether to output to standard output, default is acceptable | ||
isStdout: false | ||
# Whether to log in JSON format, default is acceptable | ||
isJson: false | ||
withStack: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
# URI for database connection, leave empty if using address and credential settings directly | ||
uri: '' | ||
# List of MongoDB server addresses | ||
address: [ localhost:37017 ] | ||
# Name of the database | ||
database: openim_v3 | ||
# Username for database authentication | ||
username: openIM | ||
# Password for database authentication | ||
password: openIM123 | ||
# Maximum number of connections in the connection pool | ||
maxPoolSize: 100 | ||
maxRetry: 10 | ||
# Maximum number of retry attempts for a failed database connection | ||
maxRetry: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
# List of Redis server addresses | ||
address: [ localhost:16379 ] | ||
# Username for Redis authentication (leave blank if not used) | ||
username: '' | ||
# Password for Redis authentication | ||
password: openIM123 | ||
# Enable or disable pipeline processing | ||
enablePipeline: false | ||
# Enable or disable cluster mode | ||
clusterMode: false | ||
# Database index to be used | ||
db: 0 | ||
maxRetry: 10 | ||
# Maximum number of retry attempts for a failed connection | ||
maxRetry: 10 |
Oops, something went wrong.