Home Web Server

Hey guys,

I am looking into host a web sever from home, it for a school project, have a domain. Just need to set up a server now, I will only be hosting it for a few months during the project. I mostly want to do it as a learning experience not to save the $11 for a host. It sounds fun to do, and a cool little project. So my plan is to host it off an old laptop as of now, not the best hard ware, but It should do fine for at most 10 users. worse case I will get a motherboard for my fx6350 and use it for the server since i want to get it up and running any way for random game servers.

What Linux distros should i consider? I use Arch as my daily driver on my personal laptop. I know it can do server stuff, but i want a more out of the box experience to start with. I was thinking about Ubuntu server, but the laptop I am currently using to host seems to hate it, cant get the usb to boot for ubuntu server works fine for everything else.

How safe is this idea, I have a really simple network I am worried about security, I would like to learn to secure the server, but don't want to have an extreme risk if and when I mess up to the rest of my networks data.

EDIT: I am just going get a host from 1&1 hosting, they have a year for $11 and a free domain. Going to set up a local server, do not want to deal with exposing home network, sounded like a fun idea to start, but not practical after research.

What model is the old laptop?

As far as distro goes since you only need it for a few months, you could look into Fedora Server or CentOS or since you are familer with it, use Arch with the LTS kernel.

It is a HP pavilion G7, i3 dual core, 6GB RAM 5400RPM hardrive.

Alright have seen a good bit about CentOS as far as servers, and will look into fedora server.

For the network, do you have a router that has a firewall or port forwarding available?

Yes, firewall and port forwarding

Then you're good. just forward the ports you need to your server once you have your server secured.

Alright Thanks for the information. Looking into CentOS now. It seems to hjave alot of walk thoughs on how to set up and secure the server more so than ubuntu server

No problem. Enjoy.

At $5/month a vps on digitalocean is an obscenely quick way to stand up a webserver without opening up your home environment.

Will look into if I feel like I need to, I may only have to have the server up for a few hours on the internet a month and just take it down when I am not using it. Will keep in mind thanks for the advice, kind of having fun setting it up so far, got Ubuntu server to work now the USB I had was bad. How unsafe do you think it would be to host it off my home network behind my routers firewall?

I think you are fine, I host my nextcloud behind it. I'd still enable the Linux firewall though.

Alright, I may still play with the idea, but I got a cheap host for like $11 from 1&1 now I am trying to get that to work since I have no idea what I am doing.

Hey sorry i know i said i solved it, but canceled it, wasnt what I wanted. Anyway would it be safer to put it in a DMZ or behind a firewall

Put it behind the firewall, port forward 80 and 443. As for the Linux server, make sure firewall-cmd has 80, 443, and 22 open. Do not port forward 22, if you want terminal access to your Linux server outside your home network, I would suggest to change the default port to something like 64625.

Thanks, will do, trying to pick a distro and learn what all i need to install now. big help on that, seen a lot of people say to put it out side of the network and let the linux firewall handle its self.

Putting it outside of the home intranet is also a good idea. Just don't DMZ it on the same network.

It really depends on what you are comfortable with.

As for the distro, I personally use a lot of CentOS because that is what I am comfortable with. Ubuntu server LTS is also a really good option.

I have a bit of a weird situation, I jumped into Linux as a hobby, so I went straight into arch (thought it would be fun and would teach me a lot) a month or so ago and have little experience with other distros so this is a bit of a challenge, using ubuntu server for now may try CentOS have heard a lot of great things. so far i got LAMP.

As long as you remembered to run mysql_secure_installation and never enable phpmyadmin, you should be mostly fine.

Oh boy, I was going to use phpmyadmin since i knew it from windows XAMPP. Thanks for letting me know that before I did