Q: Costs of Running a server?


#1

I’m not an admin yet, but I thought it would be relevant to post the question in this category.
I was wondering if anyone could share their average costs of running an instance.
I’m particularly curious of knowing how much it would cost to run an instance of 50 to 500 accounts on AWS.
Thanks for your help.
(And please move this topic to its own thread once I’m validated here)


Instance Admins [Reply to Join]
#2

Thx @maloki for moving the topic here.

In the meantime, someone pointed me to this page which gives an example of a server type/load and cost.

I’m still curious of what other admins here experience. Thx for your help.


#3

Hi!

I run my instances on AWS. Most people do not, because it is expensive.

The cost can vary a lot depending on the details of your setup and maybe the behaviour of your users.

If you just do everything (nginx, postgres, redis, the app itself, storing uploads/media) on a single EC2 instance then your costs are pretty easy to estimate.

You will need either a t2.small with a swap partition (not sure this is possible or recommended) or a t2.medium, due to the amount of memory used by the app when it runs and when it is precompiling assets. I have seen the precompile process alone consume (just slightly) over 1G of memory at peak. Since these EC2 boxes only have EBS storage by default, they do not come with swap partitions and thus if you run out of memory everything will stop until the oomkiller comes out to play. I think you probably know this stuff, I’m partly writing it for other people who find this question and have different levels of background knowledge.

You are in danger of running out of disk space though if you store uploaded media on the instance, so you might want to use S3 and/or CloudFront to store/distribute uploads/media. Right now I’m paying maybe $10 CAD a month for S3 and CloudFront (which is optional). There are things you can do to reduce the amount of storage you need, like deleting old uploads/media, or ones from other instances (remote media is cached).

So your basic fixed cost is just an EC2 t2.medium

From there you can really go wild with the various AWS services if you feel like it, but it will increase your cost significantly and you probably won’t see much benefit from it unless you end up supporting more users than you anticipate. I use RDS for the DB, ElastiCache for redis, and an ALB instead of nginx to proxy the app servers (as well as do HTTPS and HTTP2 termination). None of it is necessary, I just do it for fun, and to see how it would work.

I hope that helps! Happy to answer more questions if you have any.


#4

@beatrix-bitrot Thanks for such a detailed explanation, this is super useful. Really appreciate. I’ll be sure to come back to you if we have more question. Cheers.


#5

Anecdotally, those I know with individual-user instances say it costs them about $5-10/month. Those who run multi-user instances report much higher costs


#6

I’m using a $10/mo digital ocean droplet that runs two instances (both docker installs): a single-user instance and a public instance that currently has 78 users. The media for both is stored in S3 buckets. The limiting factor is RAM which currently fluctuates between 75-85% so I wouldn’t feel comfortable with more than 90-100 users on the public instance.


#7

I’m considering getting a single-board computer to run my instance, and the CuBox-i4x4 looks like a decent machine to do it on. It’d be a $170 first payment then ostensibly no upkeep payment. Another option might be something like an array of raspberry/banana pis, but this seems like a decent all-in-one solution.


#8

As for me, I’m running all of mstdn.io (4k users) on an OpenVZ VPS by a french OVH reseller that I’m partnering with.
It cost me about 15€/month (thanks to the partnership and France low-cost hosters like OVH).

It has 8 vCores of Xeon E5-2650 v3, 16 GB of DDR4 and 100GB of RAID 10 SSD, so it’s about the same specs as the 160$/month Vultr/DO droplet. And it rocks :slight_smile:


#9

Scratch that cubox idea. I’m presenting at the Maker Faire in San Mateo this weekend and I found out about a company called LattePanda who has a 4GB RAM, 64GB storage board for only $149, $20 cheaper than the CuBox. It’s designed to run Windows and comes preinstalled with Windows Home. The ones at the faire are on sale at $125, so I might buy one there.


#10

Dedicated, full hardware server at Liquid Web—16GB RAM, R1 SSDs, quad-core Xeon E3-1230, 100Mbps connection—for about $2200/year.

(I use it for a half-dozen other sites, though, so my Mastodon instance is kinda getting a free ride!)


#11

I run both my personal instance and tenforward.social on two separate Linode 2GB VPSes, which are $10 + $2.50 (backups). Total cost per month for Mastodon is $25 USD; which also makes it the most expensive service I host, both in terms of resources and financial cost.

You can see what my resource usage is like here:
https://munin.mastodon.sadiqsaif.com/


#12

https://social.targaryen.house is currently running on a dedicated server (hosted by Hetzner, great hoster by the way, with affordable monsters!) with the following specs : E3-1271v3 (4c/8t); 32 GB of ECC DDR3, and 2*4 TB of disk space. It costs something like 50€ (56$) per month, and I also pay for a storage box to which encrypted backups are sent daily. We have ~3.7k users.

But my post is totally meaningless since this server has some other uses (mostly public but also private services). I really think you shouldn’t pay more than 15$/month for a performant instance with 4k users.


#13

There really seems to be both an abundance of relatively cheap hosters, but they’re also not super great for what Mastodon needs. Still, seems like:

  • you should spend about $10 on the VPS running the main app
    • good examples are Digitalocean, Linode, … who else?
  • if you don’t have enough HDD on that, put the files onto S3 or so
    • which will also set you back about $10 a month.

Am I missing any considerations?


#14

I am interested in this. Are you saying you’d run your instance from home? Do you have a static IP and enough bandwidth for that?


#15

I have setup an instance on Linode, and initially, I was hoping that I could use the $5/month linode but I ran into a problem (which might not have needed to be tackled the way I did) of running out of memory on it, so am now on a $10/month node, and so far I’m not having any issues.


#16

Why dont switch to a dedicated machine?That would be much cheap