3 days ago I said I needed a new hobby...
from mappe@moplemmy.fyi to selfhosted@lemmy.world on 14 Aug 20:13
https://moplemmy.fyi/post/153

So I asked if I was an idiot for coming up with the bright idea to start my own lemmy instance. Well I can proudly state that yes, I am an idiot, but I’m an idiot with his own lemmy instance: MopLemmy.fyi. Barebones and barely federated, but by God it’s mine.

A brief summary of the issues I ran into: Lemmy Easy Deploy was absolutely the right way to go, thanks ᛒᛚᚢᛖᛇᚦᛖᚱ@no.lastname.nz for that suggestion. I’ve very new to several aspects of this so just understanding containers and when to use LED commands and not standard container commands ended up being the biggest hurdle to deploying the instance.

Email. Everything about getting the SMTP setup was basically terrible. Brevo won’t let you make an account using an email address with a “.” in it, so I ended up needing to make an email account so I could make an email account. Then I was troubleshooting a typo error for too long, and then I was troubleshooting a bad bit of info I got from the internet which had me using my account email address instead of the Brevo created one for the SMTP, so those were human error and by far the single most time consuming issue.

Second to that, a script to check if my external IP address changed. This ended up being the single most annoying thing, partly because of my newbity. I was using Remote Desktop Connection into my Linux box and copy and pasting stuff. Copy and paste was screwing up the data and kept breaking things. Once I realized that and switched to SSH things went smoother. I know, rookie mistake.

Setting up backups to my RAID that I could then access from my Samba share ended up being another issue. First it was saving to the wrong folder, then I thought I had broken my Samba share and couldn’t access it from the network… and the problem ended up being UFW because I forgot to allow Samba through the frickin’ firewall. Oh and then the same thing happened when I was trying to look at my Netdata but at least that time I figured it out much quicker.

Those were the major annoyances, the rest was more about the learning experiences of finding out certain things were a lot more complicated than I thought they would be. I did not expect to have to put so many different DNS records. I didn’t expect to have to spend so much time deciding on white list vs black list federation, or host images local or not, or image retention, etc. But it’s up and stable and working and I am very slowly federating to more communities and deciding what all I want to be able to see. Thanks to everyone on the original post with advice and suggestions, even the people who suggested things I ended up not doing, heh.

#selfhosted

threaded - newest

BuckFutter@timeyak.com on 14 Aug 20:19 next collapse

Ha and I feel yah on the frustration. Congrats on getting it setup and working! Cheers.

oneser@lemmy.zip on 14 Aug 20:22 next collapse

This is cool and if you feel like posting more updates in the future, I personally would appreciate it.

It mirrors my own entry into self hosting these last years. Funnest one for me was spending 5 hours trying to log into my server after my IP “upgraded” for me, after they replaced it with a system with which the settings can only be modified via an app… 😊

But you live and learn and wait for the next headache!

mappe@moplemmy.fyi on 14 Aug 20:25 collapse

Sure, I’ll gladly mention anything else that comes up. I know of some small things I still need to look at but am planning to let my brain rest a few days first, heh.

tracyspcy@lemmy.ml on 14 Aug 20:32 next collapse

Nice instance logo

mappe@moplemmy.fyi on 14 Aug 20:37 collapse

Well I decided my instance needed a personality, and it was the most logical choice.

Sunshine@lemmy.ca on 14 Aug 20:42 collapse

Good cleanup mate!

Epzillon@lemmy.world on 14 Aug 20:37 next collapse

I read your initial post and I am so happy for seeing this update! Good luck with your instance!

eleijeep@piefed.social on 14 Aug 20:42 next collapse

I see your post from piefed.social, so federation is working here. Good job.

mappe@moplemmy.fyi on 14 Aug 20:50 collapse

Sweet, this was my first “off instance” post test, glad it all seems to be working so far.

fozid@lem.radiantfig.fyi on 14 Aug 20:45 next collapse

Welcome to the club! I too have an fyi tld!

I set my Lemmy instance a couple of weeks ago. But hosting isn’t new to me so wasn’t a huge hurdle.

mappe@moplemmy.fyi on 14 Aug 20:54 collapse

This is my first hosting experience outside some game server type stuff, and I only access Lemmy from an app, so as stupid as this is gonna sound I actually had a lightbulb moment halfway through realizing I was making an actual website with a URL…<img alt="" src="https://moplemmy.fyi/pictrs/image/67174766-380a-4649-8939-80a0c00f2fa5.gif">

spaghettiwestern@sh.itjust.works on 14 Aug 21:28 next collapse

Instead of connecting via your external IP, consider setting up DDNS (Dynamic DNS). Most routers support it out of the box, it’s free (using a DDNS service like DuckDNS) and easy to set up. Once working you’ll connect via a static URL rather than an IP and when your external IP address changes, that URL will update automatically within a few minutes and direct you to the new IP.

mappe@moplemmy.fyi on 14 Aug 22:01 collapse

Good call, I did check that and my router (Google) doesn’t have that option, that’s why I went with the surprisingly annoying script, heh.

spaghettiwestern@sh.itjust.works on 14 Aug 22:08 next collapse

You can also run it on your Linux box and check external IP via web page. Sites like myip.wtf/text provide it in plain text that can easily be used without accessing your router’s UI.

lka1988@lemmy.dbzer0.com on 14 Aug 23:02 collapse

Oof. Dump that router and get yourself something nice, like a Unifi router. Or go the DIY route and build an OPNsense box.

