DEV Community

Cover image for Make a Linux dev server for less than 50$/life 😱

Make a Linux dev server for less than 50$/life 😱

Sarthak Sharma on March 14, 2019

In case you didn't already know this, Raspberry Pi is an absolutely brilliant piece of hardware. It is gold when it comes to doing fun and crazy ex...
Collapse
 
david_j_eddy profile image
David J Eddy

It'll be better than a $5 VPS for three main reasons:

1) VPS = virtual private server. You are on shared hardware with a throttle cap
2) Since the Pi ins on-prem network latency is nearly no-existent.
3) $30 hardware > $5 rented virtual.

I run a Pi w/ Pi-hole as my DNS / ad-blocker on my home network; pref. test before and after show nearly no measurable difference in throughput speeds.

Collapse
 
george profile image
George Nance

One bad thing I have noticed about the pi is with external storage. The USB ports and ethernet port share the same bus, so your speed will be pretty bad if you are downloading something large . I used to use mine to seed linux distros and I only got 1-2mb down max. Things may be different if you use wifi.

Thread Thread
 
petarov profile image
Petar G. Petrov • Edited

That one bad thing could actually be a pretty major one, I believe. Having a bunch of PIs for private projects is cool, I've got several myself. Once you start sharing with other people and having the PIs do lots of I/O, things get somewhat sluggish.

Thread Thread
 
becomingcoder profile image
Jason Scott

With the extremely cheap costs of microSD cards...this should be a none issue. 256GB cards are nearing $30. There's always an upfront cost with having on-site hardware. Using DO you're also paying for convenience. Also if you decide you're done using the pi for a server.....use it for other side projects. I think for teams this would be a bad idea but for a one/two person show....this is easily cheapest option.

$30 - Rpi 3 with wifi built in
$40 - 256GB microSD

Collapse
 
kayis profile image
K

[Total Cost of Ownership needed]

Collapse
 
sarthology profile image
Sarthak Sharma

Interesting, well

Raspberry Pi :- 40$
SD Card :- 4$
Wifi dongle:- 5$

Collapse
 
tiguchi profile image
Thomas Werner

Raspberry Pi 3 B+ comes with Wifi included 😃 raspberrypi.org/products/raspberry...

I bought the one from Element14:
amazon.com/ELEMENT-Element14-Raspb...

Thread Thread
 
sarthology profile image
Sarthak Sharma

Yeah. I have that too 😊

Collapse
 
david_j_eddy profile image
David J Eddy

Wifi dongle:- 5$ (optional) ;)

TCO should include installation and power consumption costs.

Thread Thread
 
kayis profile image
K

also hourly rate of the person installing and running that thing

Thread Thread
 
sarthology profile image
Sarthak Sharma

Oh Yeah 😂😅

Collapse
 
thomasredstone profile image
Thomas Redstone

Nice article, but it ain't for life!
The SD will almost certainly die sooner or later, the actual Pi might last a very long time though, maybe $100 over your lifetime (assuming your Pi just keeps going)

Collapse
 
sarthology profile image
Sarthak Sharma

Well better than a 5$ digitalocean server.

Collapse
 
vezyank profile image
Slava

How did you measure that? In my experience, DigitalOcean has some pretty great performance. Raspberry PI uses a low power ARM processor, DO has Xeon processors. My DO hosts a build server, don’t know a PI could manage.

Thread Thread
 
sarthology profile image
Sarthak Sharma

Well, as I mentioned it’s good for small team managing small projects. It can easily take the load.

Thread Thread
 
vezyank profile image
Slava

You said it was better than DigitalOcean in terms of performance

Thread Thread
 
sarthology profile image
Sarthak Sharma

Yes, better than a 5$ server

Thread Thread
 
vezyank profile image
Slava

Yeah going to step in now and dispel this misinformation. DigitalOcean has x86 processors clocking at 2.4GHZ, the Raspberry PI has a 1.4GHZ ARM CPU. DigitalOcean features DDR4 RAM, the PI is on LPDDR2.

You simply cannot even compare them. You're unlikely to ever hit 1/10th of the performance a DO VPS offers.

