How to do your own web hosting in 2022?

Short Answer (quick read):

The question “how to do your own web hosting” can be answered by taking a quick look at this system. So, here we go:

Below are the main guidelines:

  • Choose an Internet provider with the highest possible upload speed.
  • For self hosting, your computer must be left on 24 hours a day. To save on electricity costs, it is best to purchase the Raspberry Pi including a USB and memory card.
  • Choose Linux over the Windows operating system. Windows is way too slow. In addition, Windows always has to be restarted after an update and of course you don’t want your website to be offline often.
  • Look on Google which software you will need to turn your device into a web server and install it.
  • Install the necessary security software.
  • Get a static IP address.
  • Change the settings in your router.

Now you can host your own website!

Hosting at home? Or is this wonderful Cloud company a better alternative?

This is what one customer said about turn your PC into a web server:

“Switching from hosting at home to this company was the best decision of my life. It’s a lot cheaper, much faster and I finally got rid of my headache! Moreover, it’s a Cloud provider. This practically eliminates downtime. And, it’s the only web host in the world with a strict No Overselling Policy.”

30 Day Free Trial

PS. By the way, I use this Cloud Service myself on a daily basis and I love it!

Hopefully this summary was good enough to answer the question “how to make your own web hosting server“. However, we invite you to read on to learn everything about the details.

Long explanation.

Can I do my own web hosting?

This article highlights the desire often expressed by beginners and sometimes also by advanced users to host websites on their own PC at home. Read why this is not necessarily a good idea and what to consider if you want to do it anyway.

Reasons why people ask “can you do your own web hosting?”.

There are many reasons why you want to host website on your own PC. Arguments like these are often given:

  • It is easier than with a public web host because there is no need to constantly upload changed files
  • It costs nothing
  • You are familiar with your own PC and it’s easier than with a server located somewhere in a data center
  • You have complete freedom in the selection and configuration of the software components, you are, so to speak, your own boss
  • Do-it-yourself is exciting and fun
  • You don’t want to pay for web hosting

Little by little we will see that these assertions and assumptions are only partially correct; sometimes they are irrelevant or even wrong. Only the motive of DIY cannot be denied at all.

But I really don’t wanna pay for web hosting!

Okay, so you are still determined to run your own web server. Then let’s take a look at what is necessary for this. Maybe it looks a bit overwhelming at the start but, if you follow all the steps, you’ll notice that it’s easier than you might think.

Technical requirements for creating a web hosting server.

Windows or Linux or Apple?

You have selected a computer that will act as a server and I assume that it’s your own PC. Whether it is a Linux PC or an Apple computer is not so important. Basically, these 2 systems are more or less suitable for your project. Unfortunately there is a problem with Windows computers. This OS has to reboot from time to time because updates are due and it needs half an hour to process the update until it can be accessed again! So your website will be offline for approximately one hour per month or maybe even more!

Install web server software.

First, set up the necessary software for servers. You can ask Google about this. Do not forget, however, that a one-time installation of the web server and the software components involved is not enough! They should be kept up to date, especially if bugs or security holes come up.

Static IP address.

Make sure that your computer can be reached for inquiries from the Internet. Most Internet access providers dynamically assign the connected device (e.g. DSL modem or router) an IP address that is currently available. So you have to expect that this IP address can change at any time. Only a few providers offer a fixed, static IP address as an option. To avoid this problem, there are services such as, for example, or that reserve a fixed host name during registration which is often free of charge. That can be for example. Map this name to your currently valid IP address at any time. In order for the provider to know your current IP address, your router must report it every time it changes. This function is integrated in most DSL routers and must be provided with the correct data from your DNS provider once.

Router settings.

Finally, you have to make another setting in your router so that it forwards incoming connections on port 80 (standard port for HTTP) or 443 (typical for HTTPS) to the responsible computer in your local network. In DSL routers, this function is usually called port forwarding, and sometimes virtual server.

Upload speed.