OPNsense is the way I’m gonna go after my OG UDM shits the bed. But it’s almost 7 years old and still kicking…

Edit: I saw this post from dbzer0, so it appears to be working well.

unitedwithme@lemmy.today on 14 Aug 21:36 next collapse

Did anyone make an instance called starfleet?.. Since, you know… It’s federated?

mappe@moplemmy.fyi on 14 Aug 21:42 next collapse

There’s supposed to be a picture of Picard clapping here but it’s erroring and won’t let me upload, even thought it did in another reply, so… thanks for helping me find a bug?

chronicledmonocle@lemmy.world on 14 Aug 22:25 next collapse

You mean StarTrek.website? 😉

heartSagan5@lemmy.zip on 14 Aug 23:47 collapse

Call it nodefleet, lol

unitedwithme@lemmy.today on 15 Aug 01:22 collapse

USS Nodefleet

schwim@piefed.zip on 14 Aug 21:54 next collapse

Great job and thanks for the helpful and derailed post!

mappe@moplemmy.fyi on 14 Aug 22:05 collapse

It wouldn’t be a fediverse post without half the comments being off topic and the other half arguments about very specific and very inconsequential subjects =-)

schwim@piefed.zip on 14 Aug 22:07 collapse

Woops 😁

BlueEther@no.lastname.nz on 14 Aug 22:45 next collapse

Well done on getting it up and running, federation seems to be working moplemmy.fyi/instances & phiresky.github.io/lemmy-federation-state/site?do…

You shouldn’t have to put instances in the Allowed Instances, just use blocked list for stuff you dont want to see

Yes email is a pain in the arse. More so if you are having to deal with dynamic IPs

Now just wait for the scrapers to turn up. Both Dave (lemmy.nz) and I are getting well in excess of 500k requests from content scrapers per day atm and they are tyring to pull in whole comment trees and walk through all posters.

Have a look at Iocaine to help tarpit some of them if you dont want to route through something like cloudflare.

mappe@moplemmy.fyi on 14 Aug 23:11 collapse

Ohh interesting, I have CrowdSec going but I like the sound of Iocaine as well, anything to screw with scrapers since that’s still on the to do list (robots.txt, etc).

BlueEther@no.lastname.nz on 14 Aug 23:32 collapse

Back up the server then work through:

Just follow the guide iocaine.madhouse-project.org/…/getting-started/ Bind the iocaine service to 0.0.0.0:42069

cat /opt/iocaine/etc/iocaine/config.d/00-server.txt.kdl 
http-server default {
  bind "0.0.0.0:42069"
  use handler-from=default
}

expose interface to Docker (make sure not to expose it to the world).

sudo iptables -I INPUT 4 \
  -s 172.18.0.0/16 \
  -d 172.18.0.1 \
  -p tcp --dport 42069 \
  -j ACCEPT

add the interface to the proxy service in a custom/docker-compose.yml.template

proxy:
    {{COMPOSE_CADDY_IMAGE}}
    env_file:
      - ./caddy.env
      - {{ CADDY_EXTRA_ENV }}
    volumes:
      - ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
      - caddy_data:/data
      - caddy_config:/config
    extra_hosts:
      - "host.docker.internal:172.18.0.1"
...

add iocaine to caddy in a custom/Caddyfile.template

{$LEMMY_HOSTNAME} {
        import caddy-common

        ######################################
        ########## iocaine  code ##########
        @read method GET HEAD
                reverse_proxy @read host.docker.internal:42069 {
                @fallback status 421
                handle_response @fallback
        }
...

rebuild all the docler images (at least the caddy one ./deploy.sh -f) and test

I think that should work

CrowdSec

mappe@moplemmy.fyi on 14 Aug 23:51 collapse

Woh, thanks for all that! I have full backups going through restic so I can’t use that as an excuse not to play around with this over the weekend, heh

tko@tkohhh.social on 14 Aug 22:59 next collapse

Welcome fellow instance owner!

ArborNode@lemmy.shutes.org on 14 Aug 23:19 next collapse

Great post! I can definitely feel you on the SMTP settup for it being your first time.

Really cool to read the perspective of someone so new to this that’s informative instead of being for help.

Welcome to the club!

melroy@kbin.melroy.org on 15 Aug 00:39 next collapse

If you want to setup a mbin instance. Just let me know.

Surp@lemmy.world on 15 Aug 01:09 next collapse

Can I post at all these places without making more accounts?

Grail@multiverse.soulism.net on 15 Aug 01:54 collapse

Yeah, it’s federated. That means users, communities, posts, and votes are shared. For example, I’m sending you this comment from My piefed site, and you can see it fine.

mhzawadi@lemmy.horwood.cloud on 15 Aug 07:07 next collapse

This post is from my Lemmy instance, I can see this thread just fine :)

spacegoat@lemmy.world on 15 Aug 07:14 collapse

What is the best FAQ/resource to learn about Lemmy and federation? I use it but don’t understand the backend.

Grail@multiverse.soulism.net on 15 Aug 07:21 collapse

I personally enjoy Rimu Atkinson’s blog on the development of Piefed: https://join.piefed.social/blog/

Probably the best intro is the first post: https://join.piefed.social/2023/11/18/subscribe-and-unsubscribe-to-a-community-follow/

Grail@multiverse.soulism.net on 15 Aug 01:53 collapse

I’ve made a Lemmy instance and a PieFed instance, and I’ll say PieFed is easier to set up and uses less computational resources. If you want the easy mode, make a piefed instance.