Raspberry Pi 4 -- Yes, You Can Use it for Web Development

It'll take a while for you to optimize your Pi 4, but the answer is a definitive "YES"--you can manage a development workflow on it. The real question is, do you want to?

Background

One of the big concerns with the Raspberry Pi 4 as a daily driver is, of course, whether the hardware can handle the comparable workload of a desktop computer. I've already touched lightly on overclocking the Pi and optimizing a boot disk. The final question is whether the little SBC actually has enough software support to be productive--in any effective sense. The answer is, in my case, a resounding yes. Am I ready to give up on my ThinkPad or Mac Pro, though?--absolutely not. Here are the details:

Raspberry Pi OS Isn't My Cup o' Tea

No disrespect. The Pi Foundation is obviously trying to keep things light weight. That should be a loud signal, then, to anyone wondering just how productive the Pi 4 can be. I'd like a few more bells and whistles than Pi OS has to offer, but not if the price is a huge reduction in performance. One of my first steps, then, was to install the XFCE Desktop Environment. XFCE isn't difficult to install, and I find it to be a good compromise in terms of bang for buck. Having used Xubuntu for roughly 3 years now, I know my way around the XFCE DE well enough to consider it an important tool in my workflow. The Pi 4 seems to handle XFCE pretty well!

xfce desktop
Ubuntu's default GNOME desktop is cool--don't get me wrong--but I personally think XFCE is a little more flexible: native ability to assign different wallpapers to different screens; ease of managing the panel and customizing launchers; the Whisker Menu! Window snapping!! XFCE is a definite improvement on the Pi OS DE!

Tools of the Trade

The next step is getting development tools in order. As I mentioned in previous posts, the volume of software available for the ARM architecture is a hugely limiting factor. I run a suite of applications on my Ubuntu-based computers. Here are some of the essentials:

  • Visual Studio (VS) Code
  • GitKraken
  • Koala (SASS Compiler)
  • GIMP
  • VirtualBox
  • FireFox
  • XAMPP, and...
  • Pithos (BGM!)

Of those, the most important are really VS Code, Git Kraken and probably Pithos. The rest don't play quite so prominently in my workflow, but if I had a choice I'd rather not do without them. Let's look at VS Code first. 

VS Code

Rumors on the interwebs indicated that VS Code had ARM support. Unfortunately, I went to Microsoft for the download, selected the appropriate package and couldn't get the installer to run without an array of failures. The Snap Store was also a bust. For a long time I used Brackets as an alternative IDE--no luck there, either. I was beginning to play with Geany, an IDE bundled with Pi OS, when I decided to see about getting FlatPak installed. As it turned out, FlatHub had a VS Code package that worked. VS Code seems to run well on the Pi 4.

Visual Studio Code for Raspberry Pi
Running Visual Studio Code alongside FireFox isn't too big a deal for the Pi 4, depending on what kinds of web-pages you view. The CPU is all over the place in this screen grab, but mostly due to browsing. If you had intensive compiling to do with VS Code, that might be another question. I only ever use VS Code for Sass or the occasional JavaScript and PHP.

Koala

I can get an extension for VS Code that will compile SASS, so there's really no need for Koala once VS Code is installed. I actually prefer Koala over the extension, though; I used it for quite a while when I was using Brackets as my IDE. I'm just more comfortable with it. Again, no ARM support with Koala, but I could make do with a VS Code extension.

GitKraken

GitKraken is by far my favorite Git client. Its native capability to handle merge conflicts alone puts it well ahead of most other clients I've tried. Unfortunately, once again, ARM support isn't here yet. I do the bulk of my version control from the command-line in either case, so it's not the end of the world. GitCola has ARM support, and I may play around with it if the occasion ever calls for it. I can see, though, that there are a whole mess of Git extensions for VS Code. So it may all be moot in the end (VS Code seems like basically the one and only application you really need for web work on the Pi 4).

GIMP

I haven't looked at GIMP yet; I don't do a lot of image editing in my development work flow, so it's not the end of the world if I can't get it. I'm not a designer, so if I do need GIMP, it's rarely for anything beyond a simple crop and some light optimization. If GIMP is a bust, I can make do. Based on my experience with other applications, though, I'm skeptical the Pi 4 could handle intensive filtering or rendering of large images.

VirtualBox

I'll assume VirtualBox is a non-starter; I don't expect the Pi to be capable of handling virtualization in the first place, given it's limited resources. I do like to "containerize" some of my projects in VirtualBox when I know I'll be messing with workflow management tools or major dependencies. For any project that big, though, you really shouldn't be on a Pi to begin with. I'm not even gonna look for support here.

