Skip to main content


Ask HN: Are you leaving Heroku? -

Ask HN: So you moved off Heroku, where did you go? -

Starting October 26, 2022, we will begin deleting inactive accounts and associated storage for accounts that have been inactive for over a year. Starting November 28, 2022, we plan to stop offering free product plans and plan to start shutting down free dynos and data services.

(From the email) Starting November 28, 2022, free Heroku Dynos, free Heroku Postgres, and free Heroku Data for Redis will no longer be available

Autoscaling for Heroku:

The Procfile contains the command to start the app.


Install it with brew tap heroku/brew && brew install heroku. See

heroku --version

Login: heroku login

Open app in the browser: heroku open

Run the app locally: heroku local. It uses the Procfile to determine what to run. You can also do heroku local web

Set git remote 'heroku': heroku git:remote -a <app-name>

Push changes: git push heroku main

Run commands on the dyno: heroku run bash

List addons: heroku addons

List environment variables (Config Vars): heroku config. You can view them in

Set environment variable: heroku config:set NAME=VALUE

Get environment variable: heroku config:get NAME


View logs: heroku logs (100 lines)

View logs, 200 lines: heroku logs -n 200 (max number is 1500)

View logs updated in real-time: heroku logs --tail. Use Ctrl+C to stop.

heroku ps for dyno management


Runs the command specified in the Procfile.


Heroku Postgres addon

Add Heroku Postgres to app: heroku addons:create heroku-postgresql:hobby-dev

Show info: heroku pg

You can inspect the database by appending /db to the app url (tip: open the app with heroku open).

Python apps

Specify the runtime

Create a runtime.txt file that sets the Python version:


Specifying a Python Runtime:

Supported Python versions:

Add the buildpack

Python buildpack:

Add the Python buildpack: heroku buildpacks:set heroku/python


web: gunicorn app:app

Node apps

In Express.js, use process.env.PORT at app.listen().

With heroku run node you have access to the Node REPL, so you can run commands. It has access to the production database.


web: node main.js