Inherited a 2015 MacBook Air with 4GB RAM - Lightweight Self-Hosting Tips
Inherited a 2015 MacBook Air with 4GB RAM
A 2015 MacBook Air with 4GB RAM cannot run Docker, cannot handle modern Electron apps, and struggles with more than a few browser tabs. But it can still be a surprisingly useful self-hosting machine if you choose the right tools.
Skip Docker Entirely
Docker on a 4GB machine is not just slow - it is unusable. The Docker daemon alone consumes 500MB-1GB. Add a single container and you are already over half your RAM.
Instead, install services natively using Homebrew:
brew install postgresqlinstead of a Postgres containerbrew install redisinstead of Redis in Dockerbrew install nginxinstead of an nginx container
Native packages use a fraction of the memory because they share system libraries instead of bundling their own.
What Fits in 4GB
Realistic services you can run simultaneously:
- PostgreSQL - ~50MB base memory, grows with usage
- Redis - ~10MB for small datasets
- A small web server (nginx or Caddy) - ~20MB
- One lightweight application - a small Node.js or Python app at ~100-200MB
That is your budget. Total system usage including macOS sits around 2.5-3GB, leaving 1-1.5GB for your services.
What Does Not Fit
- Any Electron app (Slack, VS Code, Discord) - 300MB+ each
- Docker - the daemon alone kills your headroom
- Multiple Node.js applications - each one takes 100-200MB
- Any local AI model - even small ones need more RAM
Making It Useful
The sweet spot for a 4GB machine is a single-purpose server:
- A personal Postgres database accessible from your network
- A lightweight API backend
- A simple monitoring dashboard
- A cron-based automation runner
Do not try to make it do everything. Pick one job, set it up well, and let it run quietly.
Fazm is an open source macOS AI agent. Open source on GitHub.