FireFox

I have to have access to all of the major browsers for my work. I might make do with BrowserStack in a pinch, but my local browser of choice is always FF. Worst case scenario, I could be a tool for Google and work with Chrome which comes bundled with Pi OS. I was almost considering this, since I initially had trouble finding an ARM compatible version of FireFox; Mozilla's website doesn't seem to indicate they have Pi compatible installer. Lo and behold, though, you can get FireFox installed with apt: sudo apt install firefox-esr. This is, however, the ESR package: Mozilla's Extended Support Release.  

Note, however, that FireFox isn't exactly nimble on Raspberry Pi OS. To be completely honest: neither is a lightweight like Midori, though. For lightweight sites like the Drupal site I manage for my client, it runs fine. For heavier "web application"-like pages, it lags quite a bit. The problem doesn't seem to be the RAM; it looks like dynamic pages just push the processor a bit harder than it can handle. I haven't tested YouTube yet, but I imagine this would also push the graphics beyond the Pi's capabilities. More on CPU taxing under Pithos.

XAMPP

XAMPP is a bust as well, so at some point I'll have to get Apache, PHP and MySQL installed on my own. Not as easy as running XAMPP, but no reason I can't get my hands dirty on the command line.

Pithos

Last, and most certainly not least, is Pithos. I don't know about you, but I can't get in the zone unless I have a good playlist streaming in the background. I love Pithos for the ad-free Pandora streaming. It looks like there are ARM compatible Spotify clients out there, but Spotify isn't my thing. Unfortunately, the only integration for ARM I've encountered so far is the Pithos package on FlatHub--and it's quirky at best. It literally takes 2 whole minutes to load, and then I need to go into the Pulse Audio settings each time a new song buffers to reselect the right stereo channel--otherwise, I get no sound. Again, running FireFox in itself doesn't over tax the processor, but if you try loading Pandora in one of your tabs, be prepared for the worst. This isn't a deal-breaker, but I'm kinda bummed.

intense CPU usage
The CPU can get stuck at 100% usage pretty quickly for dynamic web pages and certain apps. One of the concerns I have about running "containerized" apps (i.e., snaps, flatpaks) is whether the CPU gets taxed beyond normal.

Limited Options: Is it WORTH it?

As I expected, most of what I want isn't on the table with the Pi 4's ARM processor. The ability to use VS Code is pretty much the saving grace. Even without it, you could manage to swing a decent development workflow: the Pi 4 comes with some basic tools. In the end, though, the question really comes down to this: do you want to re-adapt your entire workflow based on not having access to the tools you already know and love? I know I could make do in a pinch, the Pi 4 can definitely handle the fundamentals of web-development: git, lamp stack, vscode, etc. Are you really willing to abandon the tools you know and love, though? Personally, I'd really rather not: it's too much of a pain to adapt my workflow around apps I'm unfamiliar with. Beyond this, the ability of the Pi 4 to handle robust web-pages will leave you watching the clock. This is problematic if your workflow relies on robust web-based applications: I use Asana, for example, to manage tickets; the site is far from nimble on the Pi 4.

So, let's talk realistically here for a bit. You CAN use the Pi 4 for web development--yes--but, would you WANT to? I think the answer to that is a pretty firm, "not really..."

While the 8Gb in-built RAM looks like, during most of my testing, it was never taxed beyond 20%, the processor hit 100% usage far too often for a truly smooth experience. Under some circumstances, particularly when overclocking the Pi, this can literally cause the OS to shut down. After I first got FireFox installed, I remember opening it up and navigating heavy pages a little too quickly; the poor little Pi would stop dead in it's tracks. Playing with the clock speed and power supply seems to have fixed this, but it means you'll want to keep a close eye on the Pi, particularly if you're working with sensitive web-data.

The Pi 4 IS NOT a desktop computer.

Here's what it is: the Pi 4 is a phenomenal feat of engineering that put's it on par with bargain rate laptops: think Chromebook, or maybe an IdeaPad. Unfortunately, you'll get much better access to software with a true bargain-rate computer: my kids run Ubuntu on their IdeaPad s145's, and the world is their oyster! The Pi 4 would never really be a daily driver in my case. It might be an okay backup device (if my two work-computers were temporarily out of order). I don't think I'd like to use it for any of my heavier projects, or for more than a day or so at any given time. Like a Chromebook quality laptop, it could handle some front-end web-development on the fly, maybe even some dev-ops--but that's about it. I may owe it to myself to play with the Pi 4 a bit further, but part of me thinks I should look into other ideas for it. If I go down that road I'll be sure to post on it here!