HiMai the idea would be to install Flarum while accessing it with the correct url, so right from the start it will contain the https:// url.
I'm not sure that adding a control for the canonical url right inside Flarum is a good idea, because there's a non-negligible risk the user lock themselves out with this feature, in which case they'll need to access the server files or database anyway... Usually it's not something you need to change once Flarum is installed.