docker-jitsi-meet icon indicating copy to clipboard operation
docker-jitsi-meet copied to clipboard

feat: Rootless containers

Open emrahcom opened this issue 9 months ago • 9 comments

This PR allows Jitsi containers to run without using root account.

Main changes:

  • s6-overlay is upgraded to v3.2.0.2

  • All processes are run by a non-root user: s6

  • Currently, container's filesystem is still writable but the active user is s6. So, it cannot write into the root's folders.

  • Config files are created in /run by using templates and provided config files (from /config)

  • The writable folders for s6 are:

    • /run
    • /tmp
    • Folders in the mounted volumes with write permission (writable folders should have 777 as mode)
  • Volumes are updated to differ read-only and writable volumes:

    • /config contains read-only config files
    • /storage contains created files during the runtime such as recordings, logs, etc.
    • /tmp contains created temporary files the runtime
  • Expected folders on host:

mkdir -p ~/.jitsi-meet-cfg/prosody/{config,prosody-plugins-custom}
mkdir -p ~/.jitsi-meet-cfg/{jibri,jicofo,jigasi,jvb,web}

mkdir -p ~/.jitsi-meet-cfg/storage/{jibri,prosody,transcripts}
chmod 777 ~/.jitsi-meet-cfg/storage/jibri
chmod 777 ~/.jitsi-meet-cfg/storage/prosody
chmod 777 ~/.jitsi-meet-cfg/storage/transcripts

mkdir -p ~/.jitsi-meet-cfg/tmp/{web-crontabs,web-load-test}
chmod 777 ~/.jitsi-meet-cfg/tmp/web-crontabs
chmod 777 ~/.jitsi-meet-cfg/tmp/web-load-test
  • jibri container doesn't have CAPS_SYS_ADMIN anymore. Therfore Chrome is run with --no-sandbox.

My plan is to create a second PR to make container's filesystem completely read-only after a while. Actually this also works in my test but I don't want to make it harder to debug.

emrahcom avatar Feb 22 '25 10:02 emrahcom

Sorry for the exec comments, I got carried away during review ;-) I can make those after this lands.

saghul avatar Feb 24 '25 11:02 saghul

I'll give this a try shortly @emrahcom, thanks a lot for the swift responses to my comments!

saghul avatar Feb 24 '25 13:02 saghul

Thank you very much for your helps.

emrahcom avatar Feb 24 '25 13:02 emrahcom

Hey @emrahcom quick update: I will start testing the end of this week or the next.

Something important we need to handle here is migrating the XMPP data from existing installations since it may contain user accounts.

saghul avatar Mar 04 '25 07:03 saghul

I will check the option to use ~/.jitsi-meet-cfg/storage/prosody as Prosody's data_path.

emrahcom avatar Mar 04 '25 07:03 emrahcom

I updated my first post (added ~/.jitsi-meet-cfg/storage/prosody).

A fix was added to get Prosody accounts from the old setup.

emrahcom avatar Mar 04 '25 12:03 emrahcom

Hi @saghul, I have an idea that would make merging easier. This is:

Currently, this PR looks big and the repo is being updated all the time.

What do you think?

emrahcom avatar Mar 31 '25 17:03 emrahcom

Hey @emrahcom ! So sorry for the delay, the Prosody 13 release has certainly stolen some cycles.

I think it's best to go all in here.

The conflicts should be easy to solve, we can likely do that before the merge.

I'm setting some time aside next week to test this properly.

saghul avatar Apr 02 '25 06:04 saghul

Hi @saghul, if there is anything I can do to help the process, please let me know.

emrahcom avatar May 23 '25 11:05 emrahcom

Hi @saghul, Germany's Center for Digitial Sovereignity (ZenDiS) was happy to sponsor this work as part of openDesk 🚀 .

We would like to see this integrated as soon as possible. Would you mind taking a look at this again?

securitykernel avatar Jul 01 '25 08:07 securitykernel

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Sep 30 '25 02:09 github-actions[bot]