For most personal projects, hosting on the cloud may be overkill, but tempting with its supposed ease of use and benefits of scale. Self-hosting is often overlooked as a solution with the benefit of simplicity and cost.

Interesting discussion and demonstration of self hosting the kinds of apps most personal projects will end being.

  • Sentient Loom@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    50
    arrow-down
    2
    ·
    8 months ago

    A VPS is also very expensive though. And shared hosting usually only allows HTML and PHP. So what’s the affordable alternative?

    • Orac@feddit.nl
      link
      fedilink
      arrow-up
      30
      arrow-down
      2
      ·
      edit-2
      8 months ago

      Personally I self-host on a raspberry pi. It took me a few weeks to setup, but it has been running without problems for almost 2 years now at practically no cost (beyond purchase and electricity).

    • MajorHavoc@programming.dev
      link
      fedilink
      arrow-up
      27
      arrow-down
      1
      ·
      8 months ago

      Great question. Here’s where I’ve landed:

      • For a surprising number of things, my previous desktop, running Linux, confined to my local network, is perfectly fine.
      • For a number of other things, a Raspberry Pi, with a dedicated disk image (ISO), confined to my local network, is fine.
      • Surprisingly often, a not-at-all-dynamic dynamic DNS solution gets the job done. I follow the first half of the DynDNS guide, and then hard code my preferred IP, and skip the rest. It’s inconvenient when my IP changes, but that happens a lot less often than most folks imagine. Most DNS providers have provided this to me for free after I bought my domain name from through them.
      • For my public personal portfolio, GitHub pages works fine.
      • For additional silly static sites, AWS S3 and AWS CDN get the job done for about $3 per month.
      • When I need to do public facing database stuff, I get a virtual private server, not from Amazon or Microsoft, who both way overcharge for small apps.
      • GreyEyedGhost@lemmy.ca
        link
        fedilink
        arrow-up
        6
        ·
        8 months ago

        I was surprised to find oracle’s offerings so economical for personal use. I set up a foundry server (TTRPG) and so far it hasn’t cost me a cent. Still not a fan of them or their CEO, but this is working for me.

    • William@lemmy.world
      link
      fedilink
      arrow-up
      14
      arrow-down
      2
      ·
      8 months ago

      I use nearlyfreespeech.net. They bill for usage, and since my site gets almost no hits and doesn’t take much storage, it’s ridiculously cheap. Much cheaper than even he $2.50.mo VPS listed in another comment. I just checked, and I spend an average of $.30/mo.

    • refalo@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      8 months ago

      expensive

      Highly disagree, but I realize expensiveness is subjective.

      What is your definition of not cloud? Does anyone else’s VM count? So linode or digitalocean for example would be acceptable, or no?

      I guess “alternative” is also subjective.

      • Sentient Loom@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        2
        ·
        8 months ago

        I’ve been looking for a place to host web apps in whatever language (Rust, Nim, or whatever) and framework I want, where I can use my own domains and multiple apps, and have sudo access. And I don’t want to pay $70/month for it. I gave up on that hunt (it might have been unrealistic), although I’ll be researching some of the alternatives offered in these comments.

        • refalo@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          8 months ago

          Oracle VMs have a perpetual free tier. Even AWS’s non-free tier starts around $3/mo, similar for buyvm/DigitalOcean/linode/etc. There are MANY options that are way cheaper than $70… unless I misunderstood your requirements.

        • Miaou@jlai.lu
          link
          fedilink
          arrow-up
          1
          ·
          8 months ago

          My ovh vps costs me 60€/y. Granted it’s low end specs. What would you need exactly?

  • haui@lemmy.giftedmc.com
    link
    fedilink
    arrow-up
    34
    arrow-down
    2
    ·
    8 months ago

    I selfhost for 2+ years and it is both a job and really cool. We‘re not at real consumer self hosting yet imo but we‘re close.

    My setup is around 50 docker containers on two servers. Important (offline) and security conscious stuff at home and fediverse services on a vps.

    I‘m currently working on object storage which is a lot of work but its fun and maybe will come in handy too.

    You can check my setup on github. Feel free to hit me up if you want to do it too or wanna discuss stuff. You can also see my matrix in my bio.

    Have a good one.

    • shastaxc@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      Do you have HA run I’ve been trying to think about how to get my stuff running with SSO. One stumbling block has veen Home Assistant’s apparent lack of support for it. Have to managed to find a solution to this? I’ve been thinking maybe I’ll set it behind a proxy like nginx and enforce SSO at that level instead but I’m not sure if it’ll work.

      • haui@lemmy.giftedmc.com
        link
        fedilink
        arrow-up
        2
        ·
        8 months ago

        I havent bothered yet but it has been a thing I thought about. I have vaultwarden and my logins are two clicks which is nothing compared to the work I had to put in. :D

        But yes, I think proxy level auth should work but dont take my word for it.

  • AwkwardLookMonkeyPuppet@lemmy.world
    link
    fedilink
    English
    arrow-up
    19
    arrow-down
    1
    ·
    8 months ago

    Is it over-engineered for you? Absolutely. For enterprise level applications that must ensure 100% up-time and have complex requirements? No

    • LeftEndDev@slrpnk.netOP
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      8 months ago

      Exactly. That’s the whole point of view of the video; for hobbyists and their personal projects, it is likely overkill.

      • platypus_plumba@lemmy.world
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        edit-2
        8 months ago

        Well, the title is click bait then.

        Title: “Linux is the worst!”

        Content: if your favorite software is Microsoft Excel.

  • ericjmorey@programming.dev
    link
    fedilink
    arrow-up
    14
    ·
    8 months ago

    It’s a shame that he didn’t do a writeup on this. It’s nice to have a video to demo the workflow, but it’s really annoying to go back to the video to get details to try it yourself.

      • ericjmorey@programming.dev
        link
        fedilink
        arrow-up
        4
        ·
        edit-2
        8 months ago

        That looks useful. Thanks for the pointer!

        Unfortunately, in this case I’m not interested in a summary. I already watched the video and would need to refer back to it for details, not general concepts.

        I’ll definitely use that site in the future though.

        Edit: looks like it’s not so good for long videos.

  • Remy Rose@lemmy.one
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    1
    ·
    8 months ago

    I would really like to mess around with self-hosting someday, but I live in a residential area and those sort of shenanigans are explicitly banned by my ISP. Is there anything someone in that position can do?

      • deegeese@sopuli.xyz
        link
        fedilink
        arrow-up
        31
        ·
        8 months ago

        It used to be extremely common as a way of forcing people onto more expensive “business” services.

        • LeftEndDev@slrpnk.netOP
          link
          fedilink
          arrow-up
          5
          ·
          8 months ago

          Wow that’s messed up. I guess the only recourse then would be to ask someone or some local business if you could setup the server there for a fee, but at that point just use a cloud service provider and it’s the same experience for about the same cost.

          • Remy Rose@lemmy.one
            link
            fedilink
            English
            arrow-up
            5
            ·
            8 months ago

            I was afraid that might be the case… Definitely pretty messed up, but with the state of ISPs around here it’s not surprising either. This guide is super awesome though, I’ll use it if I ever get a chance to!

        • Elise@beehaw.org
          link
          fedilink
          arrow-up
          2
          ·
          8 months ago

          That’s crazy… I once changed to a business plan to get more reliable support and it was actually cheaper.

    • Kuvwert@lemm.ee
      link
      fedilink
      arrow-up
      9
      ·
      edit-2
      8 months ago

      My local ISP is the same, no static ip without a business plan.

      So I use cloudflare tunnels now and they can pound sand

      Edit: tail scale funnels could also be a good option

      • Djtecha@lemm.ee
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        8 months ago

        Why do you need a static ip? For a business case I get it. But for most stuff… Dns is there for a reason.

        • Kuvwert@lemm.ee
          link
          fedilink
          arrow-up
          2
          ·
          8 months ago

          Because when my IP address changes all my websites stop point to the services. Unless I go and change the A record in my DNS every time that happens, which is frustrating and annoying. Cloud flare tunnels fixed that for me so that no matter what happens my domains are fixed to the local host services in my machine with no port forwarding and no DNS maintenance

          • nintendiator@feddit.cl
            link
            fedilink
            English
            arrow-up
            3
            ·
            8 months ago

            Because when my IP address changes all my websites stop point to the services

            Stuff like no-ip and dyndns exist for that specific usecase.

            • Djtecha@lemm.ee
              link
              fedilink
              arrow-up
              3
              ·
              8 months ago

              Exactly this. I’ve been using afraid dns for over a decade. Easy to setup and is basically instant.

          • Zagorath@aussie.zone
            link
            fedilink
            English
            arrow-up
            2
            ·
            8 months ago

            I have a static IP now, but I used to have a script in my cron that would update the IP address my Cloud Flare points to if it needed to. It was super easy.

    • atzanteol@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      8
      ·
      8 months ago

      How seriously do they take it? I’ve been self-hosting stuff for…well for a long time, and It’s been against my tos for almost all of it. The only issue I’ve had has been blocked outbound port 25.

      • Remy Rose@lemmy.one
        link
        fedilink
        English
        arrow-up
        4
        ·
        8 months ago

        That’s what I’ve been wondering, like can I just do it anyway? I have Verizon FiOS gigabit, for reference. If they really just don’t care then I don’t mind violating TOS at all, but I wasn’t sure if they do or not

        • atzanteol@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          7
          ·
          8 months ago

          “Maybe.” You’d have to try and see. I’ve mostly been on the cable networks so YMMV. The first issue would be if they block commonly used ports which should be fairly easy to test.

        • PeeOnYou [he/him]@lemmygrad.ml
          link
          fedilink
          arrow-up
          2
          ·
          8 months ago

          ive never heard of anyone even getting a warning about hosting anything on a residential connection… many isps have verbiage about not doing it, but i don’t think any of them actually care because generally your upstream on a residential connection are so low it doesn’t matter if you saturate it often

      • Djtecha@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        8 months ago

        Yea and no one should be hosting their own mail server anyway. Just a massive headache.

    • traches@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      5
      ·
      8 months ago

      If only you and your family are using a service it’s better not to open ports to the public internet anyway. Tailscale or another VPN will solve this nicely and your ISP won’t be able to tell aside from bandwidth usage

      • Remy Rose@lemmy.one
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 months ago

        I’ve heard of options to get around the lack of static IP, but will something like this also keep my ISP off my back about hosting? If so I’m onboard!

        • Geometrinen_Gepardi@sopuli.xyz
          link
          fedilink
          arrow-up
          2
          ·
          8 months ago

          Given that the domain of the site that you’ve made resolves to a Tailscale relay server IP, I don’t see how the ISP would get alerted. Unless you’re getting huge amounts of ingress traffic to your home IP.

    • shastaxc@lemm.ee
      link
      fedilink
      arrow-up
      3
      ·
      8 months ago

      You might wanna read that fine print again. I’m betting they only disallow self hosting for business purposes.

    • yeehaw@lemmy.ca
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      I run an opnsense firewall with dynamic DNS to cloudflare. I have owned a domain for decades and I have it point home. Recently I gave up inbound NAT. Now I just use wireguard. It’s performant and my phone automatically kicks it on it I’m off my Wi-Fi network. And I’ve significantly reduced my attack surface.

      • Remy Rose@lemmy.one
        link
        fedilink
        English
        arrow-up
        4
        ·
        8 months ago

        Pennsylvania, U.S.A. I hear it’s a fairly common policy here but does vary from provider to provider. As I understand it, most areas in the U.S. have at most 2 ISP companies to choose from, and many only have 1. So they can kinda set whatever BS policies they want.

        • Elise@beehaw.org
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          8 months ago

          Wtf isn’t that against freedom of expression big time? Didn’t expect the US as you guys are typically really strict on that.

  • onlinepersona@programming.dev
    link
    fedilink
    English
    arrow-up
    10
    ·
    8 months ago

    I just want something easy and painless for self-hosting, not wrangling tons of YAML to get an nginx proxy to point to the services I have to manually setup requiring more YAML and more hand-configuration. And then I still have to think about backups, and honeypots, and logs, and and and and.

    Of course companies don’t want to have to deal with that shit either. Plus they don’t want to have to host their own datacenter, worry about physical security, or network issues, or setting up physically in another country, and a bunch of other stuff. The cloud is supposed to be easier, but because there are so many customers with so many different usecases, shit becomes complicated.

    Anti Commercial-AI license

  • FiniteBanjo@lemmy.today
    link
    fedilink
    arrow-up
    9
    arrow-down
    2
    ·
    8 months ago

    I never liked the cloud from an efficiency and security standpoint. It’s just a physical location somewhere else, which causes problems.

  • cosmicrookie@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    8 months ago

    When you know something, it is tempting to tell others that it is easy. But it is not. I am no tech guy but i can install things like wordpress, webshops, forum etc on a webserver.

    I have been scratching the surface of self hosting an really having a hard time even getting started!

  • alyth@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    8 months ago

    I think this is an excellent video and I love the format of walking through a complete on-prem deployment.

    My only criticism is the attack on “the cloud” as a whole. You can choose your level of abstraction, from a computer in the cloud (like EC2) to managed services (like EB). Personally I don’t want to deal with hardware, so I use a Compute instance on Oracle cloud (free tier). The rest of my setup is similar to the author’s.