5 ms·
Mastodon has a single-user instance mode: https://github.com/tootsuite/mastodon/blob/8392ddbf87f5522c445573c50e4f21d690172bc0/.env.production.sample#L47-L48 htt
by nolanl 9y ago
Mastodon has a single-user instance mode: https://github.com/tootsuite/mastodon/blob/8392ddbf87f5522c445573c50e4f21d690172bc0/.env.production.sample#L47-L48 https://github.com/tootsuite/mastodon/blob/8392ddbf87f5522c4...
Most instances would federate with you immediately since they're on a blacklist model, but some instances (such as awoo.space) operate on a whitelist, meaning they'd have to vet you first.
- cdubzzz 9y agoI’m sure I can dig this up at some point, but just in case anyone knows off hand - can a single user instance run well enough on a small (1 cpu, 512mb ram) VPS running a few other lightweight services?
- pfg 9y agoOne CPU would be fine with just one user, but that's not enough RAM. I would consider 2GB the bare minimum, with one app server instance and one background worker process (sidekiq) running.
- librexpr 9y agohugogameiro seemed to say otherwise a month ago[0]. According to his post, it takes <1GB of RAM. Have things changed since then? [0] https://news.ycombinator.com/item?id=15213203 https://news.ycombinator.com/item?id=15213203
- pfg 9y agoIt would probably be possible to run the app server and background worker with about 1 GB of RAM. You might have to restart the workers daily to avoid OOMs (ruby/rails/puma will leak memory, you'll just accept that at some point), but that's more or less acceptable. That still leaves postgres, redis, your web server and all other system processes. Fitting those on the same server with a total of 1 GB of RAM available is a very, very tight fit. You will probably get OOMs regularly, and upgrading Mastodon, doing backups and things like that will be painful (building assets, for example, tends to eat a lot of memory). hugogameiro, from what I understand, runs a lot of mastodon instances on shared infrastructure. That eliminates a lot of that overhead and if you look at just the instance-specific processes, 1 GB seems realistic. If you have existing infrastructure (i.e. something like postgres, redis, nginx) and can allocate about 1 GB of RAM to Mastodon, or use something like a Heroku 2x dyno, where these components are separated as well, that might work. Otherwise, I'd opt for 2 GB of RAM.
- cdubzzz 9y agoSo I decided to test this out on a 1CPU/512M DO droplet, just for fun. I did indeed hit OOM during the setup (`bundle install` and `yarn` steps). After the first one I added a 1G swap and made it all the way through the 1.6.1 install (although the webpack precompile step damn near used up the whole swap!). Anyway 1.6.1 idles around 600M without any attempt to optimize. I next tested an upgrade from 1.6.1 to 2.0.0 and was able to get it done (with the precompile again cutting it close - it hit 1015M of the swap, hah!). No change in memory usage, perhaps a bit more even. Off topic - the install process was easy enough but seems like it could really do well to be (much) more automated. Do you know if anyone is working towards this? I suppose that is what Docker is for...
- axxl 9y agoThe last time I set one up the install/setup process ran out of memory when you had less than the 2GB Droplet on digital ocean, but when actually running it didn't need the full amount. Could have been improved since then.
- throw2016 9y agoRuby is not a great choice for a 'decentralized' app. Setup and config is harder, usually requires an entire build environment and can quickly throw you into dependency hell. Server requirements and maintenance are also a lot higher.