Under the hood: how this network is hosted
The previous post was about how the network is organised for people. This one is about the machines. Quite a few of you in the Self-Hosting Club asked, so here is the current set-up, warts and all.
The stack
- UNA CMS runs the whole back end: profiles, spaces, groups, permissions, content and notifications.
- The web and mobile apps are a separate front end that talks to UNA through its API, so the website and the phone apps share one source of truth.
- One main server runs nginx, PHP-FPM and MySQL. It is bigger than it needs to be, which is the point.
- Object storage holds photos, videos and files, so media doesn't fill up the server disk.
- Memcached handles caching, and cron runs the background jobs: notifications, email digests and cleanup.
Backups, because I have learned
The database is dumped every night and copied off site, and media storage is versioned. Once a month I restore the latest backup onto a spare server and click around to make sure it actually works. A backup you have never restored is a hope, not a backup.
What I'd do differently
If I were starting today, I would put the database on its own machine from day one and set up monitoring before launch, not after the first outage. I would also write down every config change somewhere other than my own head. That last one is still a work in progress.
Questions welcome, especially from anyone running UNA on a small budget. One well-tuned server goes a long way for a community of this size, and I'm happy to share config notes.
Info
html
asdasdasd