Hosting Mastodon is as difficult as deploying a traditional web app: if you are familiar with docker, it's just a matter of choosing where you are going to put your database, redis and where to store media.
The problem is that it is expensive. Even if you host on a cheap VPS and put your media on some object storage like Storj (~$4/TB/month), you are problably looking at a minimum of $20/month for the server. If you get for yourself, maybe your friends and stay under 50 users, fine.
If you get more than that then you'll need a beefier server, and if any of users follows lots of media-heavy accounts and does not set it up to delete old posts, your object storage will be full very quick.