This add-on is operated by Cloudfury LLC

Private Package Repo for your app's dependencies


Last Updated: 22 February 2015

Table of Contents

Gemfury is an add-on for hosting and installing your private and custom code packages into your Heroku app. Dividing your application into separate packages is a good practice that allows reuse and DRY‘ing of your code across teams, projects, and applications. Gemfury supports RubyGems, Python packages, and NPM modules with more in the works.

Installing the add-on

Gemfury can be attached to a Heroku application via the CLI:

$ heroku addons:add gemfury:hello
-----> Adding gemfury to sharp-mountain-4005... done, v18 (free)

Once Gemfury has been added, a GEMFURY_URL setting will be available in the app configuration. It will contain the URL to your private package server, which can be retrieved using the heroku config command.

$ heroku config:get GEMFURY_URL

Upload your packages

Once Gemfury is provisioned you will need to upload your package files. One way is to hit the Upload button on your Gemfury dashboard:

$ heroku addons:open gemfury
Opening gemfury for sharp-mountain-4005…

Or by using curl from the command line:

$ curl -F p1=@your-1.x.gem `heroku config:get GEMFURY_URL`
~~> Processing package upload
    your-1.x.gem ... ok

Using with Ruby, Rails, and Sinatra

Having your application pull gems from your private repository is easy. Just prepend your Gem server URL as a source in your application’s Gemfile (in addition to the original source).

 source ''
 source ""

If you're seeing problems installing packages from Gemfury, please make sure your Source URL is correct. It's important to include the trailing slash in the URL.

Using with npm and Node.js

To use Gemfury for private modules in your Node.js application, get your secret Repo-URL from the dashboard or by running:

$ echo `heroku config:get GEMFURY_URL`

You have two options to link your private Gemfury registry to your app – one is good for exclusively using your Gemfury account, and the other is a blend with the public index.

Use Gemfury as your only registry

If you’ve decided to stop depending on the public registry and move all your package dependencies to Gemfury, you can do a full registry switch by adding an npm configuration file to the root directory of your Heroku app.

Create the following file {app-dir}/.npmrc


Use a blended private/public registry proxy

The above-mentioned registry only offers access to packages in your Gemfury account. However, we also offer a blended-index proxy to allow you to install packages from both your account and from the public index.

Just replace the Repo-URL hostname with in your {app-dir}/.npmrc


This will prioritize your private packages and fall-back to the public registry for named packages that are not found in your Gemfury account.

Using with PHP

To use Gemfury with your PHP application, you’ll need to use your secret Repo-URL to access private packages in your repository. You can find this URL on the Gemfury dashboard or by running:

$ echo `heroku config:get GEMFURY_URL`

To install private packages from your app, please add the following "repositories" section to your composer.json. You will still be able to use public packages from Packagist along with the ones from your Gemfury account.

 "repositories": [{
    "type": "composer",
    "url":  ""

Using with Python

To use Gemfury with your Python application, you’ll need to add your secret Repo-URL as an extra index. You can find this URL on the Gemfury dashboard or by running:

$ echo `heroku config:get GEMFURY_URL`

Deploying private packages from Gemfury is as easy as adding one line to the top of your requirements.txt You will still be able to use public packages from PyPI in addition to ones from your Gemfury account.


Migrating between plans

Plan migrations are easy and instant. Use the heroku addons:upgrade command to migrate to a new plan.

$ heroku addons:upgrade gemfury:solo
-----> Upgrading gemfury:solo to sharp-mountain-4005... done, v18 ($9/mo)
       Your plan has been updated to: gemfury:solo

Removing the add-on

Gemfury can be removed via the CLI.

This will destroy all associated data and cannot be undone!

$ heroku addons:remove gemfury
-----> Removing gemfury from sharp-mountain-4005... done, v20 (free)


All Gemfury support and runtime issues should be submitted via on of the Heroku Support channels. Any non-support related issues or product feedback is welcome at or via Twitter @Gemfury.