The quick advice: Don’t do it.
The long advice: Follow this guide
But please be aware that upgrading AdGuard Home will lead to problems during firmware upgrades because the firmware upgrade will overwrite AGH with an older version and then the config file explodes.
In that case, you will need this link as well: Upgrade to 4.5 killed AdGuard Home - #7 by alzhao