this post was submitted on 25 Feb 2025
56 points (100.0% liked)

Selfhosted

42956 readers
739 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I've been thinking of self hosting a mastodon (gotosocial, more specifically) + a matrix server on an old computer I have, but sometimes I might need to turn it off for 2 days or more (not to mention some energy or internet outages that might happen here)

I suppose with the mastodon part the server will properly sync and download whatever's been missing, but I'm not entirely sure that'll be the case with matrix. If anyone sent me a DM on there while my server was down, would it get through after it was back up?

top 9 comments
sorted by: hot top controversial new old
[–] [email protected] 52 points 3 days ago* (last edited 3 days ago)

Took a look at the specification, this is what I found:

For federated servers performing delivery to a third party server, delivery SHOULD be performed asynchronously, and SHOULD additionally retry delivery to recipients if it fails due to network error.

So they should retry. Note that should is not the same as must. So there is no obligation. There is no timeline in the spec about for how long or how often retries should be done. The wording says network error.

My interpretation: the spec leaves a lot of room for implementations to differ. Network problems don't normally last for days though. I'd guess that if your server is down for 5 minutes, you'll still receive most or everything you'd normally receive. I wouldn't trust on that if your server is offline for more than a day.

[–] [email protected] 13 points 2 days ago* (last edited 2 days ago)

Matrix won't necessarily download all state/messages automatically, but if your client requests a non-available message your matrix server will query other matrix servers for it (backfilling).

E.g. if you scroll up to older messages, it might take a a few seconds but your client should eventually show them.

Matrix server use a back-off for servers sending messages, so if your server is offline for many hours, it might take a day for your servers to get messages pushed to by other servers again.

[–] [email protected] 8 points 3 days ago (1 children)

No. There's nothing for people to connect to when it's shutdown. And requests or submissions would just get bounced back by the server not existing.

[–] [email protected] 9 points 3 days ago

I think they are asking about a personal instance, not something federated necessarily. A lag server.

[–] [email protected] 4 points 3 days ago (1 children)

You're talking about syncing and downloading content from external services, which makes me think you're just imagining these as being a client versus an "instance". In that case, just use a client because neither of these services inherently do what you're asking, that's what a client of these services does.

[–] [email protected] 3 points 2 days ago (2 children)

My dummy understanding is that each instance could be considered a "client", in the sense that they're always on the lookout for data from other instances whenever the latter generates new content. Either that or, when one connected user checks what's on a different instance, it downloads to the local cache, ie: if I, from programming.dev, am the first to check this thread, a copy gets saved locally (cache) in the programming.dev server, which might check back on the original source in the case of any edits.

[–] [email protected] 6 points 2 days ago

Sort of, but not really. It's a pub/sub ecosystem, so if your services are offline, they aren't going to be pulling the delta of missed data beyond a threshold. That's why clients are clients, because they are built to do this for this purpose.

It wouldn't make sense for a deployment acting as an active instance to act like a client in the way you're describing, because the services are configured and tuned to NOT act that way, but ingest data available at time of publish to the endpoints they are subscribed to.

[–] [email protected] 2 points 2 days ago

Matrix works like email. It used a push model where a server pushes a message to another server that stores it. The message might be stored on the server of origin or it may not.

[–] [email protected] -1 points 2 days ago

Probably not