News for hackers. Stuff that matters.
Re:Self-Host Everything by crisnoble on Sunday February 17, 2013 @11:01AM (#5235546)
How would one go about self-hosting a website? I have shared hosting but would love the challenge of setting up a LAMP server that is physically in my possession and have full control over it.
Re:Self-Host Everything by yogo on Sunday February 17, 2013 @11:06AM (#5235566)
I'd say get a cheap VPS from a service like linode or digital ocean (there are many others listed on lowendbox.com but I would recommend sticking with the well-known/bigger providers) then take it from there. Most major distributions have tutorials in their wikis for setting up commonly used software--linode even has a community resources section with a lot of material for server software.

Edit: My comment was slanted towards linux and I forgot to mention that maybe some familiarity with linux would be useful, but windows is also an alternative (usually more expensive).

Re:Self-Host Everything by fiatpandas on Sunday February 17, 2013 @11:34AM (#5235646)
Pretty painless:

1. Get an old computer and plug into router

2. Install ubuntu server

3. Buy your domain from namecheap.com and look up their documentation on dynamic DNS (assuming you are on a home net connection

I did self hosting for years (age 16 - 24) with the same K6-II box. Just recently retired it and use a VPS now, but I highly recommend doing it to anyone

Re:Self-Host Everything by ams6110 on Sunday February 17, 2013 @12:39PM (#5235943)
4. Fight with your ISP who doesn't want you hosting services on a "home" internet connection.

Honestly this might work OK for a personal blog or something but is not a realistic approach to hosting anything with volume or for business purposes. Also you will still probably need to pay for SMTP service as there is almost no chance of anyone accepting mail from your self-hosted SMTP server when the reverse lookup resolves to an e.g. Comcast residential DHCP name.

Re:Self-Host Everything by fiatpandas on Sunday February 17, 2013 @01:22PM (#5236101)
Of course you aren't going to have access to outstanding bandwidth, but I've used it for business purposes for years. Whether or not you would want to use it for business depends on a number of factors, but I don't think you can flat-out say it isn't realistic for any business.

I've personally never had issues with my ISP blocking it, but I read accounts from time to time (in this thread for instance) where people had issues with ToS enforcement. You'll have to evaluate your own situation, or just give it a shot until they explicitly react.

But you are right about email- it's a pain. Most likely you will have a bad time trying to get something authentic-looking working with a home ISP. Even doing it on a legit VPS is fairly complex.

Re:Self-Host Everything by crisnoble on Sunday February 17, 2013 @11:37AM (#5235662)
I have steps 1 and 3 already, now its time to fire up ubuntu server.
Re:Self-Host Everything by fiatpandas on Sunday February 17, 2013 @11:57AM (#5235748)
Good to hear. The Ubuntu install process will eventually ask which services you want installed so just check off SSH, apache, mysql, etc
Re:Self-Host Everything by kordless on Sunday February 17, 2013 @11:06AM (#5235568)
If you have a spare computer laying around you could put Ubuntu server on it. The stack setup can be pretty easy for something like PHP or Django.
Re:Self-Host Everything by dhimes on Sunday February 17, 2013 @11:21AM (#5235615)
You'll probably be behind a dynamic ip, so go to dnsdynamic.org and set up your server to be "followed." (You set up a cron job to ping dnsdynamic.org periodically, and dnsdynamic.org updates its record of your ip. So you get to your server by going to myproject.dnsdynamic.com rather than myproject.com.) Set up your router so the only port(s) that is/are forwarded is/are to the port(s) you want to access (perhaps, ssh and http ports). Configure your ssh daemon to allow only private keys to log in (that is, turn off password 'logging in') and don't allow root logins.

Set up rkhunter and denyhosts.

Then, sit back and watch the logs as the attacks come in.

Re:Self-Host Everything by nwh on Sunday February 17, 2013 @11:26AM (#5235628)
Some ISP will assign you a static IP if you ask. I've never been turned down.
Re:Self-Host Everything by dhimes on Sunday February 17, 2013 @11:40AM (#5235671)
Good tip. My biz isp sells them for $30/month. I'd get a linode first.

But with rsync, dvcs (I use hg), and even davcal (which I turned off for some reason I've now forgotten- I just use Google), life is pretty sweet.

Re:Self-Host Everything by nwh on Sunday February 17, 2013 @12:05PM (#5235789)
Strange stuff. My current dirt-cheap residential connection assigned me a static address for no cost.
Re:Self-Host Everything by icebraining on Monday February 18, 2013 @10:01AM (#5238547)
Static address or dynamic-but-never-changes address?

My IP almost never changes (it's been the same for at least two years), but I still can't run an SMTP server off of it, since it's listed in Spamhaus' PBL[1], so many servers refuse my mail.

[1]: http://www.spamhaus.org/pbl/

Re:Self-Host Everything by nwh on Wednesday February 20, 2013 @04:09AM (#5249571)
Certainly static. My hostname is .static..com.au.
Re:Self-Host Everything by rz2k on Sunday February 17, 2013 @11:25AM (#5235622)
Linode has some excellent step by step guides on setting up a server.[1] You could also start with a virtual machine using those same guides.

[1] https://library.linode.com/lamp-guides

Re:Self-Host Everything by jdherman on Sunday February 17, 2013 @11:58AM (#5235756)
Second this, even if you don't use Linode, their docs are great.

If you're in it for more than just the learning experience, hosting at home will probably give you bad/unreliable upload speeds (assuming you have a typical ISP). A VPS service like Linode or others would give you basically the same learning experience with the added benefit of a good connection.

Re:Self-Host Everything by nwh on Sunday February 17, 2013 @11:25AM (#5235623)
Grab yourself a Raspberry Pi. You can set up a LAMP stack, and it'll even stand up to moderate abuse. Best of all, it's cheap.
Re:Self-Host Everything by crisnoble on Sunday February 17, 2013 @11:38AM (#5235666)
Do you have any links to tutorials on getting LAMP up and running on a Pi?
Re:Self-Host Everything by shurane on Tuesday February 19, 2013 @08:26PM (#5248391)
There's probably a boxen script for getting a lamp stack up and running on a lot of linux boxes:

https://github.com/boxen/our-boxen

It'll save you a lot of the configuration problems initially, until you're ready to configure.

Re:Self-Host Everything by nwh on Sunday February 17, 2013 @11:58AM (#5235753)
I've none that I know of personally, but a quick google shows an absolute tonne of tutorials. There's really no shortage of instruction when it comes to setting up a basic webserver.
Re:Self-Host Everything by michaelbuddy on Sunday February 17, 2013 @03:15PM (#5236547)
while part of me knows that a Pi will work, I feel like minimum for a home server really should be an intel NUC mini box.
Re:Self-Host Everything by nwh on Sunday February 17, 2013 @04:33PM (#5236813)
I've had a 450mHz G4 PowerMac running my local services for close to five years now. There's really not really a whole lot home server needs to be doing, CPU wise.