Anyone run their own web server?

Soldato
Joined
6 Mar 2008
Posts
10,079
Location
Stoke area
Hi,

I'm doing a lot of freelance work editing photos for others and I've been considering moving away from Dropbox as a method for transferring files and just turning one of my spare PC's into a web server.

Host my own photography sites on there as well as using it for developing (python etc).

How hard is to to set up and maintain?

Everywhere seems to be pushing Ubuntu Linux as the OS to use, but my Linux skills are extremely basic. How hard is it to keep it secure?

Thanks
 
Associate
Joined
18 Sep 2003
Posts
903
You're probably better off just buying some hosting. Hosting your own server at home is going to have a lot of drawbacks:

- Although it will be fast for you to transfer files onto the server, it will be slow for anyone else to download from it, because the upstream speed of your internet connection is probably quite low.

- Although you plan to reuse an old PC, there will still be costs. You will need a static IP address, and your ISP will probably charge you for this, and there is the electricity cost of having it running 24/7.

- It's not going to be very reliable, especially as you plan to use an old PC.

- You'll be responsible for not just security but also backups

Instead, you can just buy some hosting for as little as £1 a month and then you don't need to worry about security (apart from within your own code) or maintenance.

If you're dead set on having your own server, you could consider getting a hosted dedicated server. AWS will give you one for free for one year, and you can choose for that to be a Windows server if you'd like.

But as for your original question, installing Ubuntu or other Linux distributions is pretty easy. There's a graphical wizard that guides you through it and you just answer questions as you would with Windows. Setting up things like the web server (usually Apache) is not quite so easy, since it involves editing configuration files and using the command line.

Updates are important for security and Ubuntu and other Linux distributions have software built in that's similar to Windows Update. You just run it and tell it to update and it automatically downloads and installs the updates. But then just as with Windows Update, there's always the risk when you run it of something breaking.

You can of course also make your server insecure in a number of ways, like badly configuring it, having badly written scripts, weak passwords and so on.
 
Soldato
OP
Joined
6 Mar 2008
Posts
10,079
Location
Stoke area
Pretty certain I have a static IP address with Sky already and it's a spare PC (i5-4570s @ 2.9GHz, 4GB ram + 80GB SSD), so not quite old :)

Backups aren't an issue, i'm used to it anyway as I backup our works department server weekly.

Upload might be as its between 1-2MB/s.

I have two of the i5's but one's not got a HDD so might find a cheap 40GB one to run it from + a couple of TB HDD's I have, install Linux and have a go at it. Use it internally as well then to store music etc on and create a backup server for the family and business photos.

My main concern is, if Linux will even run on it. They are some DELL office machines that require custom drivers to run, even Windows doesn't run right straight out of the box with it... could be a learning experience!
 
Associate
Joined
2 May 2012
Posts
565
Location
/dev/null
if your concerned about driver issues try a liveCD first, ive never had a problem with a desktop running linux since the pentium 4 days (which had weird custom motherboards from MESH)

running a simple webserver is easy, since you will have physical access to it you dont even need to worry about remote management, you can have a simple apache box up and running in no time,
 
Soldato
Joined
17 Jun 2012
Posts
11,259
Remember that you can download at a huge speed but your upload speed becomes a users download speed who connect to your server, which is a lot less than your upload speed, that's the big drawback, mind you you can get up to 12mbs for virgin, so that's 12/8(8 bits in a byte) 1.5 MB sec upload/download. That's actually the old T1 line speed, back in the day.

You can do the maths, that's not too shabby if not many connecting, but as soon it hits the max load then obvioulsy things will grind to a halt.

Also probably most ISP's won't be too happy at you running a web server unless you buy a business account, and also all ISP's cut your speed after excessive usage for a few hours.

As said you can get some good deals out there in the cloud.

As for setting it up, very easy, try XAMPP, that will install Apache, and a few other optional things like php, mysql...

Then it's a case of fiddling with some config settings to secure the server, change all default passwords, if using a database/php secure for sql injection, cross site scripting and plenty of other hacks.
 
Last edited:
Man of Honour
Joined
13 Oct 2006
Posts
92,055
I used to use a "throw away" linux vps for that kind of thing (just images) - using a light weight web server (i.e. httpd).

Cheap and cheerful way to do it.
 
Soldato
Joined
19 Jun 2009
Posts
3,915
PlusNet don't care if you host from home.

could be a learning experience!

This is key bit, you will learn about router settings and hosting software. It's not that difficult just all the stages / steps to get everything working.
 
Last edited:
Soldato
Joined
17 Oct 2002
Posts
3,103
just turning one of my spare PC's into a web server.
You're probably better off just buying some hosting.
I agree with this
Host my own photography sites on there as well as using it for developing (python etc).
If you want to host python sites you are probably going to need to look into using nginx as a reverse proxy.
How hard is to to set up and maintain?
If you have experience with linux, networking and administration it's ok
You can learn a lot from hosting your own sites etc but if you have little linux cli experience I wouldn't bother.

I host sites, email, webapps etc on VPS servers (with offsite/cloud backup).
website/app examples: python(flask)+nginx+naxsi, nodejs(express+lusca)+nginx+naxsi, nginx+php5-fpm+naxsi

I'm using debian.

I have been using linux since 1997 tho and have worked in linux administration since around 2000. Also had been using hosting like tsohost etc previously for hosting php based sites with my own security modules.

I originally setup a vps to learn a bit more about web hosting, reverse proxies, waf, etc ...

There are probably some turnkey scripts or distro's you could use to get a server up and running but when it falls over or gets rooted you will probably have no idea why or how to fix it as you wouldn't have learned enough about the implementation/configuration :(
 
Back
Top Bottom