Thread Thread
 
sarthology profile image
Sarthak Sharma

Totally Agree with you. But the thing is in most of the cases Beginner developer doesn't even need that much of processing speed to run their small projects and the fact is 5$ is the least you can pay. So It's better than 5$ digital ocean droplet, isn't it?

Thread Thread
 
vezyank profile image
Slava

Whatever computer you're using in the moment is likely better. Dev servers are usually supposed to have much better performance than any other device, not less.

Thread Thread
 
sarthology profile image
Sarthak Sharma

I understand that but still for a small team with small project there won’t be problem. Trust me.

Collapse
 
d1p profile image
Debashis Dip

wait, really? or sarcasm? :3

Thread Thread
 
sarthology profile image
Sarthak Sharma

Well, it’s kind of real bro.

Thread Thread
 
geefygeorge profile image
David Salter

That's fantastic. What tools do you use to do dev on it ?

Thread Thread
 
sarthology profile image
Sarthak Sharma

Nginx, NodeJS and MongoDB so Far.

Collapse
 
gijovarghese profile image
Gijo Varghese

No, no way it better than a $5 DO server

Collapse
 
guidovizoso profile image
Guido Vizoso

Adding this to the reading list! If you could follow up this tutorial with things like a domain for the server and security it'll be great for us beginners.

Great article!

Collapse
 
sarthology profile image
Sarthak Sharma

You mean how to add domain name in a local server ?

Collapse
 
guidovizoso profile image
Guido Vizoso

Exactly, that type of stuff. As a front end developer I struggle sometimes with things like local servers, SSH, etc

Thread Thread
 
sarthology profile image
Sarthak Sharma

Ohk then, I will try to write about that too.

Collapse
 
dmitriip profile image
DmitriiP

Not saying that this approach is bad or anything, just want to point out a potential concern with this setup. One will most likely develop code on an x86 machine, use the same architecture for production as well, and Pi is based on ARM. Although most of the packages should be available for both platforms, no one can guarantee that the behavior will be always 1-to-1. So if you have a case of "it works on my machine" this might be the case.

Collapse
 
gijovarghese profile image
Gijo Varghese

nice clickbaity title!!

It's fun to create one, but...

Never Use it for Production

  • AWS, Google cloud has free vms which has much better specs (cloud.google.com/free/)
  • A $5/month DigitalOcean is much faster, and only costs $60 for a year
  • Cloud providers like Google automatically upgrade your hardware with latest CPU without any downtime
  • You can only build the server for $50, you need to pay for the internet usage and electricity
  • Upload speed for normal internet connections are way slow, hosting providers speed are way fast
  • Cloud providers like DO, Google, AWS use high-speed networks powered by Fibre cables
  • $1/month extra, you can get backups
  • What if there is a hardware failure? How will you keep your site up? Order another raspberry pi?
  • Horizontal and Vertical scaling will be difficult
Collapse
 
sarthology profile image
Sarthak Sharma

It’s a Dev Server for small teams to test their apps locally on one network ( If you have read the article you can tell 😁). Obviously this can’t be used for production and in that case all your reasoning is valid.

This article is for beginners.

Collapse
 
gijovarghese profile image
Gijo Varghese

Even for development, I won't recommend this

Thread Thread
 
sarthology profile image
Sarthak Sharma

Yeah, it’s fine no problem. I respect your recommendations but still working fine for me so gonna use it as long as I can.

Collapse
 
aleon1220 profile image
Andres Leon

This is a nice server for HTTP server e.g. nginx. How about an article describing how to have a dev server running containers and connected to a physical storage to store nice data.
like a raspberry connected to a small 1 TB external hard drive and the raspberry is a kubernetes cluster that contains webapps, demos, static pages, etc :-)

Collapse
 
george profile image
George Nance

This is a great tutorial! I love the raspberry pi.

Mine unfortunately has been collecting a-lot of dust because I haven't found a project that interests me enough to put on there.

Collapse
 
tiguchi profile image
Thomas Werner

I use mine at the moment as a remote git repository for syncing my personal branches across my desktop and notebook at home.

