Currently I’m with lemmy.world, but if i wanted to create my own, to run at my house, would I need to register a domain? I like the idea of having my own domain but also don’t know how the storage works… like if I post to my own, sure it gets stored, but if I post to somewhere on lemmy.world, where does it get stored?

  • SJ_Zero@lemmy.fbxl.net
    link
    fedilink
    arrow-up
    7
    ·
    2 years ago

    I just set up a lemmy instance today.

    The first problem you’ll need to take care of if you were to host from home is to make sure you can be seen from the outside world. Some ISPs give you a 192.168.x.x address on your outside connection, that’s a problem. You also need access to whatever router you’re using so you can expose your server to the outside world.

    The second problem you need to take care of once you have a domain name is that most ISPs use dynamic addressing, meaning that you don’t have one IP address you just use. There’s two ways to solve this: The first is you can run a script that will automatically update the IP address in your registrar. If you’re using godaddy, there’s a really straightforward script in the wild that works great. The second thing you can do is pay extra with your ISP to have a static IP address so you can just set up your IP address once and be good.

    At this point, you probably want to open ports 80 and 443 in your firewall to the IP address of your server, and set up either a static IP address or assign an address to your server’s mac address.

    The third thing is you just need to install linux on your server machine. Trust me, linux is your best bet, and ubuntu 22.04 is probably the best bet of the best bet. You can use the server version, but you don’t need to.

    Next you need to install lemmy. You can install it using the instructions here:

    https://join-lemmy.org/docs/en/administration/from_scratch.html

    But I found that this version of the text is missing key steps regarding pict-rs:

    https://join--lemmy-org.translate.goog/docs/id/administration/from_scratch.html?_x_tr_sl=id&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=sc

    If you follow the instructions (and you need to read carefully because there’s steps you need to follow off-site, such as installing rust using rustup), then you end up with a working setup.

    So that’s the basics. One thing I did differently is I run tons of services using subdomains. I’ve got 1 primary webserver and 3 other servers running different services. I do this using something called a reverse proxy. If you pay for a domain, you can set it up so you can use a number of different subdomains, and then your web server can see you trying to connect to each subdomain and point it to a different place for each. In that way, you can host a bunch of services off of one domain.

    Hope this helps!

    • kman@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      re: Installing Lemmy, i saw this thread earlier https://lemmy.world/post/250499 that has a script which supposedly makes deploying easier. I haven’t used it myself though, and would probably want to do it all manually the first time

      • SJ_Zero@lemmy.fbxl.net
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        I had to go back a few times because I was being too clever for my own good and second guessed the instructions, and a few times that I was being too dumb for my own good and either skipped steps or got something totally wrong.

  • Packopus@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    2 years ago

    Hello! So I am just now tryinng to start the process of hosting my own instance just like you, but with a little bit of web development experience already. Trust me, it’s easy!

    So, assuming from the question, you have no idea where to start and have no experience. That’s ok! If you have experience, forgive me, but this can be used for others happening to search for the same thing.

    Background: A domain name is simply a human-readable name to an IP address. The IP address in this case is your “home address”. Take 1234 street north, PA 789039. That’s your “IP” to your “home address”. Your home address can be found at “whatsmyip.org”. This is your home’s IP address. Your domain name will point to this address when you want to host your own server. HOWEVER!!!, You can point this to someone else’s home address (a server you rent) and pay them to borrow their address so you can prevent people finding out who you are and where you live. That’s important! You don’t want people finding the open front door to your home and walking in and stealing your TV right? Same with your data.

    Ok so you know what the domain name does now. But that can be used for a lot of things. Your domain name is like a username. It can point to your home server, but it can point to Google for email. It can point to your rented server(s). It can point to whatever you want it to! So buying a domain is a powerful thing. But now, to do what you’re asking, which is to point to your home server and host your own Lemmy (or other federated software). You’d want to buy your domain (ie. Google domains, you buy “Desmondjones.com” and point that domain name to your home address 192.168.145.1) You can port forward (subdivide your home IP to a single protocol like https) to your server. (ie. 192.168.145.1:8080 to your internal LAN IP of your server)

    Your storage, services, and resources is based on the computer you are wanting to serve the data from. Every HTTPS request uses resources and can access your server (computer hosting the data). So your only limitations is what hardware you are installing the software on.

    Your post, on your own server, gets pushed to through the protocol to other servers that know about you. They make an http request and pull your post and copy it to their own server. This can be fast and microscopic in the terms of storage because it’s more of a copy, not a write to their own server. If that makes sense. So everything you post is replicated, but once you delete it on yours, it’s deleted on everyone’s. YOU store the data YOU create. You PULL the information OTHERS create. your storage of that info is temporary until that other user deletes their content. You can save it in your logs, but you won’t store all the information on your own instance.

    So to do this, buy the domain, point the DNS to your home IP, Use the port your server uses to host the data, and secure it through some sort of firewall, proxy (Cloudflare), or use a rented server (lenode.com) RECOMMENDED.

    I’d pay the $5 a month to host your instance on Lenode, and learn what not to do, before hosting it yourself and exposing yourself to A LOT OF RISK!!!

    As always, please play it safe, buy your domain (I have like 10 that don’t do anything. Like packopus.com) So I will be joining you in this journey on the fediverse to make more instances and host my own content. Good luck, I hope this helped.

  • bhj 🦥
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    2 years ago

    Yeah, you would need a domain. You would also need a server to run Lemmy. You can run it on any computer, many people use a RaspberryPi. A server in your home might not be easy to setup if you haven’t done anything like that before. Some cloud servers might offer an easy solution to do so but they aren’t usually free.

    Here’s the documentation for it: https://join-lemmy.org/docs/en/administration/administration.html

  • tallwookie@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 years ago

    it’d probably be easier to rent a VM w/ a few gb data transfer per month & then instantiate your own lemmy instance there.

  • Eddie@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    When setting up your own instance, make sure you use the easy auto setup script found here: https://lemmy.world/post/249889

    Was able to set up my own instance in a few minutes with little knowledge of setting up servers. Great place to start imo!

  • Eddie@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    When setting up your own instance, make sure you use the easy auto setup script found here: https://lemmy.world/post/249889

    Was able to set up my own instance in a few minutes with little knowledge of setting up servers. Great place to start imo!