Skip to content
Ghost Apps Preview

App lifecycle

What happens to an app from install to removal.

Install

  1. Someone on the site opens the app’s install link while signed in to Ghost Admin.
  2. Ghost reads the app’s signed manifest and challenges the app’s server to prove the app is the one the manifest describes (see The challenge). Then it shows what the app is, where it runs, who it says made it (Ghost can’t check the name yet), where it will appear, and the scopes it needs.
  3. They click Install, which approves those scopes for the whole site. Ghost installs the version they reviewed.

Only the site’s Owner and Administrators can install and manage apps for now, because apps act as the person using them.

A site can have each app only once. Installing the same app from a new address moves it there, after approval. An app signed with another identity key is a different app, including the same app on a developer’s computer and deployed, so going from one to the other means uninstalling and installing again (see App identity).

An app on your computer installs on Ghost in development mode, or on a hosted site through a tunnel.

Updates

Each time someone opens the app, Ghost checks its manifest for changes.

  • Small changes, like a new description or a new backend key, apply right away. Ghost retires a replaced backend key for good (see Replacing the backend key).
  • A scope the app no longer declares is removed right away too.
  • Bigger changes, like a new name, a new URL, or a new scope, mark the app Needs approval until someone approves them. If the developer undoes the change, the app starts working again by itself.
  • If Ghost can’t reach the app, it shows as unavailable until it’s back.
  • If the manifest is signed with another identity key, or the app’s server fails the challenge, Ghost keeps the app closed and says it couldn’t confirm the app comes from its developer.

The manifest lists which changes need approval.

Each app keeps a history of who installed, updated, approved, or uninstalled it, and when.

Uninstall

  • Uninstalling an app stops it from opening. Ghost keeps a record of it.
  • Ghost refuses the app’s requests to Ghost from then on. Where the app is already open, in another tab or for another staff user, it closes the next time it calls Ghost, or when someone comes back to its tab. An app that doesn’t call Ghost closes when Ghost Admin next renews its token, within about 50 minutes. Until it closes, its page keeps running, and still reaches its own server and anything else outside Ghost.
  • Installing it again starts fresh, from any identity key. Backend keys the app replaced stay retired for that identity key (see Replacing the backend key).
  • Preview links to unpublished posts and pages the app has read keep working.
  • Ghost doesn’t tell the app’s server yet. Anything the server keeps for your site stays there until it expires, or until you ask the developer to delete it.