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.

all 40 comments

sorted by: hot top controversial new old
[–] 33 points 2 months ago

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

  • source
  • [–] 17 points 2 months ago (1 child)

    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!

  • source
  • hideshow 1 child comment
  • [–] 13 points 2 months ago* (3 children)

    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.

  • source
  • hideshow 3 child comments
  • [–] [S] 2 points 2 months ago (2 children)

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

  • source
  • parent
  • hideshow 2 child comments
  • [–] 5 points 2 months ago* (last edited 2 months ago) (1 child)

    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

  • source
  • parent
  • hideshow 1 child comment
  • [–] 10 points 2 months ago (1 child)

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

  • source
  • hideshow 1 child comment
  • [–] 6 points 2 months ago (5 children)

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

  • source
  • hideshow 5 child comments
  • [–] 11 points 2 months ago* (4 children)

    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.

  • source
  • parent
  • hideshow 4 child comments
  • [+] 3 points 2 months ago (2 children)
  • [–] 1 point 2 months ago

    I find the easiest way to think about it is kind of like email. You can have an account @gmail.com and still send mail to other servers @outlook.com. Your posts and comments will be stored on your local instance, as well as any instances that are subscribed to the community. When you post to a community on another instance, I think the text will be stored on both instances, but image uploads point back to the copy on your local instance.

  • source
  • parent
  • [–] 6 points 2 months ago

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

  • source
  • [–] 5 points 2 months ago

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

  • source
  • [–] 4 points 2 months ago* (3 children)

    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.

  • source
  • hideshow 3 child comments
  • [–] [S] 2 points 2 months ago (2 children)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 5 points 2 months 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.

  • source
  • parent
  • [–] 4 points 2 months ago

    Welcome fellow instance owner!

  • source
  • [–] 4 points 2 months 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!

  • source
  • [–] 4 points 2 months ago (1 child)

    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.

  • source
  • hideshow 1 child comment
  • [–] [S] 6 points 2 months 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...

  • source
  • parent
  • [–] 7 points 2 months ago (4 children)

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

  • source
  • hideshow 4 child comments
  • [–] [S] 5 points 2 months ago

    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?

  • source
  • parent
  • [–] 3 points 2 months ago

    Hahaha, I just setup my own lemmy instance last week and then my hardware crashed. RiP.

    I'll spool it back up when I have more ram and a reliable hard drive.

  • source
  • [–] 3 points 2 months ago

    I ignored all the email setup because I disabled signups anyway on my instance.

    For DNS on my home server I use ddclient. It supports a ton of different DNS providers, so you can have your server automatically update its DNS record as soon as your IP changes.

  • source
  • [–] 3 points 2 months ago

    Hey, hey, hey! Way to pull the trigger. Sounds like you're having a great time learning the ins and outs. I've never stood up a Lemmy instance, probably never will. But it's good to see you jumped right in with your ambitions. Best of luck.

  • source
  • [–] 3 points 2 months ago (2 children)
  • [–] 3 points 2 months 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.

  • source
  • [–] 2 points 2 months ago (2 children)

    Great job and thanks for the helpful and derailed post!

  • source
  • hideshow 2 child comments