blog.itcode.devblog.itcode.dev

[Raspberry Pi 4] Hello Raspberry!

A fair number of developers build their own servers, whether on the cloud or on a device, and put them to various uses. When developing, you inevitably need something like a server that's always running 24 hours a day. For example, GitHub Pages only hosts static pages — it can't use a backend or a DB, so dynamic page hosting is impossible. But if a personal API or DB server exists, communicating with that server makes more dynamic page hosting possible. Considering the role a backend plays on the web, the difference between having and not having a personal server you can use is night and day. As a developer, I too have long wanted a server I could use without restrictions, and I looked into ways to build a personal server.

[Raspberry Pi 4] Hello Raspberry!

A fair number of developers build their own servers, whether on the cloud or on a device, and put them to various uses. When developing, you inevitably need something like a server that's always running 24 hours a day. For example, GitHub Pages only hosts static pages — it can't use a backend or a DB, so dynamic page hosting is impossible. But if a personal API or DB server exists, communicating with that server makes more dynamic page hosting possible. Considering the role a backend plays on the web, the difference between having and not having a personal server you can use is night and day. As a developer, I too have long wanted a server I could use without restrictions, and I looked into ways to build a personal server.
RWB0104
@RWBwritten at 2021-08-29 04:41:41
Raspberry Pi

시리즈 모아보기

Raspberry Pi

1 / 7

A fair number of developers build their own servers, whether on the cloud or on a device, and put them to various uses.

When developing, you inevitably need something like a server that's always running 24 hours a day. For example, GitHub Pages only hosts static pages — it can't use a backend or a DB, so dynamic page hosting is impossible.

But if a personal API or DB server exists, communicating with that server makes more dynamic page hosting possible. Considering the role a backend plays on the web, the difference between having and not having a personal server you can use is night and day.

As a developer, I too have long wanted a server I could use without restrictions, and I looked into ways to build a personal server.

There were many options, but the one I chose was to build a server environment using a Raspberry Pi.

There were trendy Cloud platforms and server hosting services too, but after comparing several factors I decided the Raspberry Pi was the right choice.

In recent years, led by AWS, the cloud market has grown significantly. As a result, many quality cloud service providers have sprung up both domestically and abroad.

Using a cloud service would make it easy to build a personal server, but even so, I chose the Raspberry Pi.

I considered this mainly from a cost perspective and a learning perspective.

This is the biggest reason I chose the Raspberry Pi.

I wasn't going to just use it for a few tests — since I planned to run various development tools like WAS and a DB, server specs weren't something I could easily ignore.

Higher specs naturally translate to higher costs directly. But I don't have money. That said, I didn't want to be overly stingy either — I needed to make as reasonable a choice as possible.

The conditions I wanted were as follows.

  • Able to run at least one Tomcat instance without issue.
  • Able to run at least one DBMS without issue.
  • Able to store at least 100GB of data.
  • Require as little maintenance cost as possible.

To meet these conditions, I needed a lot of RAM and disk capacity. If it were an SSD, the price would rise even further. I didn't worry much about CPU since I expected almost no need for compilation-type computation on the server.

Comparing AWS and Raspberry Pi, it can be summarized as follows.

CategoryAWS LightSailRaspberry Pi 4 Model B
CPU2 Core4 Core
RAM8GB8GB
VGAXO (Supports 4K)
SSD320GB256GB (separate)
Pricing$40 / per month160,000 KRW (permanent)

If we set aside CPU and VGA since they're less affected by the above conditions, AWS looks superior. But the problem with AWS is that the not-insignificant sum of $40 gets charged every month. Considering that the Raspberry Pi can be owned permanently for 160,000 KRW, AWS's cost keeps piling up after just 4 months, even at a conservative exchange rate of 1,000 KRW to the dollar.

If LightSail — praised in the AWS ecosystem for being cost-effective — is like this, there's no need to even look at EC2.

From a long-term perspective, the Raspberry Pi is more cost-effective.

Handling servers and encountering a new OS can itself serve as a credential for a developer.

AWS, too, is representative of the cloud industry, and companies these days place significant importance on the ability to work with AWS.

In terms of credentials, AWS is far superior, but since both AWS and the Raspberry Pi fall under the category of servers, learning about servers shouldn't be a major issue either way.

With a Raspberry Pi, you have to build everything yourself from start to finish, but this actually works in your favor from a learning perspective.

Let's look at what equipment I bought. I made active use of secondhand items wherever possible.

CategoryNamePrice
DeviceRaspberry Pi 4 Model B60,000 KRW (list price 104,000 KRW)
SSDSAMSUNG 256GB M2 SATA31,000 KRW (list price 57,900 KRW)
CaseArgon ONE M259,000 KRW
Power5V 4A Adapter10,200 KRW
OtherMicroSD, reader6,400 KRW total
Total6 items237,500 KRW

It cost a bit to purchase separately sold items like the case and SSD. If I'd bought everything at list price, it probably would have come out to around 300,000 KRW.

The irony of buying the device for 60,000 KRW while the case cost nearly 60,000 KRW as well. There were no secondhand options for that particular case, so it couldn't be helped.

Here's the Raspberry Pi assembled and running with the case attached.

The final goals for the Raspberry Pi server are as follows.

  • Set up an Ubuntu server on the Raspberry Pi.
  • Apply a domain.
  • Set up remote communication environments such as SSH and RDP.
  • Run Tomcat to host pages.
  • Install MariaDB to handle DB communication.
# Raspberry Pi
ship
blog.itcode.dev

Notes from the π-th Alpaca

7.0.1
Developed by RWB since 2021.057th upgraded at 2026.08