OSDev.org
https://forum.osdev.org/

My own server
https://forum.osdev.org/viewtopic.php?f=11&t=37109
Page 1 of 1

Author:  PeterX [ Sat Aug 15, 2020 3:52 pm ]
Post subject:  My own server

I want to host my own server for the web, with some generic webpages and some webapp (Gogs) which I might even change a bit.
My current hosting treaty doesn't include that (no own webapps allowed).
Is it overkill (regarding work hours) to run my own server for that?
What is the cheapest technical solution for that?

Greetings
Peter

Author:  nexos [ Sat Aug 15, 2020 4:58 pm ]
Post subject:  Re: My own server

It would be a huge job to do that. I have set up home web severs my self, and it was a pain. Note that my experience is in Windows SBS 2011, but setting up an IIS web server involved
Setting a static IP address
Configuring a directory to put my files in, setting permissions, and other things of the like
Creating a new web page through IIS
Configuring port routing in my router's control panel
And then watching it take several minutes to load up a web page. This excludes finding a DNS routing service online to make a domain name. I imagine Linux plus Apache plus MySQL would be a lot harder. I recommend searching for a free web server that will do that. There out their! In fact, there is one at http://www.heliohost.org

Author:  Octocontrabass [ Sat Aug 15, 2020 6:21 pm ]
Post subject:  Re: My own server

nexos wrote:
I imagine Linux plus Apache plus MySQL would be a lot harder.

I set one up a while ago and it was pretty easy, although to be fair I didn't change much from the default configuration. I didn't even set up a static IP, since my router's port forwarding worked with host names. I think the hardest part was setting up SMB to let me drop files directly into /var/www from Windows.

Author:  PeterX [ Sat Aug 15, 2020 6:57 pm ]
Post subject:  Re: My own server

I once setup a LAMPP locally ( = on my PC, for testing purposes). It was quite easy. I think I don't need IIS.
But I want more than static webpages, so I will use Go (that's neccessary for Gogs) and probably CGI. So the normal hosting providers aren't working for me and I don't know how much extra work will be involved for that:
- I don't know how stable server software (like Apache or NGinx) is.
- And whether attacks are a serious thread for a little homepage.
- And I don't know if hosts, IP numbers, DNS etc. are a big deal. I am half-knowledged about such network/internet stuff.

I even have a book for administering Ubuntu Server from the library at hand.

GReetings
Peter

Author:  Octocontrabass [ Sat Aug 15, 2020 7:56 pm ]
Post subject:  Re: My own server

PeterX wrote:
- I don't know how stable server software (like Apache or NGinx) is.

Probably more stable than whatever Linux kernel you're using to run it.

PeterX wrote:
- And whether attacks are a serious thread for a little homepage.

There are bots constantly scanning the internet in search of known vulnerabilities and common misconfigurations to exploit. If you forget to update your software or make a mistake configuring it, your server will be compromised.

PeterX wrote:
- And I don't know if hosts, IP numbers, DNS etc. are a big deal. I am half-knowledged about such network/internet stuff.

You'll probably want to set up a dynamic DNS service so you can access your server over the internet without needing to memorize an IP address that will change periodically. The dynamic DNS service will require you to install a utility to keep the IP address up-to-date, but you may find that your router already has such a utility. (I didn't end up using the router for this, since I didn't know about it when I set it up...)

To pass traffic from the internet to your server, you need to set up port forwarding on your router. Depending on your router's capabilities, you may need to configure a static IP address on your server. In my case, the router was able to resolve host names, so I set up the server to use DHCP (which was the default) and told the router to forward HTTP and SSH traffic to its host name.

Author:  bzt [ Sun Aug 16, 2020 7:03 am ]
Post subject:  Re: My own server

PeterX wrote:
Is it overkill (regarding work hours) to run my own server for that?
It requires a bit experience, but that's the only sane solution for custom webapps. Having your own HW is not cheap and requires expertise, but you can also buy a VM in the cloud for a couple of quid.
PeterX wrote:
What is the cheapest technical solution for that?
Get a VM in the cloud with preinstalled Linux. All of the providers (like AWS, Azure, DigitalOcean etc.) provide cheap solutions with preinstalled, bootable Linux images. Once you get maintainer experience then you can install your own Linux, that's the best you can do, however I wouldn't recommend that for a beginner.

The things to be done are:
- buy a VM in the cloud / buy a HW and pay for a hosting provider
- buy a domain name and point it to your VM's IP (this should be cheap, ca. $10-50 per year)
- buy a certificate for your domain name (take a look at Let's Encrypt, that's the cheapest)
- install a very minimal system (or use a preinstalled image)
- install a webserver (apache, nginx etc., usually already part of the preinstalled images)
- install a CGI gateway to connect the webserver with your webapps (for example with nginx and php, use php-fpm; for apache install the appropriate module)
- install your webapps
- security, security, security (install and configure a firewall, keep installed packages up-to-date, remove all components that's not required by your webapp or the system, etc.)

Learning how to install Linux is not difficult. Learning how to install a minimalistic Linux is hard requires deep knowledge on the system (but it is essential to have a performant and secure server). Learning how to configure a webserver and CGI gateway is easy, there are lots of tutorials. The most complicated part is security, you'll need lots and lots of experience with that to get it right.

My advice: forget LAMP, and forget Windows. Use a BSD/Linux and learn how to configure your system. (IIS is a joke from security point of view, just like default LAMP configuration files.)

Cheers,
bzt

Author:  PeterX [ Sun Aug 16, 2020 8:51 am ]
Post subject:  Re: My own server

After considering it thoroughly, I have come to the conclusion, that it would be too much distraction and time waste.

I will stick to Gitlab and continue coding my OS.

Thanks to everyone for the help.

Greetings
Peter

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/