this post was submitted on 08 Sep 2025
118 points (96.1% liked)

Selfhosted

51358 readers
251 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

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.
top 50 comments
sorted by: hot top controversial new old
[–] neidu3@sh.itjust.works 32 points 4 days ago* (last edited 4 days ago) (3 children)

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.com 3 points 3 days ago (2 children)

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 4 points 3 days ago* (last edited 2 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.

[–] slate@sh.itjust.works 1 points 2 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.

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 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.

[–] WhyAUsername_1@lemmy.world 8 points 4 days ago* (last edited 4 days ago)

I think the missing piece is the website itself? The static HTML page generator?

Something like Hugo

[–] foremanguy92_@lemmy.ml 8 points 3 days ago

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

[–] 3abas@lemmy.world 5 points 3 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.

[–] artiman@piefed.social 12 points 3 days ago

Codeberg pages

[–] tkk13909@sopuli.xyz 33 points 4 days ago

GitLab has their own version of Pages

[–] jqubed@lemmy.world 31 points 4 days ago (1 children)

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

[–] smashing3606@feddit.online 35 points 4 days ago (1 children)
[–] dohpaz42@lemmy.world 6 points 4 days ago

Codeberg is not just for static websites. It’s for FOSS projects. Their FAQ addresses this.

[–] 6nk06@sh.itjust.works 17 points 4 days ago
[–] JackbyDev@programming.dev 7 points 3 days ago* (last edited 3 days ago) (1 children)

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.com 1 points 3 days ago (2 children)

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 😁

[–] JackbyDev@programming.dev 2 points 2 days ago

So long as your content is FLOSS, Codeberg Pages is a good choice perhaps. https://docs.codeberg.org/codeberg-pages/

[–] TomasEkeli@programming.dev 1 points 3 days ago

Sorry to say, but if you put it on the internet the AI bots are going to gobble it down.

Only way to protect it is to not put it on the public net. If you add a challenge (login or something) it might stay unmolested, but that's no longer a static site.

[–] communism@lemmy.ml 12 points 4 days ago

Codeberg Pages. Neocities.

[–] AnarchistArtificer@slrpnk.net 6 points 4 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.

[–] sorter_plainview@lemmy.today 10 points 4 days ago* (last edited 4 days ago) (2 children)

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 1 points 3 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.

load more comments (1 replies)
[–] csm10495@sh.itjust.works 10 points 4 days ago (2 children)

Something that may help:

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

[–] MadMadBunny@lemmy.ca 10 points 4 days ago (1 children)
[–] csm10495@sh.itjust.works 16 points 4 days ago (2 children)

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 7 points 4 days ago (3 children)

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.

load more comments (3 replies)
[–] MadMadBunny@lemmy.ca 2 points 4 days ago (1 children)

Github, acquired by Microsoft, is now forcing AI on its user base.

[–] iveseenthat@reddthat.com 2 points 3 days ago

That's one of my main drivers to stay away from GH

[–] iveseenthat@reddthat.com 2 points 3 days ago

I don't want to serve my work in silver plate to theis AI.

[–] K3can@lemmy.radio 6 points 4 days ago (1 children)

I'm guessing you want to selfhost, rather than use a hosting service?

When you say you have your site already, do you mean it's hosted on a local webserver, or just that you have the files?

If it's just the files, you'll need to choose a webserver. I like NGINX myself, but lighttpd is another option (there's quite a few options, really, but sticking to a well known option is generally more secure).

Configuration will depend on the server you choose, but then you'll put the files into three "root folder" used by the webserver. This isn't the system root ( '/' ), but a different folder specified as the root of your web page, usually '/var/www/html or /srv/www/html'.

Once the files are in place, you can test the site by using the web browser on another PC and entering the local IP address of the server. If everything looks good, you can set up port forwarding on your router to forward public port 80 to port 80 on the local server.

Lastly, you will need a DNS provider which will point your domain to the IP address of your router. Assuming you have residential service, you will need to determine whether your IP address is static or dynamic, or if your ISP is utilizing CGNAT. Depending on those factors, you may need to do some additional setup.

Once it is working, your next step will likely be to set up SSL and port forwarding on 443. That will allow your website to be accessed over https, which is the standard for the modern Internet.

I have hosted my own website and a blog for a while, and there are definitely some additional steps I would recommend to take, but the above is your basic starting point.

[–] iveseenthat@reddthat.com 1 points 3 days ago (1 children)

This is what I was looking for! I have the files and currently I am serving it locally with python -m http.server.

The part that I don't understand is how to make it available to the world.

How do I check the characteristics of my ISP? Do I just call them? I just use the internet in a shared setup, I am not the account owner.

To setup port forwarding, do I need access to my router, right? Coz these guys just "installed the box and left it there" I cannot login to it.

thanks!

[–] K3can@lemmy.radio 3 points 3 days ago

Python's webserver is meant to be a quick option for testing, and shouldn't be used for a publicly accessible website. You'll want a proper webserver for that.

You would need access to the router for the port forwarding, so if you can't access it, you'll need an alternative option. The next best option is a commercial reverse proxy, most commonly that's Cloudflare's "tunnel" product. Essentially, Cloudflare acts as a man-in-the-middle, forwarding from a public address directly to your local server. It's pretty easy to set up and it takes advantage of common router settings to open ports from the inside, where the router's firewall rules are typically quite lenient. This also works with CGNAT, so no need to figure that out. The downside is that Cloudflare gets access to all the data that passes through them, even passwords. So if your website happens to have a lot of sensitive data, you'll need to decide whether you trust them with that data. They do not get access to your normal web browsing or anything, just the data passing between the public address and your local server. Another potential downside is that they prohibit media streaming, so if your website serves a lot of videos, you'll want a different option.

Google Cloudflare tunnels homelab and cloudflared for more info. There's a bunch of YouTube videos and tutorials on setting it up. It's not perfect, but it's a free and easy way to selfhost from a limited network environment.

[–] friend_of_satan@lemmy.world 4 points 4 days ago
[–] meh@piefed.blahaj.zone 4 points 4 days ago

if you've already got something at home to run it on and want it easy to set up/maintain. take a look at mkdocs.

[–] fubarx@lemmy.world 5 points 4 days ago

AWS S3 lets you upload all content to a bucket, then mark it as a website. If usage is not too heavy, it can stay under the free tier.

But a favorite free one is Cloudflare pages: https://www.geeksforgeeks.org/techtips/deploying-static-website-to-cloudflare-pages/

You can keep your content on github, connect it to a CF page, and have it auto-update on push to github.

[–] medem@lemmy.wtf 4 points 4 days ago (1 children)
load more comments (1 replies)
[–] november@piefed.blahaj.zone 5 points 4 days ago (1 children)
[–] jeena@piefed.jeena.net 6 points 4 days ago

I also thought about it, but the custom domain feature only works on the $5 / month plan.

[–] S0UPernova@lemmy.world 2 points 3 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.

[–] hobbsc@lemmy.sdf.org 3 points 4 days ago

Your DNS provider may offer static hosting as a paid service. I'm using porkbun and their static hosting is pretty cheap, plus they handle SSL and whatnot for me.

[–] m33@lemmy.zip 3 points 4 days ago

You may look at SDF.org they provide shell accounts and hosting.

[–] thericofactor@sh.itjust.works 3 points 4 days ago

I think vercel (formerly zeit.co) has a free tier for static websites.

load more comments
view more: next ›