Running a full-stack Rails project locally means at least four services: Rails server, Sidekiq, frontend build, and CSS watch. The old approach was four terminal tabs or foreman to bundle them together.
After using foreman for a while, a few things got to me: log colors disappearing, output delayed by several seconds, and one dying process taking down everything else. Overmind fixes all of this β and adds a few features that become hard to live without.
What Is a Procfile
Overmind reads a Procfile, a format popularized by Heroku that defines which services your application provides and what commands to run them:
| |
One line per service, format is name: command. This file also works as deployment config on Heroku, Render, and Railway β same file locally and in production, fewer environment mismatches.
Installation
On macOS, install tmux first (Overmind’s core dependency):
| |
On Linux:
| |
Basic Usage
In any directory containing a Procfile:
| |
All services start up with their log output collected in one stream, each process name color-coded.
Features That Make the Difference
Restart a Single Process
I use this daily. After changing a Sidekiq worker, I don’t need to stop and restart the whole stack:
| |
Only worker restarts. Web and frontend build keep running uninterrupted.
Connect to a Process
Need to interact with a process directly β check output or type a command:
| |
This opens a tmux window attached to that process. Press Ctrl+b d to detach without stopping it.
Let a Process Die Without Killing Others
A frontend build that exits when done shouldn’t tear down the whole stack:
| |
Auto-restart
For processes that occasionally crash:
| |
Use all to auto-restart everything:
| |
Why Logs Don’t Get Clipped or Delayed
foreman’s log issues come from how processes detect their output destination. When a program’s stdout isn’t a real terminal, it switches to buffered mode β color escape codes get stripped and output batches until the buffer fills.
Overmind runs each process in a real tmux window and uses tmux’s control mode to capture output. From the process’s perspective it’s writing to a terminal, so colors stay intact and output is immediate.
Environment File Configuration
Rather than typing long flags every time, create .overmind.env in your project:
| |
Overmind reads this automatically on start. You can also put global settings in ~/.overmind.env.
Port Assignment
Overmind sets the PORT env variable for each process automatically:
- First process:
PORT=5000 - Second:
PORT=5100 - And so on (step defaults to 100)
Use it in your Procfile:
| |
Change the base port:
| |
Reference another process’s port:
| |
Running Only Some Services
When you only need web and worker, not the frontend build:
| |
Scaling
Run multiple instances of a process:
| |
Three worker instances start with ports assigned sequentially.
foreman vs Overmind
| Feature | foreman | Overmind |
|---|---|---|
| Basic Procfile support | β | β |
| Log color preservation | Often broken | Works correctly |
| Real-time log output | Buffered | Immediate |
| Restart single process | β | β |
| Connect to process | β | β |
| Can-die processes | β | β |
| Auto-restart | β | β |
| Dependency | None | tmux |
The main tradeoff is the tmux dependency. If tmux isn’t available or you only need basic Procfile management, the same author built Hivemind β no tmux integration, but no log problems either.
A Real Procfile Example
Rails + Sidekiq + Vite:
| |
With .overmind.env:
| |
Start everything:
| |
Three services, each in their own tmux window, colors intact, worker auto-restarts on crash, vite can exit without taking down the rest.
