Most people decide whether to self-host or pay for SaaS based on one thing: the monthly number got uncomfortable and they started shopping.
That is a reaction. Not a decision.
There is a systematic approach to this that works before costs become a problem, applies to any software category, and produces a clear answer. Seven questions. Weighted outputs. A recommendation that holds up to scrutiny instead of reversing the moment something feels hard.
I built that framework when our automation infrastructure crossed a threshold I did not want to rationalize around. I ran every question through it. The answer was unambiguous.
The Raspberry Pi 5 server on my shelf running n8n in Docker is what the framework produced. $230 one time. $0.80 a month in electricity. Break-even at 8.2 months. Everything after that is compounding returns.
The 7-Question Self-Host vs. SaaS Framework
These are the questions, in the order they matter. Ask them before you evaluate any specific tool, any specific hardware, or any specific alternative. The answers tell you what decision to make. The research comes after.
- Q1What is the monthly cost at current usage?Get the real number. Not the entry price. The tier you are actually on, including the features you actually use. Include annual billing discounts if you pay that way.
- Q2What is the projected cost at scale?SaaS pricing scales with usage: workflows, seats, API calls, records, operations. What does the bill look like in 12 months if your usage doubles? Most platforms publish their next tier. Use it.
- Q3What is the one-time infrastructure cost?Everything you spend exactly once. Hardware, setup time at your hourly rate, initial configuration. Be honest about time. An hour of your time is not free.
- Q4What is the break-even timeline?Divide total one-time cost by monthly SaaS savings. That is your break-even in months. Under 12 months is almost always worth evaluating seriously. Over 24 months, you need a strong reason beyond the math.
- Q5What is the operational overhead cost?Self-hosting has ongoing time costs. Updates, monitoring, backups, occasional restarts. Estimate honestly: how many hours per month, and what is that time worth? This is where most people underestimate the true cost of self-hosting.
- Q6What is the data sovereignty value?Some workloads involve data you do not want on a vendor's server. Client information, internal processes, financial workflows, proprietary logic. If your data stays on your network, that is a real value the break-even math does not capture.
- Q7What is the lock-in risk of staying?Price increases, feature removals, outages, vendor shutdowns. Every month you build more workflow logic inside someone else's platform, the switching cost grows. That accumulated risk has a real value even if it never materializes.
Questions 1 and 2 establish the cost you are actually paying. Question 3 establishes what you would pay instead. Question 4 turns those into a timeline. Questions 5, 6, and 7 are the qualitative weights that determine whether the math is the whole story or just part of it.
The framework applies to any software category with a monthly SaaS fee and a self-hosted alternative: automation tools, databases, analytics, CRM, email delivery, AI inference, monitoring. The questions do not change.
Running the Framework: Our Automation Stack
Here is exactly what each question returned when I ran our automation infrastructure through it.
Q1: Monthly cost at current usage
Zapier Starter at $29.99 a month. $360 a year. With operation limits that would force an upgrade as workflow volume increased. The real cost was not just the current number. It was a number with a ceiling I was already approaching.
Q2: Projected cost at scale
Zapier Professional is $73.50 a month. I run automation workflows across four websites: publishing queues, RSS triggers, webhook receivers, content distribution pipelines. An upgrade was not a question of if. It was when.
Q3: One-time infrastructure cost
Raspberry Pi 5 with 8GB RAM, Argon ONE V5 aluminum case, 2280 NVMe SSD, official 27W power supply, microSD card for flashing the OS. Approximately $230 total. Setup time: a full afternoon the first time, documented honestly below so yours takes less.
Q4: Break-even timeline
$230 divided by $30 per month savings equals 7.7 months. Add electricity at roughly $0.80 a month and the break-even lands at 8.2 months. That is well inside the 12-month threshold where self-hosting starts making clear sense.
Q5: Operational overhead
n8n running in Docker on a Pi is genuinely low maintenance when set up correctly. The --restart unless-stopped flag handles reboots automatically. Security updates run on a schedule. Docker image updates take 10 minutes once a quarter. Realistically: under 30 minutes a month once the initial setup is complete.
Q6: Data sovereignty value
Our automation workflows touch publishing pipelines, content schedules, and site webhooks. Nothing that would trigger legal requirements. But keeping workflow logic, timing data, and trigger conditions off a vendor's server was a real preference. When the data stays on your network, it is not subject to their privacy policy, their breach, or their shutdown.
Q7: Lock-in risk of staying
Zapier workflow logic is built inside Zapier's interface. Migrating established workflows to any other platform means rebuilding them from scratch. The longer you stay, the more you have embedded there. n8n workflows are stored as exportable JSON and run on any n8n instance. If the host changes, the workflows move.
Short break-even. Meaningful data sovereignty value. Growing lock-in risk on an expanding workflow library. The framework output was clear: build. Then I built.
What the Framework Decision Led To: The Build
Everything below is the physical and software build that the framework decision produced. This is what the hardware looks like, what the software requires, and every problem I actually ran into. The build guide is evidence, not the story.
What this server runs right now
- n8nAutomation orchestration hubThe Zapier replacement. Runs all workflow logic locally with no operation caps, no monthly fee, and no vendor dependency on your automation layer.
- WebhooksReceives signals from any external toolWhen a new piece of content clears approval, the webhook fires. The Pi catches it and starts the publishing sequence.
- Queues14-day content publishing bufferSchedules posts across sites and platforms without manual intervention every time something goes live.
- RSSTriggers on new content from any feedNew article appears in an RSS feed, the Pi detects it and fires the distribution workflow automatically.
- VPNTailscale for secure remote accessSSH into this server from anywhere without exposing any ports to the internet.
The Form Factor Decision That Determines Everything
Before you order a single part, there is one hardware constraint that determines which SSD you can buy. Getting this wrong means returning parts and paying for the mistake.
The SSD form factor is determined by your case. Decide the case first. Buy the SSD second. Buying in the wrong order can cost you the price of an SSD and a return shipment.
M.2 NVMe SSDs come in different physical lengths: 2280 (80mm) and 2242 (42mm) are the two you encounter in Pi builds. They are not interchangeable. It is a physical fit issue, not a compatibility issue. A 2280 drive will not mount in a slot designed for 2242. A 2242 in a 2280 slot will seat but cannot be secured.
There are two common build paths. I went with Path A: the Argon ONE V5, an aluminum enclosure that puts the M.2 slot in the base with active cooling, full-size HDMI ports, extra USB ports, and an audio jack. It accepts 2280 SSDs only.
Path B uses the Official Raspberry Pi M.2 HAT+, which mounts on top of the Pi as a separate board. The HAT+ accepts 2230 and 2242 SSDs only. The official Pi case lid will not close over the HAT, so you run it open or remove the lid.
Step 0: How the Pi Gets Its Operating System
A Raspberry Pi ships with absolutely nothing on it. No Windows. No macOS. No Linux. Just hardware waiting for instructions. Before assembly, before any commands, you need to write an operating system onto a microSD card using your existing computer. This is called flashing, and it is the actual first step.
We used a free app called Raspberry Pi Imager. Here is exactly what it does:
- SelectChoose Raspberry Pi OS (64-bit)The official Linux-based operating system for the Pi. Free. Maintained by the Raspberry Pi Foundation. You pick it from a menu inside the app.
- CustomizeSet hostname, username, password, and enable SSHBefore a single byte hits the card, you configure the machine. We named ours "agentserver." SSH is how your Mac or PC sends commands to the Pi remotely without needing a monitor plugged in.
- FlashWrite and verify the microSD cardImager writes the OS image and verifies it. On a 128GB card this takes a few minutes. When done, the card is bootable and the Pi will accept SSH connections the moment it powers on.
Insert the flashed card into the Pi, power it on, and it boots straight into a running Linux computer. No installation wizard. No setup screens. SSH in from your existing computer and the Pi is yours. Later you clone the entire OS to the NVMe SSD and boot from that permanently. The SD card comes out and stays in a drawer.
Assembly: What the YouTube Videos Skip
There is a good video from explaining computers dot com covering the Argon ONE V5 assembly. I watched it. It helped. But there are a few things worth adding from actually doing it.
The assembly sequence is strict
The Argon ONE V5 has a daughterboard that provides the full-size HDMI ports, extra USB, and the audio jack. This board connects to the Pi's port area and must be attached before the Pi goes into the case. If you seat the Pi first, you cannot attach the daughterboard without removing the Pi again.
Correct order: daughterboard first, then thermal pads on the Pi chips, then the Pi into the case, then the SSD, then the SSD thermal pad, then the base plate, then the wires, then the PCIe ribbon cable, then the lid.
The SSD goes in at an angle
Slide it into the M.2 connector at about 30 degrees. It will feel seated when it stops. Then pivot the far end flat and secure it with the included torx screw. Snug, not tight. When you let go before the screw goes in, the SSD springs back up. That is normal. The screw is what holds it flat.
The PCIe ribbon cable has a right side and a wrong side
The cable connects the Pi's PCIe port to the M.2 adapter board in the case. Two cables are included because they are fragile and easy to break. The copper contacts face away from the exterior of the case on both ends. Reversed, it produces no connection and no error message. The Pi boots from the SD card instead of the SSD and you spend time wondering why.
The fan wire is fine on either side
The instructions route the fan wire through a cable management channel on the opposite side from where it naturally wants to go. Route it on the near side instead. It works perfectly and saves the time of fighting it through the official path.
Software Setup: Where It Actually Gets Hard
The hardware assembly took about 45 minutes including watching the video. The software took longer, almost entirely because of a few non-obvious problems that no guide I found had documented.
You need a card reader your computer may not have
Raspberry Pi Imager writes the OS to an SD card on your existing computer. MacBook Air does not have an SD card slot. I needed a USB-C microSD card reader, which costs about $10. This sounds obvious in retrospect. It was not obvious when I sat down to start and realized I could not proceed.
Buy the card reader before you start. Or use a USB-C NVMe enclosure for about $20 and flash directly to the SSD, bypassing the SD card entirely. Both approaches work.
Password entry in Raspberry Pi Imager shows nothing
When you set your username and password in Imager's customization screen, the password field shows no characters and no dots as you type. You type into silence. If you mistype, you will not know until you try to SSH in and get "Permission denied" three times before the session locks you out.
Connect a monitor and keyboard to the Pi. Open a terminal. Type sudo su to become root without needing the password. Then type passwd [yourusername] to set a new password. No current password required. SSH back in with the new credentials.
The NVMe migration requires a specific sequence
Once you are SSHed into the Pi running from the SD card, clone it to the NVMe with this command:
sudo dd if=/dev/mmcblk0 of=/dev/nvme0n1 bs=4M status=progress
At around 96 MB/s, a 128GB SD card takes about 22 minutes. When it finishes, change the boot order in sudo raspi-config under Advanced Options, then choose NVMe/USB Boot. Shut down completely. Pull the SD card out. Power back on. If you reboot instead of shutting down before pulling the SD card, you may get a boot failure.
After booting from the NVMe, the partition will match the SD card size even though the NVMe is larger. Run sudo raspi-config --expand-rootfs and reboot to claim the full drive.
n8n blocks every browser over HTTP by default
After deploying n8n with Docker, I opened a browser, navigated to the Pi's IP on port 5678, and got an error about secure cookies. Chrome. Firefox. Safari. Same error in all of them. The message suggested trying Safari, which sent me chasing a browser compatibility problem that did not exist.
The actual problem: n8n defaults to requiring HTTPS for its authentication cookie. Accessing it over HTTP on a local network triggers this in every browser without exception. The fix is one environment variable in the Docker run command:
docker run -d --restart unless-stopped --name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
-e N8N_SECURE_COOKIE=false \
docker.n8n.io/n8nio/n8n
If you already ran n8n without that flag, stop and remove the container first: docker stop n8n && docker rm n8n. Your data is safe in the named volume and will be there when you redeploy. Then run the command above with the flag included.
The Six Gotchas in One Place
Every specific problem I hit, collected so you can skip them:
- 01M.2 form factor mismatchArgon ONE V5 accepts 2280 only. Official HAT+ accepts 2230/2242 only. Decide case first, buy SSD second. There is no workaround.
- 02MacBook Air has no SD card slotMacBook Air M1, M2, and M3 do not have SD card readers. You need a USB-C card reader or a USB-C NVMe enclosure to flash directly to the SSD.
- 03Raspberry Pi Imager is silent on password entryNo visual feedback as you type. If you mistype, you find out at SSH login. Recovery: sudo su on the Pi directly, then passwd [username].
- 04PCIe ribbon cable orientationCopper contacts face away from the case exterior on both ends. Reversed: no connection, no error message, just SD card boot instead of NVMe.
- 05Shutdown, not reboot, before removing SD cardChange boot order in raspi-config, then sudo shutdown now. Remove SD card after full power-off. Not during reboot.
- 06n8n secure cookie blocks all browsers over HTTPNot a Safari issue. Not a browser issue. Add -e N8N_SECURE_COOKIE=false to your Docker run command for local network access.
What You End Up With
A Pi 5 running from a 232GB NVMe SSD at read speeds around 2,400 MB/s. Docker installed, n8n running on port 5678, accessible from any device on your local network. The --restart unless-stopped flag means n8n comes back automatically after any reboot or power outage.
From here: install Tailscale for secure remote access, set up your first n8n workflow, add a firewall with UFW, and configure Fail2ban to block brute-force SSH attempts. The server is production-ready after those four steps.
The five-year cost comparison: approximately $280 for the Pi build including electricity versus approximately $1,800 for Zapier Starter over the same period. The break-even is 8.2 months. After that, the gap keeps growing.
The Framework Is the Transferable Thing
The Raspberry Pi is one output of one run of this framework on one infrastructure decision. The seven questions work the same way when applied to your database hosting, your analytics platform, your email delivery, your AI inference costs, anything with a monthly SaaS fee and a self-hosted alternative.
Run the questions before you look at hardware. The framework tells you whether the decision is worth making at all. If the break-even is 30 months and the operational overhead is high and your data has no sensitivity requirements, the SaaS is probably the right call. That answer is also a good output.
The next time a recurring infrastructure cost gets uncomfortable, do not shop. Run the framework first. The answer is usually clearer than the discomfort suggests.
Frameworks are how you build systems that compound.
The decision methodology behind this build is documented as a reusable SIOS framework. Learn how to extract frameworks from any decision you make.
Learn Framework Building