Is there a good alternative to github pages? I need just a static website up.

  • I have a domain.
  • I have my site (local machine)
  • And that’s all I have.
  • I have a machine that could be running 24/7 too.
  • foremanguy@lemmy.ml
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    6 days ago

    If it’s purely static without the need to generate generate easily new page, simply use a web server.

  • 3abas@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    6 days ago

    If you don’t care about uptime, self host it on the local machine you have and expose it through free cloudflare tunnels.

  • JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    6 days ago

    You need to qualify this statement, GotHib Pages can mean like two or maybe more things. Do you mean free static site hosting? Do you mean easy static site generation from Markdown files?

    Edit: GotHib 😭 what a typo

    • iveseenthat@reddthat.comOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 days ago

      Hi, I have means to generate the html/css/js myself. I am indeed, serving them in my LAN (python -m http.server)

      I need help learning how to make it accessible from the web.

      I don’t mind hosting somewhere else, but I really wouldn’t like my work being an easy snack for some AI. That’s why I’m not inclined to use GotHib 😁

  • S0UPernova@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    I use nginx you can have configs for different sites and have the server_name have the domain for each server block (I use a file per site) and you can either do static via a root folder, or proxy_pass for active running servers, and nginx will map the domains to the server blocks you should also have a default, and you can then have multiple domains point to the same ip address, but keep in mind that home internet often has a dynamic ip, so you may need to update it every so often. There is a service to help with the dynamic ip I think noip.com has a solution available, but feel free to look around.

  • neidu3@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    32
    ·
    edit-2
    7 days ago

    Ok, so I must’ve misunderstood the question, because to me it seems OP already has all the necessary ingredients to bake this dish. And yet, the vast majority of comments recommend various 3rd party services which is the complete opposite of selhosting.
    Fire up nginx/apache2, and all good, no? What am I missing?

    • iveseenthat@reddthat.comOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      6 days ago

      Hi, thanks for the comment. I have the page. But I don’t know how to make the page accessible from the web.

      I have a router at home that my ISP provided (I cannot even login to it) which provides WiFi and have a couple of Ethernet ports.

      I don’t know if it is possible to make my page available to the world from behind this soho

      • neidu3@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        6 days ago

        Are you able to ask your ISP customer service to set up port forwarding for you?

        At minimal you want HTTP (Port 80) but you probably want HTTPS (443) as well. If you’re hosting DNS as well you will need port 53 too.

        Have those ports routed to the “inside” IP of the machine you want to use, and the rest of it is basically just setting up the webserver (and possibly DNS) to serve your domain.

        NB: While on the phone with your ISP, ask them what the DHCP lease time is. Ideally you want a static IP for your setup.

      • Zos_Kia@lemmynsfw.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 days ago

        I honestly wouldn’t recommend it if you don’t have a minimum of security knowledge. The moment your home server pops up with a domain name it will get scanned by shady actors and possibly exploited.

      • slate@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 days ago

        A reverse proxy from somewhere like Cloudflare would allow you to host without any router config. Plus, it’d give a little more protection against bots, but it’s not going to block 100% of them.

    • LifeInMultipleChoice@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      ·
      7 days ago

      I was confused when I read it as well, at least I know now that I wasn’t alone. I think the next step is just opening a text editor and starting with <html></html> Forward a couple ports, maybe use caddy to route the port internally but it isn’t needed. Although if you use NOIP with Caddy getting the https cert setup seems to be pretty easy.

  • jqubed@lemmy.world
    link
    fedilink
    English
    arrow-up
    32
    arrow-down
    1
    ·
    8 days ago

    There’s actually a surprising amount of free static website hosting out there. Besides GitHub, GitLab, Cloudflare, and Netlify come to mind offhand.

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

          There is zero question about it. It will be absolutely fine for some dude’s static website over a residential internet connection.

            • atzanteol@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              3
              ·
              edit-2
              7 days ago

              Same? HTTP/1.1 ran the entire internet for 20 years and is used by a ton of sites. It’s fine for a personal website.

              • Rowan Thorpe@lemmy.ml
                link
                fedilink
                English
                arrow-up
                1
                ·
                edit-2
                6 days ago

                Although I agree with the implied sentiment that “the Perfect is the enemy of the Good Enough” (especially for low-profile personal web-presence) and that naval-gazing about protocols can become a counterproductive rabbit-hole, sometimes it can also be risky to oversimplify in the other direction without at least parenthesizing the caveats too. For example this “HTTP/1.1 must die” site points out how desync attacks make HTTP/1.1 robustness a bit of a game of Whack-a-Mole. For certain sites (even some personal sites) this can occasionally matter.

  • sorter_plainview@lemmy.today
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    1
    ·
    edit-2
    7 days ago

    Hosting site in your local machine is tricky. It depends on how your ISP configured your network and most of the time you will be under CGNAT. Which means you will not have a unique public IP, but a shared one. Similarly your IP will be dynamic which will need additional configurations. Nowadays it is very difficult to host a site on local machine directly.

    Edit: Checkout if your ISP provide unique IPv6 for your machine. This will not have issues of CGNAT, but you will have to setup DynamicDNS (DDNS) to accomate the changes in IP.

    Edit: If there is CGNAT and you don’t have IPv6, then you need ‘NAT Hole Punching’. Usually services like Tailscale, ZeroTier, Amnezia, Innernet, v2ray, etc. are needed for that.

    One thing you can try is Tailscale Funnel. Fair warning, bending your head around functioning of Tailscale is not trivial, and you will have to spend some time to properly understand and set it up.

    If you prefer a simpler route, free hosting of a static site is your best bet.

    Netlify is the go to solution if you are familiar with Git. I used to have my portfolio up there. Another option is, as you mentioned, Github Pages.

    Vercel is the another common one people use. But it might be a little more tricky to get it working, because it focus on front end framework like Next.js.

    Checkout Cloudflare Pages too. Very much similar to GitHub Pages, but with the performance and reliability of Cloudflare.

    Heroku is another thing people used in the past. I think the free tier got limited nowadays.

    Good luck with your adventures.

    • BootLoop@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 days ago

      Depends on your ISP. In my case my IP hasn’t changed in the two years I’ve been with them so it was easy as setting up port forwarding in my router. Took a minute or two.

    • littleomid@feddit.org
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      2
      ·
      edit-2
      7 days ago

      It’s not “very difficult” to self host. Arguably it’s one of the easier public things to self host. Takes an inexperienced IT enthusiast maybe 2 hours to setup. As for CGNAT, I am very happy that it was not a thing with my past and current ISPs. That would complicate things further of course.

  • csm10495@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    10
    ·
    8 days ago

    Something that may help:

    Why doesn’t GitHub Pages fit your use case? It’s nice to get free static hosting from them.

      • csm10495@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        18
        arrow-down
        2
        ·
        7 days ago

        In what way? Anything on the public internet is likely being used for AI training. I guess by using free GitHub you can’t object to training.

        Then again anywhere you host you sort of run into the same problem. You can use robots.txt, but things don’t have to listen to it.

        • jqubed@lemmy.world
          link
          fedilink
          English
          arrow-up
          7
          ·
          7 days ago

          Self-hosting there are some ways to fight back, or depending on your opinions on Cloudflare it seems they’re fairly effective at blocking the AI crawlers.

          • AmbiguousProps@lemmy.today
            link
            fedilink
            English
            arrow-up
            3
            arrow-down
            1
            ·
            7 days ago

            Yep, on top of simply blocking, if you’re self hosting or using cloudflare, you can enable AI tarpits.

            • iveseenthat@reddthat.comOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              6 days ago

              How do I do this? I don’t mind (and may prefer) to host not at home. My main concern with GH is that you become an AI snack whether you like it or not.

              • AmbiguousProps@lemmy.today
                link
                fedilink
                English
                arrow-up
                1
                ·
                edit-2
                6 days ago

                Which part? If you’re wanting to use cloudflare pages, it’s relatively straightforward. You can follow this and get up & running pretty quickly: https://www.hongkiat.com/blog/host-static-website-cloudflare-pages/

                If you’re asking about the tarpits, there’s two ways (generally) to accomplish that. Even if you don’t use cloudflare pages to host your site directly (if you use nginx on your server, for example), you can still enable AI tarpits for your entire domain, so long as you use cloudflare for your DNS provider. If you use pages, the setup is mostly the same: https://blog.cloudflare.com/ai-labyrinth/#how-to-use-ai-labyrinth-to-stop-ai-crawlers

                If you want to do it all locally, you could instead setup iocaine or nepenthes which are both self hosted and can integrate with various webserver software. Obviously, cloudflare’s tarpits are stupid simple to setup compared to these, but these give you greater control of exactly how you’re poisoning the well and trapping crawlers.

  • AnarchistArtificer@slrpnk.net
    link
    fedilink
    English
    arrow-up
    6
    ·
    7 days ago

    I recently used Jekyll (https://jekyllrb.com/) as a static site generator. I found it easy to use. I personally used Gitlab pages, because I didn’t feel confident hosting on my home internet (didn’t want to inadvertently cause issues for my housemates when I’m still learning this stuff).

    The nice thing about static sites is that it’s pretty easy to find free or extremely cheap hosting for them.