NETCORESAAS
  • Welcome
  • Getting Started
    • Getting started
      • Frontend
      • Backend + Frontend
    • Deploy
      • Initialize git repository
      • Deploy to heroku
    • Environment variables
    • API
      • Controllers
    • Testing
      • Integration Tests
  • Other
    • Installing
      • 1. Install VSCode
      • 2. Install .NET Core SDK
      • 3. Install Node.js
      • 4. Test installation
    • Integrations
      • Stripe
        • Subscription Options
        • Getting the API Keys
        • Creating Stripe Products
        • Creating the Customer Portal
      • Email
        • SMTP
        • Postmark
      • Social Login
        • Google Sign In
      • Conversations
        • Intercom
        • Drift
  • Blog
Powered by GitBook
On this page
  • Install Heroku CLI
  • 1. Connect a heroku app
  • New app
  • Existing app
  • 2. Adding Node.js and .NET Core buildbacks
  • Heroku environment variables
  • 3. Deploy
  • 4. Open your app

Was this helpful?

  1. Getting Started
  2. Deploy

Deploy to heroku

PreviousInitialize git repositoryNextEnvironment variables

Last updated 4 years ago

Was this helpful?

Install Heroku CLI

If you haven't already, install the CLI:

1. Connect a heroku app

New app

Create your app manually at dashboard.heroku.com or type:

heroku create your-app

Existing app

If you've already created your app, connect it:

heroku git:remote -a your-app

2. Adding Node.js and .NET Core buildbacks

.NET Core is not officially supported on Heroku at present. Third party buildpacks are one option for extending the platform, for this project we are using:

heroku buildpacks:add heroku/nodejs
heroku buildpacks:add jincod/dotnetcore

Heroku environment variables

heroku config:set ASPNETCORE_ENVIRONMENT=Production

You can change environment variables directly from the heroku app settings:

3. Deploy

You can directly push to the heroku repository:

git push heroku master
git push origin master

4. Open your app

Open your app yourappname.herokuapp.com and ensure everything is working.

If you set your LIVE Stripe API Keys and LIVE products, keep in mind that you will be charged.

Or better yet, go to and enable Automatic deploys so you only deploy when you type:

https://devcenter.heroku.com/articles/heroku-cli
https://elements.heroku.com/buildpacks/jincod/dotnetcore-buildpack
https://dashboard.heroku.com/apps/YOUR-APP/deploy/github
Herokuapp deployed