Store your application config in Redis, expose it as environment variables to your app
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


redis-env allows you to easily use environment variables for configuring your application. The app config is stored in a centralized Redis database.


  • Storing application config in environment variables is better than storing it in configuration files. See the Twelve-Factor app for more.
  • Redis makes it easy to store and update the config centrally without sharing disks or pushing files out to all your servers.
  • We're not all running on Heroku. :)


git clone git://
go build
mv redis-env /usr/local/bin


Add config variables

redis-env --add DATABASE_URL=mysql://user@db-host.local

Remove config variables

redis-env --remove DATABASE_URL

List config variables

redis-env --list

Prints each config variable, one per line.


redis-env --run rackup

Loads the config as environment variables then execs the provided command. Exist with code 111 if the config could not be loaded from Redis, otherwise exits with the code from the executed command.


  • --netaddr NETADDR -- The location of the Redis instance. Defaults to tcp:
  • --db DB_INDEX -- The Redis database index for the config data. Defaults to 0.
  • --name NAME -- The name of the config to read. Defaults to default. Useful for storing multiple app configs in the same Redis.

Note: This is the first Go code I've ever written. Please be gentle.