Hello, I want to convert my Windows or Linux computer (whichever is better) into a server, that is, use it as a host for my site, what exactly should I do? My question is this.
I want when the address
mysite.com can to load my website.
In fact, my computer fully plays the role of host.
The computer that I currently consider for this job has acceptable specifications;
Ram: 16
CPU: core i7 4460
gpu: radeon rx 550 ddr5
storage: SSD 500 GB
Thankful
I would recommend running Linux rather than Windows. Will that computer be a dedicated host or will you do other things on it as well? There are too many unknowns here to give you a good answer.
However, for hosting a single site on a dedicated server you can use this guide
You can do this on a virtual machine using a hypervisor like Virtual box or VmWare
You can of course use docker as well to setup a production server.
Either way you do it, you'll need to open the correct ports in your firewall and route them to your servers ip, then you need to update the dns of your domain to point to your server's ip address.
The ip that you receive from your ISP needs to be static and not dynamic. There are ways around that using dynamic dns software but that isn't a smooth ride.
@Tray2 It will be just one domain.
I will use it as a host.
I am determined to do it.
Yes, I have already prepared a fixed IP.
I don't know if this is important or not, but my home internet speed is currently 2 megabytes per second.
Because I live in Iran, hosting companies take the script I write for themselves and sell it with a slight change due to the lack of copyright law.
With this, no one can access the source code of my project
@johnDoe220 So you have a 20Mbit connection, or is it a 2Mbit connection?
Be aware that many ISP limit the upstream to just a fraction of the downstream, and it's the upstream that is very important. Either of the speeds 2Mbit or 20Mbit is a bit slow to host anything on, if the site gets big user wise.
@Tray2 I will only use this for one domain for now.
I have already prepared a domain.
The first link in your answer seems very interesting and useful, and now I am installing the Ubuntu virtual machine in Windows.
But the point is that there is no domain connection. It means that when I
mysite.com
I clicked and my site came up. It means loading the site with the domain taught here with the IP, but it is still very useful.
If it's a personal site, you could also just buy a cloud server. Digitalocean and hetzner have them for no money at all. Even if you prefer to use your own server, you can use a cloud server for practice. You only pay for the time it's running, so if you can delete it once you are done testing
If you want to run it yourself I also suggest Linux and I would go with Ubuntu as it has alot built in already. I would go with the server edition without a GUI (desktop)
@Sinnbeck There is no financial issue at all, I will pay whatever the cost is.
The main reason is that Iranian companies publish the source code easily and sell it in various ways. It has happened to me many times, but I don't make the mistake of buying from these companies anymore.
Due to the global embargo, it is not possible to buy from foreign services.
Anyway, I have to start my own home service.
Another challenge for me is connecting the domain
@johnDoe220 ah sorry to hear that. Didn't know. But yeah getting your hand on a domain and dns might be tricky.
Remember to forward all traffic on ports 80 and 443 to the server in your router. Without this it won't work. And I suggest using let's encrypt for certificates. It's free and very easy to set up
@johnDoe220 Port forwarding I cannot really guide you in as this comes down to which router you have. But most of the time the router has a page named "Port forwarding". Here you give it the port, and the local ip of the server
In regards to lets encrypt. Go to this page and fill out "My http website is running" (once you have set it up), and it will give you step by step instructions: https://certbot.eff.org/