Skip to content

From dev to production

youcan app dev runs your app against a development store. Everything it sets up is temporary: the tunnel URL, the dev session, and the webhook subscriptions apply only to your dev store and expire when the session ends. This page shows how to take the same app to real stores.

1. Set your production URLs

During dev, the platform resolves your app through the tunnel. A released app needs a stable address. Set it in youcan.app.json:

json
{
  "name": "my-app",
  "app_url": "https://myapp.example.com",
  "redirect_urls": ["https://myapp.example.com/auth/callback"]
}

youcan app deploy refuses to release when the app_url points at a tunnel host, or when an app with a web has none. Pass --force only when you know why. Extension-only apps have no app_url and deploy without one.

2. Deploy

sh
youcan app deploy

This validates your config and extensions, creates an immutable version, and releases it to every store that has your app installed. New installs get the released version.

  • --no-release creates the version without releasing it.
  • youcan app versions lists versions and marks the active one.
  • youcan app release --version 3 releases a specific version, including an older one. Use this to roll back.

Webhook subscriptions declared in your config follow the release: relative addresses resolve against the released app_url, and removed declarations unsubscribe. See Webhooks.

3. Give your server its credentials

Your production server verifies webhook signatures and calls the API with the app's credentials. Pull them into an env file:

sh
youcan app env pull --env-file .env.production

youcan app env show prints the same variables without writing a file.

4. Separate environments with linked configs

One config file means one app. To deploy the same codebase to a staging app and a production app, link a config per environment:

sh
youcan app config link production

This writes youcan.app.production.json, linked to the app you select. Every command accepts --config:

sh
youcan app deploy --config production
youcan app dev --config staging

The base youcan.app.json stays your default. Extension ids are tracked per config file, so each linked app owns its own extensions.

5. Distribute

A released app is live for the stores that installed it. To reach new sellers, submit it for review and list it on the marketplace. See Distribution & Review.