Jibri Finalize Script Setup

Hi, I want to upload meetings to S3 database.

My config is as belows :
/etc/jitsi/jibri/jibri.conf

jibri {
    recording {
        recordings-directory = "/srv/recordings"
        finalize-script = "/srv/upload.sh"
    }

    chrome {
        flags = [
            "--use-fake-ui-for-media-stream",
            "--start-maximized",
            "--kiosk",
            "--enabled",
            "--disable-infobars",
            "--autoplay-policy=no-user-gesture-required",
            "--ignore-certificate-errors"
        ]
    }

    api {
        xmpp {
            environments = [
                {
                    name = "prod environment"
                    xmpp-server-hosts = ["meet.mydomain.com"]
                    xmpp-domain = "meet.mydomain.com"

                    control-muc {
                        domain = "internal.auth.meet.mydomain.com"
                        room-name = "JibriBrewery"
                        nickname = "jibri-nickname"
                    }

                    control-login {
                        domain = "auth.meet.mydomain.com"
                        username = "jibri"
                        password = "pass"
                    }

                    call-login {
                        domain = "recorder.meet.mydomain.com"
                        username = "recorder"
                        password = "pass"
                    }

                    strip-from-room-domain = "conference."
                    usage-timeout = "0"

                    trust-all-xmpp-certs = true
                }
            ]
        }
    }
}

/srv/upload.sh

#!/bin/bash
#!/bin/sh
aws s3 sync /srv/recordings s3://mybucket
exit 0

But, nothing is happening

PS : Running aws s3 sync /srv/recordings s3://mybucket via cli works fine

It could be something with the aws credentials - try to add in the script

export AWS_ACCESS_KEY_ID=“your-aws-key”
export AWS_SECRET_ACCESS_KEY=“your-aws-secret”

right before calling aws s3 sync

The reason may be that you are calling aws from command line as another user, not as the one the script is running as (jibri). If that’s the issue, you can either leave these var exports in the script, or configure aws for jibri user (with ~/.aws/* etc.)

Let me check that out

Indeed that helped me a lot, thanks a lot @yasen

Wish you a good day

1 Like