I've played with Synology a long time ago. Got Moodle running. But its unorthodox (compared to mainstream) Linux was a pain. If I were to build something DIY today, I would take a Raspberry Pi. For one with Raspberry Pi OS it is pretty much Debian. Secondly it can do a whole lot of things which are useful in a home environment in parallel.
I know, RPi is in short supply now for years. Then there are so many similar alternatives. No, I haven't experimented with them, I happen to have collected enough RPi for dry times, so I can't recommend any.
Edit: I see RPi 400 mentioned. I've found 3 B and 3 B+ also perform well as Moodle servers. With smaller ones, 3 A+, Zero 2 W, etc. even 512 MB RAM is OK. Only thing your are better off with the 64 bit models.