you start with Raspberry Pi OS Lite 64-bit
https://www.raspberrypi.com/software/operating-systems/
or with https://raspi.debian.net
then you install
https://docs.akkoma.dev/stable/installation/debian_based_en/
https://novakeith.net/2023/01/14/akkoma-for-dummies-part-one/
if you don't have static IP you need something like this
https://www.noip.com/support/knowledgebase/free-dynamic-dns-getting-started-guide-ip-version