Overmind
Process manager for Procfile-based applications and tmux
Install / Use
/learn @DarthSim/OvermindREADME
Overmind is a process manager for Procfile-based applications and tmux. With Overmind, you can easily run several processes from your Procfile in a single terminal.
Procfile is a simple format to specify types of processes your application provides (such as web application server, background queue process, front-end builder) and commands to run those processes. It can significantly simplify process management for developers and is used by popular hosting platforms, such as Heroku and Deis. You can learn more about the Procfile format here.
There are some good Procfile-based process management tools, including foreman by David Dollar, which started it all. The problem with most of those tools is that processes you want to manage start to think they are logging their output into a file, and that can lead to all sorts of problems: severe lagging, and losing or breaking colored output. Tools can also add vanity information (unneeded timestamps in logs). Overmind was created to fix those problems once and for all.
See this article for a good intro and all the juicy details! Introducing Overmind and Hivemind
<a href="https://evilmartians.com/?utm_source=opensource"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://evilmartians.com/badges/sponsored-by-evil-martians_v2.0_for-dark-bg@2x.png" > <img src="https://evilmartians.com/badges/sponsored-by-evil-martians_v2.0@2x.png" alt="Sponsored by Evil Martians" width="236" height="54" > </picture> </a>Overmind features
You may know several Procfile process management tools, but Overmind has some unique, extraterrestrial powers others don't:
- Overmind starts processes in a tmux session, so you can easily connect to any process and gain control over it;
- Overmind can restart a single process on the fly — you don't need to restart the whole stack;
- Overmind allows a specified process to die without interrupting all of the other ones;
- Overmind can restart specified processes automatically when they die;
- Overmind uses tmux's control mode to capture process output — so it won't be clipped, delayed, and it won't break colored output;
- Overmind can read environment variables from a file and use them as parameters so that you can configure Overmind behavior globally and/or per directory.
If a lot of those features seem like overkill for you, especially the tmux integration, you should take a look at Overmind's little sister — Hivemind!

Installation
Note: At the moment, Overmind supports Linux, *BSD, and macOS only.
Overmind works with tmux, so you need to install it first:
# on macOS (with homebrew)
$ brew install tmux
# on Ubuntu
$ apt-get install tmux
Note: You can find installation manuals for other systems here: https://github.com/tmux/tmux
There are three ways to install Overmind:
With Homebrew (macOS)
brew install overmind
With Ruby
gem install overmind
You can read about installing on Ruby On Rails [here] (https://github.com/DarthSim/overmind/blob/master/packaging/rubygems/README.md)
Download the latest Overmind release binary
You can download the latest release here.
Build Overmind from source
You need Go 1.21 or later to build the project.
$ go install github.com/DarthSim/overmind/v2@latest
The Overmind binary will be installed to $(go env GOPATH)/bin. Make sure that you added it to your PATH.
Note: You can update Overmind the same way.
Usage
In short: You can get help by running overmind -h and overmind help [command].
Running processes
Overmind reads the list of processes you want to manage from a file named Procfile. It may look like this:
web: bin/rails server
worker: bundle exec sidekiq
assets: gulp watch
To get started, you just need to run Overmind from your working directory containing a Procfile:
$ overmind start
You can also use the short alias:
$ overmind s
Specifying a Procfile
If a Procfile isn't located in your working directory, you can specify the exact path:
$ overmind start -f path/to/your/Procfile
$ OVERMIND_PROCFILE=path/to/your/Procfile overmind start
Specifying the ports
Overmind sets the environment variable PORT for each process in your Procfile so that you can do things like this:
web: bin/rails server -p $PORT
Overmind assigns the port base (5000 by default) to PORT for the first process and increases PORT by port step (100 by default) for each subsequent one. You can specify the port base and port step like this:
$ overmind start -p 3000 -P 10
$ OVERMIND_PORT=3000 OVERMIND_PORT_STEP=10 overmind start
Disabling PORT
If you don't want Overmind to set the PORT variable, you can disable it:
$ overmind start -N
$ OVERMIND_NO_PORT=1 overmind start
Referencing the ports of other processes
If overmind is specifying a port, each other process will be provided with environment variables that include them. Those variables will be have the format OVERMIND_PROCESS_<name>_PORT where "name" is the name of the process from the procfile, with any characters that are invalid in an environment variable replaced with _.
If processes are scaled, those port names will be numbered as well, based on the scaling of the process.
web: bin/rails server -p $PORT
proxy: ngrok http --subdomain overmind $OVERMIND_PROCESS_web_PORT
Running only the specified processes
You can specify the names of processes you want to run:
$ overmind start -l web,sidekiq
$ OVERMIND_PROCESSES=web,sidekiq overmind start
Not running the specified processes
Similar to the above, if there are some processes in the Procfile that you do not want to run:
$ overmind start -x web,sidekiq
$ OVERMIND_IGNORED_PROCESSES=web,sidekiq overmind start
This takes precedence over the previous -l flag. i.e. if you:
$ overmind start -l web -x web
$ OVERMIND_IGNORED_PROCESSES=web OVERMIND_PROCESSES=web overmind start
Nothing will start.
Scaling processes (formation)
By default, Overmind starts one instance of each process, but you can set the number of each process instances to run:
$ overmind start -m web=2,worker=5
$ OVERMIND_FORMATION=web=2,worker=5 overmind start
There is a special name all that you can use to scale all processes at once:
$ overmind start -m all=2,worker=5
$ OVERMIND_FORMATION=all=2,worker=5 overmind start
If you set instances number of some process to zero, this process won't be run:
$ overmind start -m some_production_task=0
$ OVERMIND_FORMATION=some_production_task=0 overmind start
Processes that can die
Usually, when a process dies, Overmind will interrupt all other processes. However, you can specify processes that can die without interrupting all other ones:
$ overmind start -c assets,npm_install
$ OVERMIND_CAN_DIE=assets,npm_install overmind start
Also, you can allow all processes to die:
$ overmind start --any-can-die
$ OVERMIND_ANY_CAN_DIE=1 overmind start
Auto-restarting processes
If some of your processes tend to randomly crash, you can tell Overmind to restart them automatically when they die:
$ overmind start -r rails,webpack
$ OVERMIND_AUTO_RESTART=rails,webpack overmind start
The special name all can also be used to restart all processes automatically when they die:
$ overmind start -r all
$ OVERMIND_AUTO_RESTART=all overmind start
[!NOTE]
OVERMIND_CAN_DIEsupersedesOVERMIND_AUTO_RESTART; if you want a restarting process, only put it inOVERMIND_AUTO_RESTART
Specifying the colors
Overmind colorizes process names with different colors. It may happen that these colors don't match well with your color scheme. In that case, you can specify your own colors using xterm color codes:
$ overmind start -b 123,123,125,126,127
$ OVERMIND_COLORS=123,123,125,126,127 overmind start
If you want Overmind to always use these colors, you can specify them in the environment file located in your home directory.
Show timestamps
By default, Overmind doesn't show timestamps in its output since it expects your processes to add timestamps to their own output. But you can make Overmind to add timestamps to its output:
$ overmind start -T
$ OVERMIND_SHOW_TIMESTAMPS=1 overmind start
Connecting to a process
If you need to gain access to process input, you can connect to its tmux window:
$ overmind connect <process_name>
You can safely disconnect from the window by h
