Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Home server via laptop?  (Read 820 times)

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Home server via laptop?
« on: December 30, 2013, 06:21:56 am »

Hello!

My sister recently bought a new laptop, and her old, cheap, feeble netbook lies unused and unloved. I have been wanting to have a server to play with. The obvious solution is to install Linux or something on the netbook and plug it perpetually!

But I wonder if this is feasible. Presumably it would use electricity continuously. And being a netbook, it might not have enough ram or processing power to act as a good server.  So, would the electricity bills be too prohibitive to leave it always on?

Second, would having a home server that port-forwards 80 and a few others be a security threat to my desktop and other internet-using devices?

Third, what kind of Linux is recommended for servers or newbies to Linux? :D I want Linux just because this might be a good opportunity to get used to its scaaaary environment. Thusfar I've only used it for light coding and Perl scripting in a virtual box. Nothing fancy.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

LordSlowpoke

  • Bay Watcher
    • View Profile
Re: Home server via laptop?
« Reply #1 on: December 30, 2013, 06:43:48 am »

Oh ho ho~

You want a server! Godspeed. Linux doesn't actually use many resources, at least the variants you will want to use, you'd have to be worried about Apache flipping out or your hard drive not keeping up if you somehow get to the point where stuff is getting strained.

I don't know how much electricity actually costs in Korea. Note that it would have to be on all day, all night, since people from ~all over the wooooorld~ will want to access the cute things stuff you are hosting. which will invariably include cute things in it, all things considered, why'd i cross that out

Security threats...? No, because you will want to separate the netbook from the network at large. Give it another subnet if your hardware allows it and you're golden! Doesn't mean you shouldn't at least try to implement some quality security, though.

Regarding what distro you should be using, I... guess you could try Ubuntu? It's pretty friendly, although the friendlier the interface is the less resources you will have for your server shenanigans. Mint's a pretty popular entry level distro based off of Ubuntu.

Once you're comfortable with terminal stuff, feel free to switch to CentOS or Mandriva.
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: Home server via laptop?
« Reply #2 on: December 31, 2013, 09:42:04 pm »

Now I'm worried it's running too hot. The CPU core temps are 61 and 65 degrees C, and the case temperature seems to be 77 degrees C. S:
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

foil

  • Bay Watcher
  • Yarr!
    • View Profile
Re: Home server via laptop?
« Reply #3 on: January 01, 2014, 01:32:55 am »

Does the thing have a turbo button?  I have an old laptop i use for server that i need to keep in low power mode the turbo button puts it in.

It might be worth propping the thing up on a dvd case too if it has airvents on the bottom.
Logged

Remuthra

  • Bay Watcher
  • I live once more...
    • View Profile
Re: Home server via laptop?
« Reply #4 on: January 01, 2014, 01:36:43 am »

Hello!

My sister recently bought a new laptop, and her old, cheap, feeble netbook lies unused and unloved. I have been wanting to have a server to play with. The obvious solution is to install Linux or something on the netbook and plug it perpetually!

But I wonder if this is feasible. Presumably it would use electricity continuously. And being a netbook, it might not have enough ram or processing power to act as a good server.  So, would the electricity bills be too prohibitive to leave it always on?

Second, would having a home server that port-forwards 80 and a few others be a security threat to my desktop and other internet-using devices?

Third, what kind of Linux is recommended for servers or newbies to Linux? :D I want Linux just because this might be a good opportunity to get used to its scaaaary environment. Thusfar I've only used it for light coding and Perl scripting in a virtual box. Nothing fancy.
Red Hat is classically the choice for servers, but it's not particularly user-friendly, even for Linux.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: Home server via laptop?
« Reply #5 on: January 01, 2014, 01:45:37 am »

I'm using Linux Mint (which stems from Ubuntu which stems from debian) with the GUI disabled right now.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: Home server via laptop?
« Reply #6 on: January 03, 2014, 11:14:27 am »

I have a home server running on a 7 year old laptop, using Debian linux, that I use for a bunch of stuff including web hosting, version control, databases, side projects, etc. I just set up my router to forward relevant ports to that computer, which is using a static IP, and that's that. I don't really think there's any security problems. All the ports that are accessible are being used by trusted applications like Apache, SVN, etc.

It shouldn't be expensive to keep running at all, just a tad more electricity. I'd ditch the graphical interface when you're comfortable enough with console too. They carry so much crap these days, use your GPU, and all that crap.

I personally just SSH into the computer and do whatever I need to do using a console.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: Home server via laptop?
« Reply #7 on: January 03, 2014, 11:31:58 am »

Yes, I ditched the GUI from day 1. Happily SSHing or Moshing into the server and using screens for all my multiplexing needs :D

Recently I made my server host a webserver and serve dynamic pages, like this!
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: Home server via laptop?
« Reply #8 on: January 03, 2014, 11:35:37 am »

Hah, I use no-ip too, but I decided the bounceme.net domain was funnier than no-ip :D

Sounds like you're on your way though :D

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Home server via laptop?
« Reply #9 on: January 06, 2014, 11:57:38 pm »

Depending on what you are using this server for, apache might not be the best choice for an httpd.

You might look to see if lighttpd will better suit your needs. It doesn't do anywhere near all the fancy things that apache does, and is not as secure. I'll be frank and upfront about that. However, if you set up the user under which the lighttpd daemon runs in a sane and sensible fashion, much of the security problem goes away, or is mitigated.

The ram issue can be somewhat dealt with by using zram swap. Zram is a kernel module that has been in the stock kernel since 2.6.32, IIRC.  It basically zlib compresses a dynamically resizing block device that you can then either put a filesystem on, (compressed ramdisk) or use as swap space (compressed swap). It trades processor horsepower for high performance swap space to avoid a costly disk thrash when ram resources become scarce.

Lighttpd uses very little resources, and can run on my weak kneed local router just fine. (Consumer grade netgear POS running DDWRT, with a usb HDD slaved to it. Runs a local samba server and lighttpd.)

The laptop should have more guts than the local router, but I wonder why you lugged a mint distro in place of a minimalist net install debian install. *shrug*

Still, you might look into those options.
Logged