Migrating Environment Variables and Add-Ons

Updated by Ben Heisel on Sep 24, 2015


This document is for users of AppFog v1 for migration to the next generation of AppFog that is located in CenturyLink Cloud Control Portal.

Before deleting any applications or services on AppFog v1 ensure you have local copies. Once apps and services are deleted it is permanent. We will not be able to provide a backup.

When migration is complete your billing subscription can be canceled from the Account page of the web console. Please be sure to cancel your subscription as we are not aware when individual user migration is complete. The billing system will not automatically prorate the subscription and issue a refund. If applicable, please open a Support Ticket or email [email protected] to receive a prorated refund of your subscription.

Obtain AppFog v1 Environment Variables

AppFog v1 Add-Ons utilize environment variables for connecting to the third-party service. You may continue use of your existing Add-On service on AppFog v2 by migrating the environment variable. There are several options for obtaining your application's current environment variables for migration to AppFog v2.

  • Via the web console navigate to the Mission Control page of your app. Then select the "Env Variables" tab from the left menu.
  • From your terminal use the AF tool command:
    $ af env <appname>
  • Example:
| Variable           | Value                                        |
| MONGOLAB_URI       | <MONGOLAB_URI>                               |
| ELEPHANTSQL_URL    | <ELEPHANTSQL_URL>                            |
| IRON_MQ_TOKEN      | <IRON_MQ_TOKEN>                              |              
| IRON_MQ_PROJECT_ID | <IRON_MQ_PROJECT_ID>                         |                                         
  • Use the AppFog API to obtain a JSON object containing the application's environment variables, along with additional useful information. You will need your AF token, typically located in your home directory as .af_token.
    `$ curl -X GET -H Authorization:'$TOKEN' https://api.appfog.com/apps/`
  • Example curl for app "addon_test":

Import Environment Variables to AppFog v2

  • If you don't have your app deployed yet: How to Migrtate an App
  • Environment variables can be viewed or set in AppFog v2 with the following commands:
    $ cf env <appname>
    $ cf set-env <appname> <variable>  <value>
  • Example:
    $ cf set-env addon_test IRON_MQ_TOKEN 
    More information on working with AppFog v2 environment variables can be found at Cloud Foundry Environment Variables.

Customer Support

Can’t find what you need?
Give us a call.


M – F, 8am to 6pm