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.

  • Grail@multiverse.soulism.net
    link
    fedilink
    English
    arrow-up
    3
    ·
    7 hours ago

    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.

  • ᛒᛚᚢᛖᛇᚦᛖᚱ (BlueÆther)@no.lastname.nz
    link
    fedilink
    English
    arrow-up
    11
    ·
    edit-2
    10 hours ago

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

    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.

    • The Mop Lord@moplemmy.fyiOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 hours ago

      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).

      • ᛒᛚᚢᛖᛇᚦᛖᚱ (BlueÆther)@no.lastname.nz
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        9 hours ago

        Back up the server then work through:

        Just follow the guide https://iocaine.madhouse-project.org/documentation/3/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

        • The Mop Lord@moplemmy.fyiOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          9 hours ago

          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

  • Epzillon@lemmy.world
    link
    fedilink
    English
    arrow-up
    20
    ·
    12 hours ago

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

  • oneser@lemmy.zip
    link
    fedilink
    English
    arrow-up
    14
    ·
    12 hours ago

    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!

    • The Mop Lord@moplemmy.fyiOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      12 hours ago

      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.

  • ArborNode@lemmy.shutes.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    9 hours ago

    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!

  • fozid@lem.radiantfig.fyi
    link
    fedilink
    English
    arrow-up
    4
    ·
    12 hours ago

    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.

    • The Mop Lord@moplemmy.fyiOP
      link
      fedilink
      English
      arrow-up
      6
      ·
      12 hours ago

      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…

  • spaghettiwestern@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    11 hours ago

    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.

    • The Mop Lord@moplemmy.fyiOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 hours ago

      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.

      • Lka1988@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        10 hours ago

        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.