Please also remember that the upstream bandwidth of your Internet connection is decisive for the web content that is retrieved from your server. With an ADSL connection, this is significantly lower than the downstream bandwidth advertised in the contract (the A in ADSL stands for asymmetrical). With a standard DSL 16000 connection, the upstream bandwidth is usually only around 1 Mbit / s or slightly more. Keep this in mind if, for example, you offer picture galleries with high quality photos, because this quickly results in transfer times of 5 – 10 s per picture!

Electricity consumption.

I mentioned already that the web server must be switched on 24 hours a day, 365 days a year. Have you also thought about the resulting electricity consumption? A typical PC needs around 30 – 100 W, depending on the equipment, even if it is only idle. An average power consumption of 50 W adds up to an impressive 438 kWh per year, which means electricity costs of over $200. Wouldn’t a cheap web hosting contract be cheaper after all?

Or are you considering an alternative hardware platform? A Raspberry Pi is available from around $50, depending on the model, and is completely sufficient in terms of performance. You don’t need a heavily used server with hundreds of accesses per second. A few accessories are also required (e.g. a 5V USB power supply unit and an SD memory card), but you can get by with an initial investment of around $75. The power consumption of a Raspberry Pi is only on the order of 5 W or even less. This reduces the annual electricity costs for this hobby remarkably, and compared to the PC solution, the purchase has already paid for itself in the first year. On top of that, another plus point: A Raspberry Pi does not need a fan due to its low power and therefore works silently.

How to make my PC as web hosting server: the security aspects.

Your web server is now running on the same PC with which you surf the web, deal with your daily correspondence, with which you may use online banking, on which you may archive private photos, perhaps even save passwords. Careless configuration of the web server, a security gap in the server software that has only recently become known, or poorly secured scripts could allow strangers to access your data from the Internet that you previously considered private. This risk can be significantly reduced if the web server does not run on your everyday PC, but on a separate computer. Maybe the Raspberry Pi after all?

You should also keep in mind that the web server is in your home network and not in a data center network with other public servers. If the web server is “hijacked”, an attacker can move around in your home network with possibly unprotected devices of interest to him. In a professional environment, servers that can be accessed from the Internet are sealed off from the internal network using measures such as a so-called demilitarized zone (DMZ).

How to setup a server for web hosting: your responsibility.

The fact that you are now using your own infrastructure to make content publicly accessible does not, of course, release you from the legal framework and obligations.

Remember that the legal status is independent of whether a website is operated by a professional web host or on a publicly accessible private PC. It is crucial that you are responsible for the content that you make publicly available.

Please also take a critical look at the “small print” of your Internet contract. Some access providers have a clause in their terms and conditions that the offering of server services on private connections is not permitted. As long as the usage is limited, there is no rational explanation for such a restriction, but it would be annoying if your provider terminated your access for violating this rule.

Your PC is now part of the internet. HTTP requests from all over the world land directly on your desk, so to speak. Be aware of the responsibility to ensure that such inquiries are answered in accordance with the rules and standards. For example, status code 200 “OK” as a response to a non-existent resource is not a rule-compliant response, even if the document provided indicates that the resource could not be found. 404 “Not Found” would be correct here. A search engine can now recognize that the resource does not exist and will eventually delete it from the index. Conversely, it is useful to send status code 503 “Service Unavailable” during maintenance work so that a search engine does not index the maintenance page provided instead of the real content.

How to setup your own server for web hosting – a conclusion.

Whether it is because of technical hurdles, the costs involved, or legal concerns – the best answer to the question “how to host my website on my own computer” is in most cases: “Don’t do it!”

If you do, you should be very familiar with the topic, you should be familiar with the authorization concept and the separation of programs from one another in your operating system, and ideally you should already have experience with the administration of a web server such as, for example, Apache. This can be done very well with a local server installation that cannot be accessed from the public network, but is only set up internally for test purposes.

If you are sure that you can rise to these challenges, you could possibly risk running your own web server. If you’re unsure then go for the best cheap web hosting company Linux Hosts Inc. as mentioned at the start of this article. Good luck!