Skip to main content
Browse docs

Create your production app

Make the separate copy of your app that your customers use: what it is, what it needs, and what 1904 does for you after one click.

On this page

Your app starts as a single app: you build it, try it and change it in the same place. Once real people use it, you want a version they can rely on while you keep working. That version is your production app.

What a production app is

A production app is a second app made from the one you have. It has its own address, its own database, its own uploaded files and its own settings. The app you already have becomes your development app: you keep building and testing there, and your customers use production.

Code moves in one direction, from development to production, and only when you release it. Nothing you try in development reaches your customers until then. See Release changes to production.

In your app list the two apps are marked Prod and Dev, and the production app is named after your app with "(Production)" added.

Before you start

  • An active plan. Creating production needs a plan in good standing, the same as creating any app.
  • A free running-app slot. Production is a whole second app that runs all the time, so it takes one of your plan's running-app slots. If every slot is in use, you'll see "Your plan runs 3 apps at a time, and all 3 are running." (with your plan's number). Stop an app you aren't using, then try again. See "Running apps" in Plans, billing, and credits.
  • Your code saved to main. Production is made from your development app's main version. Unsaved edits and work on other branches aren't included.
  • Permission. Owners can always create production. A member can when the app's Create production app permission is on, which it is by default.
  • One per app. Each development app has one production app, and a production app can't have its own.

Apps you started from existing code can have a production app too, and you don't need to publish the development app first. See Start from existing code.

Create it

  1. Open your app and select Settings, then Production.
  2. Under Launch your app, read the summary and select Create production app.

That's the only click. There's no form to fill in. If you'd like the reasoning in more detail first, open Why have a separate production app? at the bottom of the card.

Production settings for an app with no production app yet, showing the Launch your app card and the Create production app button

What 1904 does for you

After the click, 1904 carries on by itself. You can close the page and it keeps going.

  1. Creates the production app with its own address, an empty database, its own ports and its own settings.
  2. Copies the code from your development app's main version.
  3. Adapts that copy to production's own address, database and ports, so it never reaches back into your development app.
  4. Installs, builds and starts it, then checks that it responds at its public address.
  5. If that check fails, 1904 changes what production needs and tries again, for a few rounds, before telling you what went wrong.

Your development app's code isn't changed by any of this.

How long it takes and how you know it worked

A first launch usually takes 5 to 15 minutes. While it runs, the Production page shows the current step, such as installing dependencies or building, and refreshes by itself.

When it's done:

  • The Production page becomes your production overview, with a status of Live or Up to date and the time of the last release.
  • Open production opens the app your customers will use.
  • The release history lists the first launch as "First production build".
  • If production still needs keys from you, you get a notification saying it's live and which keys to add.

Production overview after the first launch, with the Live status, the health line, the New release card and the release history

Its address

Production gets a new address on 1904, made from your app's name plus a word. It's separate from your development app's address, which keeps working for your own testing. Find production's address under Open production, or in the production app's Settings, Domains & access.

To give customers your own domain, add it to the production app. A domain belongs to one app at a time, so if it's on your development app now, remove it there first. See Manage addresses and custom domains.

Add your keys

Production has its own settings and always runs on live values. 1904 fills in everything it can set, such as production's address and database. Keys from outside services, like live payment keys or an email provider's key, are yours to add. Production runs without them, and the features that use them stay off until you add them.

The Production page lists any keys still to add. Select Production settings to open the production app's Configuration and fill them in, then restart when 1904 asks you to. See Configure an application and, for payments, Connect Stripe to an app.

What stays separate

  • Data. Production starts with an empty database. Accounts, orders and other records your customers create stay in production, and releases never overwrite them. Development's test data never reaches production unless you copy it on purpose: see Copy development data to production.
  • Uploaded files. Each app keeps its own.
  • Settings and keys. Production doesn't inherit development's secrets. Development runs on its test values and production on its live ones.
  • Address and domains. Each app has its own.
  • Access. Who can open your development app, and its sharing and permission settings, are copied to production when it's created. After that, each app's access is managed on its own.

1904 also checks regularly that production doesn't still use anything of development's, such as its database, ports, address or keys, and warns you on the Production page if it does. See Check that production is up.

If something goes wrong

  • Production setup failed. If creating production or copying its code stops partway, the card says which step failed. Select Retry setup. A retry finishes the same production app; it doesn't create a second one or take another slot.
  • Production could not go live. If the first launch still fails after 1904 has tried adapting it, the page shows the error and you get a notification. Select Retry production launch.
  • The coding runtime isn't reachable yet. Your workspace's runtime is still starting. Wait a minute, refresh, and try again.
  • Your app runs things production can't copy. If your development app runs something its app.json file doesn't record, such as a second service, another database or a settings file, 1904 stops before creating production and lists what it found. Ask your agent in development to record them in app.json, save the change to main, then select Create production app again.

If you're a member without the permission, the card says to ask an owner.

Let a team member create it

Owners decide whether members can create production for an app:

  1. Open the app's Settings. Under Sharing, select Permissions.
  2. Turn Create production app on or off, then select Save permissions.

With it on, a member can create production, fill in its configuration and retry its first launch. Once production is live, only owners create and roll out releases. See Invite members and manage application access.

Make an independent copy instead

To try a different idea in a second app without touching production, open Other options on the same card and select Create a copy (owners only, before the app has a production app). A copy isn't linked to production and takes a running-app slot of its own while it runs. It gets its own address, its own database with a copy of this app's data, and this app's configuration except values that must be unique to each app. Custom domains aren't copied. Select Confirm and create copy, and 1904 opens the new copy and launches it for you.