Should I host my own instance if I don't intend to run a community?

https://lemmy.world/post/98499

Should I host my own instance if I don't intend to run a community? - Lemmy.world

Is there any benefit to host my own instance?

I think it's a matter of personal preference.

I've been running my own Mastodon instance for several months now, and I've enjoyed it. I don't have to rely on someone else, either, which is nice. I'm in control of everything on that instance.

As for Lemmy, I just started my own instance today, and am currently writing you from it. What made me decide to setup my own instance was some performance issues I was seeing with Lemmy.world, although that might have been an UI problem. Anyway, I enjoy doing this stuff, so I'm running my own instance for the sake of doing it.

On the flip side, it's more expensive and time consuming, and I'm the one who has to worry about backing up data, etc. Like I said, though, I enjoy doing it, so it's no big deal.

Can you tell me a bit about the process you went through to create your own instance? I'd like to make one myself.

You're talking about Lemmy, right?

I provisioned an Ubuntu 22.02 server at Linode. I chose their 2 GB Shared CPU instance type. Once I configured the server to my liking, I ran through the Lemmy-Ansible instructions. (They have other methods, so check the documentation.)

Essentially, you install Ansible on your workstation. I'm on macOS and installed it via Homebrew. You then download their git repository, create the necessary configuration files, and then have Ansible configure the server. It was fairly simple.

GitHub - LemmyNet/lemmy-ansible: A docker deploy for ansible

A docker deploy for ansible. Contribute to LemmyNet/lemmy-ansible development by creating an account on GitHub.

GitHub
I may go that route. I was wanting to host my own server but I feel like it would be easier to just use a cloud server

I have a lab at home and do host some stuff for myself from there in a small DMZ (ie: Miniflux RSS readers, Plex through Reverse proxy etc).

But I used a linode for my lemmy/kbin stuff. Reason being is that the code is fairly new and there may be exploits bugs and

  • I dont want to deal with my ISP made an instance is exploited and becomes some type of C2 box or spews out spam. Kbin specifically already has PRs to fix XSS and Sql injection stuff, the former of which is usually avoidable if you just follow some pretty basic principles. So its a concern.

  • Linode has better bandwidth than my non-symmetrical ISP uplink and is on its own quota.

  • It sounds like linode is the way to go then and their prices seem reasonable. The funny thing is I've heard of linode before because Computer Clan uses it as a sponsor, but ever since I started using sponsor block I haven't really heard about it. I didn't actually know what they did.

    I’ve run linodes for years. My blog runs on them. I still host a variety of other services on them. They are good for everything from gaming servers to a blog etc.

    They did get bought out by akamai a while back. And have raised their prices but they are still solid.

    Nanodes are awesome deals frankly.

    Is the 2GB the one you use for your Lemmy server? I'm getting ready to purchase one to see if I can figure it out.

    Im currently on the 4GB dedicated. However heres an htop of it.

    https://imgur.com/a/NpEsw4t

    I am currently the only user. Im considering opening it up to limited users but not really having communities once i get a lot of the instances cached and indexable.

    Others are running on a 2GB shared just fine. I will likely move to that if i choose to keep it solo for sure, or under 100 users and no communities.

    I dont have the time to really moderate others or content on the instance. So i dont think I plan to host any communities at all. I do wish you could federate/sync specific communities to your instance to make searching/subscribing easier.

    That's exactly what I'm wanting to do. Just have myself and maybe a few others with limited communities. Would you recommend using ansible to setup a Lemmy on Linode?

    Yes the ansible config worked fine for me.

    I have yet to get email working but otherwise its solid. Linode will block email btw if you account is new (and frankly may be blocking mine now). You just have to put in a case and justify and it should be fine. My account should be old enough to be exempt but I will likely do it anyhow. Their support is pretty good.

    Getting federation crawled and communities added is a bit slow. Mostly because the other instances are a bit slow.

    A few pointers if you havent done admin yet.

  • Put nothing in the federation allow list unless you want to go whitelist only. Over time as other instances hit yours and you search others, the linked list of instances will grow.

  • Searching for instances seems to be CPU heavy on mine. Its not a problem though. You just cant simply plug in a URL of a community in another instance if you havent linked. You will get a 404 if you do. So you have to go to search, looking for that community by hitting search a few times until it shows up, then you can join and it will start crawling

  • Thank you for the information. I've signed up for a 2GB shared linode and it's running Debian 11. I assume I need to ssh into it, then run the ansible stuff. I have very basic knowledge of Linux and command line. I am not entirely sure how to fill out the config but I will cross that bridge when I come to it.

    Yeah how familiar are you with linux?

    You dont run the ansible stuff on the instance itself. You do it from your personal machine or something with ansible installed.

    Though I guess in theory you could run it on itself.

    But I am happy to walk you though the basics of setting up a securing the box.

    I'm not super familiar with Linux, I've installed it on machines in the past, I know some very basic command line stuff. I've done raspberry pi stuff. I have a mini PC running Ubuntu right now that I am not using for anything so I can use that to run ansible. I probably won't be able to work on it until after this weekend but once I get an moment to set down and do it I will shoot you a message if I have any questions. I really appreciate your help and I am excited to be a part of the fediverse.

    that would be perfect.

    WIth Debian I would install UFW for a firewall. Set SSH to whatever your home IP is. You can always use the Linode SSH console for external access.

    UFW is easy to configure and just translates iptables.

    sudo ufw allow from any to any port 80 proto tcp sudo ufw allow from any to any port 443 proto tcp sudo ufw allow from HOMEIP to any port 22 tcp

    If you want leave SSH open. Then i would probably only do Key based auth in /etc/ssh/sshd_config

    you also want to edit that file (sshd_config) to disable root access once setup. I often turn on the following

    LoginGraceTime 2m PermitRootLogin no StrictModes yes MaxAuthTries 6 MaxSessions 10 AllowGroups somegroupname

    then create a user and a group and add the user to the group. This ensures only that user has SSH access.

    sudo adduser someusername sudo addgroup somegroupname sudo usermod -aG somegroupname someusername

    You can also use visudo to edit sudoers. The first like will require a password. If you use the second line, you can sudo without a password. I would only do the latter if you only use key-based auth though.

    someuser ALL=(ALL:ALL) ALL someuser ALL=(ALL) NOPASSWD: ALL

    I also edit /etc/hostname to my server name. Update and reboot. From there run through ansible instructions and make edits as necessary.