This template uses {{Ubxdisplay}} to display a random userbox from a given selection.
{{Ubxdisplay/random | User en | User:Foo/userbox}}
The template can accept up to 32 parameters. If you use 2, 4, 8, 16, 24, or 32 userboxen you do not need to specify a number. Otherwise use |num=X, where X is the number of boxes in the selection pool. You can also provide |nt=yes to suppress the "ubxrand · view ubx · random ubx" line.
Templates that require parameters (such as {{User Wikipedian For}}) are currently unsupported. A workaround is to create a user subpage that calls the template with the necessary parameters. You should also probably avoid using categorizing userboxen as your userpage categories would then be constantly changing. A workaround is to hard-code the categories.