So how do I decommission a Lemmy instance properly?

3 years ago by JASN_DE to c/selfhosted

While it was an interesting and sometimes confusing experience setting up and running my own Lemmy instance (looking at you, 20 character limit on federation URL), I think it's not worth it.

Now the time has come to decommission the service, is there a proper way to do that? I don't mean the local part, that's on docker and gone with 3 lines of bash input. I mean the overall process. How do I tell other instances that mine won't be available any longer? I noticed a constant stream of federation pushes, even with everything deleted and purged. Shutting down the instance won't help either, the requests will simply 404 then, but won't stop, which in itself is only logical. Has anyone done this before and could shed some light on this situation?

Edit: So I played around with the logs some more, there seemed to be an issue with communities that are on "subscription pending". I restored an older database which had all the entries, removed any federation restrictions and tried again from scratch, leaving and joining again until all communities were properly subscribed to.

Then:

  • Unsubscribe
  • Remove
  • Purge

Just to be sure the entries are gone. As of 15 minutes ago, Traefik hasn't logged a single connection to my instance.

Edit2:

Turns out that wasn't it. My instance is on 0.17.4, and even with every community unsubscribed and purged, I'm being hammered by lemmy.world activity_pub events. The formatting is also different, I think that's because they moved to the 0.18 RC stage. So it looks like something somewhere didn't get the unsubscribe announcement.

Edit 3:

So I tried moving to 0.18-RC. Which now means lemmy.world is trying to push the inbox to the frontend? WTH...

sab 22 points 3 years ago

I'm not sure when or if other servers will stop pushing, but did you unsubscribe from all communities before doing so?

Would be interesting to see if that would stop incoming traffic.

path: 0 761236, hotness: undefined, score: 22, children: 4
JASN_DE 14 points 3 years ago

I did. Unsubscribed, then purged from the local DB. I'll work through the logs, see what the other instances are trying to push.

path: 0 761236 761266, hotness: undefined, score: 14, children: 3
sab 14 points 3 years ago

That would be good to know, yes. And unless someone has a definitive answer, it would also be interesting to know how much traffic you'd still be receiving if you kept it off for a week, or a month.

path: 0 761236 761266 761462, hotness: undefined, score: 14, children: 2
JASN_DE 8 points 3 years ago

Edited the main post. Seems like there was an issue with "pending" subscriptions. Maybe in combination with being on 0.17.4

path: 0 761236 761266 761462 763217, hotness: undefined, score: 8, children: 1
sab 2 points 3 years ago

Super useful info! Thank you for your research.

path: 0 761236 761266 761462 763217 772513, hotness: undefined, score: 2, children: 0
eleitl 13 points 3 years ago

Why do you think it's not worth it? What was your experience running it?

path: 0 761273, hotness: undefined, score: 13, children: 3
JASN_DE 15 points 3 years ago

Overall it was fine, took a moment to find the proper Traefik settings, but after that it ran basically fine. It's just too "unstable" for me at the moment from a development standpoint, moving too rapidly. Maybe I'll do another one once it has matured and slowed down a bit.

path: 0 761273 763206, hotness: undefined, score: 15, children: 2
lckdscl 8 points 3 years ago

Can you share what Traefik settings you configured Lemmy with? Mine was just a simple router and service with a compress middleware.

path: 0 761273 763206 763425, hotness: undefined, score: 8, children: 1
peedub 2 points 3 years ago

I found it easy to get the front end showing but the backend stuff required a little trial, error, and searching to get sorted. Here's a part-example of what I needed to make sure the correct traffic was sent to the back end (this is using a yaml file, not inline in a compose file):

rule: "(Host(`domain.com`) && (PathPrefix(`/pictrs`) || PathPrefix(`/api`) || PathPrefix(`/feeds`) || PathPrefix(`/nodeinfo`) || PathPrefix(`/.well-known`))) || (Host(`domain.com`) && Method(`POST`)) || (Host(`domain.com`) && Headers(`Accept`, `application/activity+json`)) || (Host(`domain.com`) && Headers(`Accept`, `application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"`))"

I also decommissioned mine as I was seeing comments and posts coming up a lot quicker and more reliably on the lemmy.nz instance.

path: 0 761273 763206 763425 865323, hotness: undefined, score: 2, children: 0
AES 4 points 3 years ago

Interesting, keep us up to date. Maybe point the DNS to a non existing IP address?

path: 0 762823, hotness: undefined, score: 4, children: 2
JASN_DE 13 points 3 years ago

That would have been plan C, yes. But it's not a proper solution, it's a hacky workaround which puts unneccessary load on the federating instances.

path: 0 762823 763055, hotness: undefined, score: 13, children: 1
Vex_Detrause 4 points 3 years ago

Thank you for caring for the federation. Seeing how much the community care gives me hope for humanity.

path: 0 762823 763055 781301, hotness: undefined, score: 4, children: 0
SeeJayEmm 1 point 3 years ago

Not an exact answer to your question but they lemmy devs are pushing forward with a dead server check. https://github.com/LemmyNet/lemmy/pull/3427

Still not aware of a proper decom process but at least the servers will stop trying to federate content to you after your server gets flagged as dead.

path: 0 1167359, hotness: undefined, score: 1, children: 0
SeeJayEmm 1 point 3 years ago

Sorry I'm late to the party, but what's this about a 20 character limit? My searches are coming up empty.

path: 0 955073, hotness: undefined, score: 1, children: 3
sab 1 point 3 years ago

It's the (default) maximum length for user- and community names. It can be changed in the admin, up to 50,I think.

path: 0 955073 1094478, hotness: undefined, score: 1, children: 2
SeeJayEmm 1 point 3 years ago

The way you worded that I thought it was a server name limit. That would have been awful for me. Thanks for clearing it up.

path: 0 955073 1094478 1094770, hotness: undefined, score: 1, children: 1
sab 1 point 3 years ago

I'm not the original poster.

But I didn't realize this was configurable at first either, and even went so far as to request the limit to be increased face-palm.png

path: 0 955073 1094478 1094770 1095320, hotness: undefined, score: 1, children: 0
ElBarto777 -71 points 3 years ago

Please don't use that overused "looking at you, X" phrase.

path: 0 762255, hotness: undefined, score: -71, children: 5
z3n0x 35 points 3 years ago

Please don't gatekeep how people speak, thanks.

path: 0 762255 766329, hotness: undefined, score: 35, children: 1
ElBarto777 1 point 3 years ago

Please don't gatekeep how people speak.

path: 0 762255 766329 1097683, hotness: undefined, score: 1, children: 0
blazarious 20 points 3 years ago

That phrase makes perfect sense, though

path: 0 762255 762489, hotness: undefined, score: 20, children: 0
twitterfluechtling 12 points 3 years ago

There is nothing wrong with using standard phrases, but everything wrong with gatekeeping them.

And yes, I'm looking at you, @ElBarto777@reddthat.com!

/scnr

path: 0 762255 778701, hotness: undefined, score: 12, children: 1
ElBarto777 1 point 3 years ago

Gatekeeping is another overused term. It's like when u.s. republicans use the term "unamerican" to counter every argument.

path: 0 762255 778701 1097720, hotness: undefined, score: 1, children: 0
selfhosted
selfhosted

@lemmy.world

login for more options
63058
6824
6401

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:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

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

Questions? DM the mods!

go to feed...