---
schema_version: "1"
id: 6ee46eee2ee6f994a65b06f1e38730f0ef8dc24489d77557660bfd91c420d5f0
title: Deploy the Web App to Heroku
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/canvas-framework/guides/platform-connect/quick-start/quick-start-upload-app-to-heroku.md
canonical_url: https://developer.salesforce.com/docs/platform/canvas-framework/guide/quick-start-upload-app-to-heroku.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d34baa4e1e8cf600b6a6c910500de6deda7f848cc72ec2449de61e650708c5d8
products:
  - Canvas Developer Guide
  - Platform Developer Content
---

# Deploy the Web App to Heroku

After you run the web app locally and test it as a canvas app, deploy the web app to Heroku and run it from there.

**note:** Using dynos to complete this tutorial counts toward your [usage](https://devcenter.heroku.com/articles/usage-and-billing). [Scale your dynos to 0](https://devcenter.heroku.com/articles/scaling#scaling-from-the-dashboard) as soon as you’re done to minimize costs.

**important:** Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

1.  If you haven’t already, log into Heroku and install Heroku Toolbelt following the links in the [Prerequisites](https://developer.salesforce.com/docs/platform/canvas-framework/guide/quick-start-prereqs.md).

2.  Open a command window, navigate to c:\SalesforceCanvasFrameworkSDK, and enter this command: `git init`. This re-initializes the directory as a Git repository.

3.  In the command window, enter this command: `heroku create`. This creates a new “shell” app on Heroku.

    Confirmation that the app was created looks like this:

    ```nolang
    Creating deep-samurai-7923... done, stack is cedar
    http://deep-samurai-7923.herokuapp.com/ | git@heroku.com:deep-samurai-7923.git
    Git remote heroku added
    ```

4.  To rename this Heroku app, enter this command in the command window: `heroku rename newAppName -—app oldAppName`.

    In this example, _oldAppName_ is deep-samurai-7923. The _newAppName_ you create must begin with a letter and can only contain lowercase letters, numbers, and dashes. You’ll see a confirmation of the renaming that looks similar to this:

    ```nolang
    http://newappName.herokuapp.com/ | git@heroku.com:newappName.git
    ```

    The _newappName_ must be unique across all Heroku apps. This name becomes part of the URL for your app, for example, _newappName_.herokuapp.com.

5.  Run this command in the command window: `git add -A`. This adds the entire SalesforceCanvasFrameworkSDK project to the Git repository. If you’re working in the Windows environment, you might see some messages about LF (line feeds) being replaced by CRLF (carriage return line feeds).

6.  Enter this command in the command window to commit the changes along with a comment: `git commit —m “MyChangeComments”`.

7.  Enter this command in the command window to deploy the changes to Heroku: `git push heroku master`.

    If the process completes successfully, you’ll see something like this:

    ```nolang
    [INFO] -------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] -------------------------------------------------
    [INFO] Total time: 13.188s
    [INFO] Finished at: Sat Feb 09 21:14:23 UTC 2013
    [INFO] Final Memory: 11M/490M
    [INFO] -------------------------------------------------
    ```

    If you receive a “permission denied” error message, you may need to set up your SSH key and add it to Heroku. See [https://devcenter.heroku.com/articles/keys](https://devcenter.heroku.com/articles/keys).

8.  Open a command window, and set the Heroku environment variable that contains the consumer secret by entering this command and replacing _consumer_secret_value_ with the value you just copied: `heroku config:add CANVAS_CONSUMER_SECRET=consumer_secret_value`.

    To get the consumer secret for the canvas app, from Setup, enter `Apps` in the `Quick Find` box, then select **Apps** and click the Hello World app. You’ll see the Consumer Secret field in the OAuth Settings section.

9.  Verify that the app is running in Heroku by opening a browser and navigating to this URL: https://_newappName_.herokuapp.com/examples/hello-world/index.jsp.

    You should see a message that says, “This App must be invoked via a signed request!” This is an indication that the app is running in Heroku. This message appears because the app is designed to receive a signed request from Salesforce canvas environment.


**See Also**  


-   [Quick Start—Advanced](https://developer.salesforce.com/docs/platform/canvas-framework/guide/quick-start-intro.md)
-   [Configure Connected App Access](https://developer.salesforce.com/docs/platform/canvas-framework/guide/quick-start-config-who-can-access-canvas-app.md)
-   [Update the Canvas App](https://developer.salesforce.com/docs/platform/canvas-framework/guide/quick-start-update-canvas-app-heroku.md)

