I am currently developing a website for a family member and I have basically no prior knowledge of web development. I am wondering what solutions there are for hosting a website, if I should host both front-end and back-end separately. I have messed around a bit with express and atm learning how react plays into web development. For this specific site, it is important that it is accessible through the domain name (already own one). This is less of a “what should I do” and more of a “how do you guys host your own sites” (as per the title). Please in your replies say how you have benefitted from your service. Thanks!
I develop websites using Next.js and typically use Vercel or Cloudflare for hosting, as both offer generous free tiers. I’ve also seen people use Netlify for hosting. There are many VPS providers as well, but the above three should be more than enough to get the job done, so there’s no need to look into VPS providers.
First of all, it depends on how you are going to build the website. Is it just a simple HTML page with some text or styling? If so, you can put it on GitHub Pages and link the domain to it.
If you want to create a (for example) WordPress site, you’ll need hosting with PHP support and a database and some storage.
- choose a hosting and domain provider: digitalOcean, Linode or Hetzner for hosting; one.com or Namecheap for domain)
- build and deploy your projects on server machine: you can use advanced techniques like Docker/Kubernetes/Jenkins, but it’s easier for you to just clone the repo on server side, install dependencies, build project and run on bare-metal.
- once your server is ok and your Nginx (or equivalent) is well hosting both BE and FE, you can then set up the domain to point to your server, eventually granting SSL certification for HTTPS (this process is different based on your architecture and providers, so search for dedicated tutorials or ask with as much detail as possible)
- open browser and write down or paste your domain.
@Nori
> build project and run on bare-metal
I think you mean a VPS (Virtual Private Server).
Bare-metal usually means a physical machine, which is way more expensive and less reliable for hosting a simple site because it will have some downtime every time the host needs to change the CPU fan or power supply or make any kind of maintenance on the host… So you need to have several of them, run a hypervisor like Proxmox or ESXi and then run virtual machines on them with high availability, at which point you’ve created a VPS and become a sysadmin in the process.
Apart from this nitpick, I completely agree with your approach: IMHO for a simple website it’s not much more complicated than all-in-one cloud solutions and you get a better idea of how things work.
@Davi
Mhmmm…dunno if it’s actually a mistake, but I’m using bare-metal in the last years as opposite of containerized (ie Docker/K8s). Of course most of the time you host on a virtual server, totally right.
@Nori
I double-checked because I thought maybe the meaning had shifted and I was actually completely wrong, but as far as I can see it still means a physical machine.
Davi said:
@Nori
I double-checked because I thought maybe the meaning had shifted and I was actually completely wrong, but as far as I can see it still means a physical machine.
But we can change the world!
Anyways…you get the point
I’ve been using Railway to get my front and backends set up in one place. Super easy to get going.
I’m mostly using VPS for hosting. But I have to look at other options like Vercel or Cloudflare.
Vercel, it’s got a free plan that works with most of my needs like portfolio and side projects, and you can have pre-created projects to help get you started. I only pay for my domain name basically.
I usually just get a domain from Porkbun and put the website on a VPS, but for clients, I sign them up to 20i, which provides a free domain email and limited free hosting if you get a domain with them.
I pay for a VPS at NixiHost. Host a few small .NET and Flask projects there.
Cloudflare Pages & Workers.
I just started a new project for a website a week ago for a client, and I’m using Next (which uses React), and deployed in about 3 minutes with Vercel.
As for swapping to a real domain, I’ll be doing that soon once I complete it. It’ll be replacing its existing domain.
If you want any help in React, I have a Slack channel you could come into and ask questions. I work in React and have been for a little over 3 years now
Hit me up if you’d like some advice on the code!
Vercel has been my go-to for hosting Next.js projects.
Cloudflare is free for static websites and also free for websites that need a server and don’t get a crazy amount of traffic. They also run their own infrastructure compared to other players like Vercel or Netlify who just sell AWS servers with perks on top that you don’t really need for your case.
Netlify / GitHub Pages for HTML/JS sites (Free), Interserver for WordPress and PHP sites. (Paid) $55/year.
Ok, I made one Flask Python website and after hours of searching, I found out about Render.com. It’s really nice if you don’t want to redeploy the website again and again frequently since it got low build pipeline minutes. It is simple in terms of deploying and hosting from your repo. It has 750 hours of instance time and 100GB bandwidth. Pretty good for a normal website with low loads.
I develop my own open-source hosting automation solution for a VPS: https://github.com/rkaw92/vpslite - it’s meant to do what you describe, and assumes you have a domain name to use. My target deployment platform is the cheapest VPS imaginable from each provider - tested it so far on OVH (EU) and Infomaniak (Swiss) cloud instances.