5 ms·
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 possessio
by crisnoble 14y ago
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.
- yogo 14y agoI'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).
- kordless 14y agoIf 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.
- dhimes 14y agoYou'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.
- nwh 14y agoSome ISP will assign you a static IP if you ask. I've never been turned down.
- dhimes 14y agoGood 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.
- nwh 14y agoStrange stuff. My current dirt-cheap residential connection assigned me a static address for no cost.
- icebraining 14y agoStatic 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/ http://www.spamhaus.org/pbl/
- nwh 14y agoCertainly static. My hostname is .static..com.au.
- rz2k 14y agoLinode 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 https://library.linode.com/lamp-guides
- jdherman 14y agoSecond 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.
- nwh 14y agoGrab 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.
- crisnoble 14y agoDo you have any links to tutorials on getting LAMP up and running on a Pi?
- nwh 14y agoI'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.
- shurane 14y agoThere'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 https://github.com/boxen/our-boxen It'll save you a lot of the configuration problems initially, until you're ready to configure.
- michaelbuddy 14y agowhile 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.
- nwh 14y agoI'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.
- fiatpandas 14y agoPretty 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
- crisnoble 14y agoI have steps 1 and 3 already, now its time to fire up ubuntu server.
- fiatpandas 14y agoGood to hear. The Ubuntu install process will eventually ask which services you want installed so just check off SSH, apache, mysql, etc
- ams6110 14y ago4. 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.
- fiatpandas 14y agoOf 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.