我自托管的内容
What I Self Host

原始链接: https://fredrikmeyer.net/2025/10/18/what-i-self-host.html

弗雷德里克维护着一套自托管的应用,运行在一个每月5美元的DigitalOcean droplet上,主要通过Docker和Ansible进行管理。他最初寻找一个自托管的RSS阅读器,最终选择了Miniflux,网址是rss.fredrikmeyer.net。 除了RSS,他还运行一个Grafana实例(最初用于传感器数据,现在主要显示Strava活动摘要)和YourSpotify,一个Spotify统计跟踪器,通过Tailscale访问。为了管理信息过载,他使用Linkding,一个书签管理器。 虽然目标是完全自动化的“基础设施即代码”设置,但他目前采用混合方法,使用Ansible自动化Nginx和Grafana,而手动部署Miniflux和YourSpotify。他认为Jeff Geerling的Ansible书籍是一份宝贵的资源。他最后提到了一些未来的项目想法,包括AI驱动的设备故障排除和自托管Jira替代方案。

## 黑客新闻讨论: “自托管”意味着什么? 最近一篇黑客新闻帖子,关于用户自托管的项目,引发了关于“自托管”定义的争论。原作者分享了一个他们运行的服务列表——包括一个Spotify统计API——评论者很快就对什么才是真正的自托管产生了分歧。 一些人认为,严格的定义是:真正的自托管需要拥有和维护所有硬件,不依赖云服务或外部依赖,并且能够物理访问和修理硬件。另一些人则认为,现代意义侧重于*数据所有权*和控制,涵盖了托管在DigitalOcean等VPS提供商上的服务,即使不是在个人硬件上。 这场讨论凸显了各种方法,从完全独立的设置到利用云基础设施以实现便利性和跨多个设备的访问。许多人同意这个术语已经演变,可能需要一个新词来描述在租赁基础设施上运行的服务。最终,观点各异,有些人强调“DIY”方面,而另一些人则优先考虑对数据的控制。
相关文章

原文

I’ve always liked reading blogs, and have used several feed readers in the past (Feedly, for example). For a long time I was thinking it would be fun to write my own RSS reader, but instead of diving into the challenge, I did the next best thing, which was finding a decent one, and learning how to self host it.

In this post I will tell about the self hosting I do, and end by sketching the setup.

Miniflux is a “minimalist and opinionated feed reader”. I host my own instance at https://rss.fredrikmeyer.net/ It is very easy to set up using Docker, see the documentation.

Miniflux

I do have lots of unread blog posts 🤨.

Grafana, Strava Integration

I host a Grafana instance, also using Docker. What first triggered me to make this instance was an old project (that I want to revive one day): I had a Raspberry Pi with some sensors measuring gas and dust at my previous apartment, and a Grafana dashboard showing the data. It was interesting seeing how making food at home had a measurable impact on volatile gas levels.

Later I discovered the Strava datasource plugin for Grafana. It is a plugin that lets Grafana connect to the Strava API, and gives you summaries of your Strava activities. Below is an example of how it looks for me:

Grafana

One gets several other dashboards included in the plugin.

Spotify

One day YourSpotify was mentioned on HackerNews. It is an application that connects to the Spotify API, and gives you aggregated statistics of artists and albums you’ve listened to over time (why they chose to store the data in MongoDB I have no idea of!).

YourSpotify

It is interesting to note that I have listened to less and less music over the years (I have noticed that the more experience I have at work, the less actual programming I do).

Because I didn’t bother setting up DNS, this one is only exposed locally, so I use Tailscale to be able to access YourSpotify. This works by having Tailscale installed on the host, and connecting to the Tailnet. It lets me access the application by writing http://forgottensuperhero:3001/ in the browser.

Bookmark manager

I have a problem with closing tabs, and a tendency to hoard information (don’t get me started on the number of unread PDF books on my Remarkable!). So I found Linkding, a bookmark manager, which I access at https://links.fredrikmeyer.net/bookmarks/shared.

LinkDing

In practice it is a grave yard for interesting things I never have the time to read, but it gives me peace some kind of peace of mind.

How

I have an ambition of making the hosting “production grade”, but at the moment this setup is a mix of practices of varying levels of quality.

I pay for a cheap droplet at DigitalOcean, about $5 per month, and an additional dollar for backup. The domain name and DNS is from Domeneshop. SSL certificates from Let’s Encrypt.

All the apps run in different Docker containers, with ports exposed. These ports are then listened to by Nginx, which redirects to HTTPS.

I manage most of the configuration using Ansible. Here I must give thanks to Jeff Geerling’s book Ansible for DevOps, which was really good. So if I change my Nginx configuration, I edit it on my laptop, and run

ansible-playbook -i inventory.ini docker.yml  --ask-become-pass

to let Ansible do its magic. In this case, “most” means the Nginx configuration and Grafana.

Miniflux and YourSpotify are managed by simply doing scp spotify_stats.yml droplet:~ and running sudo docker-compose -f ./spotify_stats.yml up -d on the host.

Ideally, I would like to have a 100% “infrastructure as code” approach, but hey, who has time for that!

Ideas for the future

It would be nice to combine AI and user manuals of house appliances to make an application that lets you ask questions like “what does the red light on my oven mean?”. Or write my own Jira, or… Lots of rabbit holes in this list on Github.

Until next time!

联系我们 contact @ memedata.com