It is very likely that you will want to create multiple key sets (pub/sub keys) for a single app so that your developers can implement new features and fix bugs, while your QA team is verifying that the next version is ready for production and meanwhile, your customers need to be unaffected by all this pre-release activity. You already have a database for each of these separate environments so it is only appropriate that you will want separate PubNub key sets for each environment, also.


You can create multiple key sets in the PubNub Admin Dashboard under a single app. Each key set will be configured according to its designated environment. Typically, dev and test keys will remain on the Free tier and the production key set will be upgraded to a paid tier. Use the Admin Dashboard to add key sets to an existing app and configure them as required (Presence, Storage, Mobile Push, etc).


When creating key sets in the PubNub Admin Dashboard, treat each of your key sets the same as your database instances. If you already have an environment config file containing the database connection parameters for the current environment that your app ingests at the initialization phase, then you can include the appropriate PubNub keys in there, too. For example, in your PubNub Admin Dashboard, you might have a couple of apps with three key sets for each, as follows:

  • App 1
    • Dev Keys
    • Test Keys
    • Prod Keys
  • App 2
    • Dev Keys
    • Test Keys
    • Prod Keys