Make a Linux dev server for less than 50$/life 😱
Tags: beginners, webdev, showdev, productivity
Published: 2019-03-14 13:03:32

---
title: Make a Linux dev server for less than 50$/life 😱
published: true
description: 
tags: beginners, webdev, showdev, productivity 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/u70ekv2xrb23l60w16ts.png
---

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 experiments, and I personally think it's a device that every developer should own. There are a lot of things that you can do with a Raspberry Pi, but in this article, we are going to make a dev server for your team. So let's get started 👨🏻‍💻

![](https://media.giphy.com/media/stnbbvUVJSxkA/giphy.gif)

### 1. Prerequisites
First things first, this is ideal if you have a small team working in the same office as you or if you work alone. If that's not the case, don't worry, I have this [coupon](https://m.do.co/c/12642f967cd1) for you. Anyways, to start, you need the following things in starting.

***Hardware***

**1. Raspberry Pi** (duh!)
**2. Wifi dongle or Ethernet Cable**
**3. Micro SD Card**(8GB+)
**4. HDMI Cable***
**5. Monitor***
**6. USB keyboard***

**optional*

***Software***

**7. BalenaEtcher** 👉🏼 [Download](https://www.balena.io/etcher/)
**8. Raspbian Stretch Lite** 👉🏼 [Download](https://www.raspberrypi.org/downloads/raspbian/)
*or*
**8. Ubuntu** 👉🏼 [Download](https://wiki.ubuntu.com/ARM/RaspberryPi)

### 2. Booting the Micro SD
For this, we will use BalenaEtcher. Although it's completely optional, if you are a beginner, you'd prefer this. This makes it really easy to install and saves a lot of time.

![](https://thepracticaldev.s3.amazonaws.com/i/db1unfe9i2mpvxgdumth.png)
![](https://thepracticaldev.s3.amazonaws.com/i/4icstdzbw0u1xfabqi6s.png)

If not, these commands can be used: 

```
diskutil list
``` 
Recognize your card using this command as this command will give you a list of all the drives available
  
![](https://thepracticaldev.s3.amazonaws.com/i/nnsf2d6q1y4nibcs22ow.png)

Next, unmount your disk using:
```
diskutil unmountDisk /dev/disk3
``` 

Now flash your card using this command, and do remember to change values according to your computer:

```
sudo dd bs=1m if=/Path/to/image/ubuntu-16.04-preinstalled-server-armhf+raspi3.img.xz  of=/dev/disk3 conv=sync
```

To check status, press `cntrl+t`. If something breaks, check this [guide](https://www.raspberrypi.org/documentation/installation/installing-images/README.md).

### 3. Running the Raspberry Server

So in this section, I will demonstrate how to set up your server with the Raspbian image. When you plug in power and see something like this, that means you are good to go, give it some time to boot up.

![](https://thepracticaldev.s3.amazonaws.com/i/3aemdw16yqmivnc6x1to.gif)

*NOTE: If you have Ethernet cable, you don't even need a monitor, though if something goes wrong with bootup, you won't be able to debug it. So it's good to have one.*

After bootup, It will ask you for username and password. Following are the default values:

**Default Username:** *pi*
**Default Password:** *raspberry*

Once you are logged in, check if the internet is working fine by running `ping 8.8.8.8`. If everything is working fine, these are the commands that you need to run next.

```
apt-get install update 
apt-get install upgrade
```

Now, this is the most important step to set up your Raspberry Pi, run:
```
sudo raspi-config
```
This command is your friend. Using this, you can configure pretty much anything in Raspberry Pi. Here are a few useful ones:

##### Go wireless with a Wifi Dongle
![](https://media.giphy.com/media/9uIwFx9ZQVK1tfuda0/giphy.gif)

Add a Wifi name and password, and boom! You are done.

##### Enable/Disable SSH
![](https://media.giphy.com/media/QMsSbdOMLex2ol3Jml/giphy.gif)

##### Expand Filesystem
![](https://media.giphy.com/media/xVSkOQWLVYGA27K5gm/giphy.gif)

By default, all the space on your SD card won't be available to you, but using this, you can have all that good space.

##### Connect to Internet While Boot Up
![](https://media.giphy.com/media/1zjzJZCyRzDSZjXHl3/giphy.gif)

Most important, this will ensure that your server is connected to the internet.

### 4. Connect to your server 🥳

Finally, connecting now is really easy. Just use command:
```
ssh pi@your-ip-address
```
*Note:*
*1. If you don't know your IP address, use`/sbin/ifconfig wlan0`*
*2. You should be on the same network as the Raspberry Pi*

![](https://thepracticaldev.s3.amazonaws.com/i/9lnmlsg9emnx4clv5tq0.png)

Now, let's install nginx on our server with this simple command.

```
sudo apt-get install nginx
```
After this, open your browser and add the IP address of the Raspberry Pi. If everything is good, you will see this.

![](https://thepracticaldev.s3.amazonaws.com/i/oanjmahdpmoyrdzvcbn4.png)

***CONGRATULATIONS! YOUR SERVER IS UP AND RUNNING!!***


### Conclusion 
I hope you guys will enjoy doing this as much as I did. I will make sure to post more such experiments. If you get stuck somewhere, feel free to ask questions in the comments section below. 
Okay guys, I have to go now. Throwing a party in the office with all that 🤑 money 🤑 we saved today. 😂😆

![](https://media.giphy.com/media/hUWrhmr5IFMzK/giphy.gif)