Skip to content

Commit

Permalink
Improve order of recording install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelWei committed Feb 12, 2025
1 parent 5c9059b commit d6962c4
Showing 1 changed file with 34 additions and 40 deletions.
74 changes: 34 additions & 40 deletions docs/docs/administration/08-advanced/03-recording.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ addgroup pilos-spool --gid 2000

## Transferring recordings

### Post publish script

To transfer the recording files to PILOS for permanent storage and serving, you need to set up a post_publish script.

You can find an example post_publish script in the `bigbluebutton` directory of the PILOS repository (`bigbluebutton/pilos_post_publish.rb`).
This script needs to be installed on all BBB-Servers in the `/usr/local/bigbluebutton/core/scripts/post_publish` directory.

You also need to configure the script using the config file `pilos.yml` in the `bigbluebutton` directory of the PILOS repository (`bigbluebutton/pilos.yml`).
Install the file in the `/etc/bigbluebutton/recording/` directory.

To transfer the recording files to PILOS you have two options:

- Shared storage
Expand All @@ -42,7 +52,7 @@ To transfer the recording files to PILOS you have two options:

To use shared storage, you need to mount the shared storage to the BBB-Servers and PILOS.

**On the BBB Server** you need to set the mount point in the `spool_dir` setting of the `pilos.yml` file.
**On the BBB Server** you need to set the mount point in the `spool_dir` setting of the `/etc/bigbluebutton/recording/pilos.yml` file.

```yaml
spool_dir: /mnt/storage/recordings-spool
Expand Down Expand Up @@ -101,36 +111,42 @@ To further secure the transfer, you can later restrict the user to only run the

1. Create an ssh key for the bigbluebutton user on the BBB-Server.

```bash
su - bigbluebutton -s /bin/bash -c "ssh-keygen -t ed25519 -N '' -f ~/.ssh/pilos && cat ~/.ssh/pilos.pub"
```
```bash
su - bigbluebutton -s /bin/bash -c "ssh-keygen -t ed25519 -N '' -f ~/.ssh/pilos && cat ~/.ssh/pilos.pub"
```

2. Edit the `.ssh/config` file of the bigbluebutton user and add the following lines.

```bash
su - bigbluebutton -s /bin/bash -c "nano ~/.ssh/config"
```
```bash
su - bigbluebutton -s /bin/bash -c "nano ~/.ssh/config"
```

```
Host pilos
HostName pilos.example.com
Port 22
User pilos-spool
IdentityFile ~/.ssh/pilos
```
```
Host pilos
HostName pilos.example.com
Port 22
User pilos-spool
IdentityFile ~/.ssh/pilos
```

This will tell the BBB-Server to use the ssh key and the `pilos-spool` user when connecting to the PILOS server.
It will also create an alias for the PILOS server, so you can use `pilos` instead of the full hostname.

This will tell the BBB-Server to use the ssh key and the `pilos-spool` user when connecting to the PILOS server.
It will also create an alias for the PILOS server, so you can use `pilos` instead of the full hostname.
3. Adjust the `spool_dir` setting in the `/etc/bigbluebutton/recording/pilos.yml` file to the rsync destination.
```yaml
spool_dir: pilos:/
```

**On the PILOS server:**

The public key of the bigbluebutton user needs to be added to the `~/.ssh/authorized_keys` file of the `pilos-spool` user.

```bash
su - pilos-spool -s /bin/bash -c "mkdir ~/.ssh && chmod 700 ~/.ssh && nano ~/.ssh/authorized_keys"
su - pilos-spool -s /bin/bash -c "mkdir -m 700 ~/.ssh && nano ~/.ssh/authorized_keys"
```

You can paste the public key from the BBB-Server and restrict the key to only run the rsync command in the recordings-spool directory:
You can paste the public key from the BBB-Server and restrict the key to only run the rsync command in the recordings-spool directory.
In this example we assume PILOS is installed in the `/srv/pilos` directory, adjust this according to your installation.

```
# Example key restricted to rsync and the path of the recordings-spool directory
Expand Down Expand Up @@ -166,28 +182,6 @@ docker compose exec app cat storage/recordings-spool/test.txt
docker compose exec app rm storage/recordings-spool/test.txt
```

## Post publish script

To transfer the recording files to PILOS for permanent storage and serving, you need to setup a post_publish script.

You can find an example post_publish script in the `bigbluebutton` directory of the PILOS repository.
This script needs to be installed on all BBB-Servers in the `/usr/local/bigbluebutton/core/scripts/post_publish` directory.

You also need configure the script using the config file in the `bigbluebutton` directory of the PILOS repository.
Adjust and install the file in the `/etc/bigbluebutton/recording/` directory.

If you are using the shared storage, you need to set the `spool_dir` setting in the `pilos.yml` file to the local mountpoint on the BBB-Server.

```yaml
spool_dir: /mnt/storage/recordings-spool
```
If you are using rsync over ssh, you need to set the `spool_dir` setting in the `pilos.yml` file to the rsync destination.

```yaml
spool_dir: pilos:/
```

### Cleanup

BigBlueButton processes all recording formats independently of each other.
Expand Down

0 comments on commit d6962c4

Please sign in to comment.