Is there a way to install mitmproxy certificates on client when starting?

Hello everyone!

I have configured a raspberry pi as an ap running mitmproxy following this tutorial. I would like that, whenever any client connects to the pi, they are asked somehow (with a captive portal or anything) to download and install the mitmproxy certificates so that I can see https traffic on mitmproxy.
Is there a way to do this?

PS: My configuration is slightly different as I use mitmdump (instad of mitmweb) running in a docker container.

Thanks!