Self-hosting: Difference between revisions
add difficulties and tips |
add blog link |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[File:Server rack interconnects work in progress - IMG 3473.jpg|thumb|Server rack interconnects work in progress]] | |||
When you host a web-based software on your own (self), it is called '''self-hosting'''. It could be a simple HTML website, a dynamic PHP blog, or a distributed social network. | When you host a web-based software on your own (self), it is called '''self-hosting'''. It could be a simple HTML website, a dynamic PHP blog, or a distributed social network. | ||
| Line 13: | Line 15: | ||
When you register a domain (say, fsci.in), you are automatically in charge of all subdomains (wiki.fsci.in, videos.fsci.in, meet.fsci.in, etc) and these do not require further registration with the registry. How do you configure these then? That's where '''DNS''' comes in. DNS allows you to specify which server your domains and subdomains should be connected to. | When you register a domain (say, fsci.in), you are automatically in charge of all subdomains (wiki.fsci.in, videos.fsci.in, meet.fsci.in, etc) and these do not require further registration with the registry. How do you configure these then? That's where '''DNS''' comes in. DNS allows you to specify which server your domains and subdomains should be connected to. | ||
<small>Note: You might already have seen the term DNS in your router or network settings. It's the same concept. The public/free DNS service you use on your computer is what your browser, etc will use to find out IP addresses of websites you want to visit. But even that DNS service needs to know how to answer a request for your domain. And therefore you need an "authoritative" DNS server which is configured with the right answer. This is often provided by the registrar themselves, but you can also have a service provider different from your registrar be your authoritative DNS server. DNS servers talk to each other. Therefore, even if you have a different DNS server on your router/network, it will eventually ask your authoritative DNS server for the answers.</small> | |||
You can, for example, have fsci.in pointed to 35.185.44.232 with a DNS 'A' record and have wiki.fsci.in pointed to 135.181.250.25 with another DNS 'A' record. That means, when someone types in fsci.in on their browser, the browser will connect to the IP address 35.185.44.232 which will connect it to a '''server''' on the internet with that particular IP address. And similarly when someone types in wiki.fsci.in the browser will connect to a different server, the one with the IP address 135.181.250.25. | You can, for example, have fsci.in pointed to 35.185.44.232 with a DNS 'A' record and have wiki.fsci.in pointed to 135.181.250.25 with another DNS 'A' record. That means, when someone types in fsci.in on their browser, the browser will connect to the IP address 35.185.44.232 which will connect it to a '''server''' on the internet with that particular IP address. And similarly when someone types in wiki.fsci.in the browser will connect to a different server, the one with the IP address 135.181.250.25. | ||
| Line 72: | Line 76: | ||
Although it has limitations in terms of personalization and dynamic features, several websites (including FSCI's website) run as static websites. These are easier to be made secure, can be easily hosted, can be optimized to load very fast, and has several other advantages. | Although it has limitations in terms of personalization and dynamic features, several websites (including FSCI's website) run as static websites. These are easier to be made secure, can be easily hosted, can be optimized to load very fast, and has several other advantages. | ||
=== Read documentation === | |||
Some people don't read. And then they make mistakes that they could have avoided if they had read the documentation. One could say that this is a design issue and that the person who did the documentation is to be blamed. But if you want to host services on your own, a mature approach would be to hold yourself accountable in reading documentation. Read documentation. Even if it is long. Even if it will take a long time. Even if you don't understand most of it. (Try to understand more about topics you don't understand). It will help. | |||
=== If you can read the code, you will be able to solve more problems === | === If you can read the code, you will be able to solve more problems === | ||
While good documentation is enough to deploy software, documentation is not always complete or correct. If you are able to read the source code you will be able to get an exact answer to various problems you come across. You might be able to spot bugs, report them, and even fix them! Since free software is a collective enterprise, your contribution in this way is welcome and encouraged! (Be mindful about the personal preferences of maintainers, though) | While good documentation is enough to deploy software, documentation is not always complete or correct. If you are able to read the source code you will be able to get an exact answer to various problems you come across. You might be able to spot bugs, report them, and even fix them! Since free software is a collective enterprise, your contribution in this way is welcome and encouraged! (Be mindful about the personal preferences of maintainers, though) | ||
=== LLMs are Stochastic Parrots === | |||
While LLMs are good at giving you guidance on things about which there is plenty of literature on the internet, many sysadmin tasks are very contextual to your setup (the state of your server and the peculiarities of the software you're dealing with). If you do not know what you're doing, using LLM can be dangerous as they can give generic answers which might not be the best for you. If you do know what you're doing, you probably will be using LLM like a search engine. | |||
== See Also == | |||
* [[Sysadmin roadmap]] | |||
== External Links == | |||
* [https://www.keithcirkel.co.uk/a-playbook-for-hosting-simple-services/ How I host websites] — blog post by Keith Cirkel, engineer at Mozilla | |||