Depends what you mean by aliases. I believe there are self hosted tools that can generate aliases and "redirect" to your online email, but hosting your own complete mail server is what I was going for.
Stalwart mail is one of the most well-made self-hosted applications I have used in a while. I have spent so much time configuring mail servers I almost gave up until I found this. It can be used inside a docker container and as of this month its pretty much configured right out of the box.
Keep in mind hosting your own email server is a PITA in general, spam filters, security, DNS records, and if you have a residential internet connection chances are your ISP will block outgoing TCP traffic assigned to port 25. You'd need a way to route around that, unless your on a cloud provider that isn't blocked. I really enjoy hosting email when it works, but it's a lot to manage.