I also use it as a PostgreSQL database server for development and testing. It works reasonably well, but if you happen to forget using indexes you will notice that it can slow down to a crawl. Which is great! Because you will catch these errors super early in the process before it could hit a production environment.

Some ideas:

Attach a big external hard drive and

  • Use it as a cheap network storage device
  • Use it as media server or "smart TV" device connected to your TV

...or

  • Run Alexa or Google assistant services on your Raspberry Pi
Collapse
 
sarthology profile image
Sarthak Sharma

Well, Now you know what to do with it. Go for it. 😊

 
sarthology profile image
Sarthak Sharma

Not really. It can work offline.

Thread Thread
 
rafaelbadan profile image
Rafael • Edited

That's a great advantage comparing to remote Servers or cloud services if you live in poor internet connection areas. Having a local server outside your machine that let's you practice the work flow of uploading, installing, updating an app or whatever project you have, and test it, is really nice.

Thread Thread
 
sarthology profile image
Sarthak Sharma

Exactly

Collapse
 
vaibhav profile image
Vaibhav

It is going to be very interesting. 😉

Collapse
 
sarthology profile image
Sarthak Sharma

I know you are going to use that on second raspberry pi in office 😂😂

Collapse
 
lesha profile image
lesha 🟨⬛️

Ok but seriously. What differs this guide from tens to hundreds of other guides? How is this not just a rehash?

Is there not enough guides on how to burn iso to SD card? Is there not enough guides on raspi-config?

Collapse
 
christian102094 profile image
Christian Tapia

Sorry for this question, but what is a dev server?

Collapse
 
david_j_eddy profile image
David J Eddy

dev server => development server

Typically the first environment an application is deployed to after a developer has commited/pushed changes. Least restrictive, typically limited public internet access, but accessible by the development teams for debugging / trouble shooting.

Collapse
 
jecsham profile image
Jecsham

A server for deploy and test/debug your projects

Collapse
 
sarthology profile image
Sarthak Sharma

Well, something that’s not a production server, used by dev team or test team in house. 😊

Collapse
 
treddson profile image
Taylor Short

Thanks, Sarthak! I’ve got a rasberry pi just lying around. This article really gave me some more motivation to try and use it!

Collapse
 
sarthology profile image
Sarthak Sharma

😊😊😊

Collapse
 
kissu profile image
Konstantin BIFERT

Sad that Etcher is plagued by the Balena thing right now...was the best and simplest software ever before.
Far bigger size, some useless ads and not necessary stuff...

Collapse
 
sarthology profile image
Sarthak Sharma

That's why I always go for CLI.

Collapse
 
abdurrahmaanj profile image
Abdur-Rahmaan Janhangeer

brilliant 👍

Collapse
 
sarthology profile image
Sarthak Sharma

Thanks Abdur.

Collapse
 
jecsham profile image
Jecsham

Nice post!

Collapse
 
sarthology profile image
Sarthak Sharma

Thanks 😊

Collapse
 
tiguchi profile image
Thomas Werner

What's the name of your terminal font?

Collapse
 
sarthology profile image
Sarthak Sharma

Operator Mono

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

If the pi can now drive a 4K UHD HDMI signal then I might finally have to setup my media server.

Thanks for the clear instructions. It reduces the too-lazy-to-research hurdle. :)

Collapse
 
sarthology profile image
Sarthak Sharma

Thanks 😊

Collapse
 
dennisk profile image
Dennis Keirsgieter

Used my Pi3+ for a while but i found it to be slow (even with highclass sd card). Running NPM commands took way to much time for me in the end. Are you optimizing anything or?

Collapse
 
sarthology profile image
Sarthak Sharma

That’s weird. In my case, npm install worked like butter. 🤷🏻‍♂️

Collapse
 
kamalhm profile image
Kamal

Genuinely asking, how is this better than running a local dev server on your own pc?

Collapse
 
sarthology profile image
Sarthak Sharma

Dependency of others on your presence won’t be required.

Collapse
 
8detect profile image
Infinity Detective

yeah right just for dev purpose