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?

  • @[email protected]
    link
    fedilink
    91 year 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
      link
      21 year 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

      • @[email protected]
        link
        fedilink
        21 year 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.