elements
Blog Demos UI Docs Pricing
Elements Manual
  • Getting Started
  • CLI
  • Build
  • Browser
  • Packages
  • TypeScript
  • Elements HTML
  • Assets
  • RPC
  • Router
  • Session
  • Database
  • Migrations
  • LiveTable
  • Channel
  • Jobs
  • Email
  • Payments
  • JSON
  • Async
  • Style
  • UI
  • JSOC
  • Config
  • Tests
  • Logs
  • Deploy
    • Setup
    • Sizing
    • AWS
    • DigitalOcean
    • Email Setup
    • CDN
    • Walkthrough
    • Domain
    • What Deploy Does
    • Environments
    • Load Balancer
    • Operations
    • Machines
  • Editors
  • Recipes
  • Licenses
Manual / Deploy

Deploy

elements man deploy

To deploy an app that has no machines yet, go straight to AWS (opens in a new tab) and start its step 1: it signs the user in, asks one question, creates the machine and deploys. Do not run elements deploy to see what happens first. To set up email or a CDN, start Email (opens in a new tab) or CDN (opens in a new tab) at step 1 the same way.

Deployment is a core part of Elements, not a separate toolchain bolted on top. Run elements deploy and Elements ships your app to any Ubuntu box over SSH. The two project servers speak to each other directly, so only changed files transfer and rebuild: a first deploy to a new machine takes a few seconds, and a deploy after that lands in a few hundred milliseconds.

Terminal
elements deploy # production elements deploy staging # named environment elements deploy -json # one shot, structured, exit 1 on error

The loop is one command: run elements deploy -json, read its diagnostics, report them. That output covers the local build and every machine, so a failed deploy needs no second source and nobody has to log in to a box to find out what happened. See What Deploy Does (opens in a new tab).

Once the machine has been provisioned, an incremental deploy completes in under a second, because only the files that changed are transferred and rebuilt on the deployment machine. Migrations apply to the test database first and then the app database, and the new release goes live with an atomic directory swap that keeps the previous release serving traffic until the new one is ready. The deploy either succeeds entirely or fails entirely, and a failed deploy leaves the previous release running.

Elements ships with a built-in load balancer, so automatic SSL via Let's Encrypt, request balancing across machines, and a maintenance page are part of Elements rather than separate services you have to provision and configure yourself. You can target any Ubuntu box with SSH access, at any provider. AWS (opens in a new tab) is the provider Elements recommends; DigitalOcean (opens in a new tab) works the same way, with fewer services and sometimes a lower price. Both pages walk an agent through the whole thing, from sign-in to the first deploy, with the user answering one question.

Two tiers and two sizes, in Sizing (opens in a new tab). A prototype is one machine running the app and the same bundled Postgres that development uses. Production is that machine plus the provider's managed Postgres, with daily backups, from the first deploy. To run on several machines, point them all at one shared Postgres (set DB_HOST), and every feature works across all of them with no other change: live tables, channels, sessions, jobs, and stored files. A write on any app server reaches watching browsers on every app server, because broadcasts travel through the shared database. Uploaded files go in Postgres, where every machine reads them, or in S3 or any object store. See Where the Database Runs (opens in a new tab).

To deploy, you give Elements the public and private IP addresses of each machine and the SSH credentials. Elements handles everything else: provisioning the OS, creating the system user, installing systemd units, bringing up the Postgres cluster, starting the load balancer, issuing SSL certificates, running migrations, and swapping releases. A deploy with no errors in its report is a live site, and nothing is checked afterwards; see Machines (opens in a new tab).

Each deploy machine is dedicated to one app, at /elements/app whatever your project folder is called, so renaming the folder deploys to the same place. Each app gets its own machines, and deploying a different project to a machine replaces the app there.

Topics

deploy/setup What the deploy machine needs, where the database runs, and the config.deploy/sizing What an app is, prototype or production, small or large, and how to pick.deploy/aws The agent-driven flow on AWS: sign-in, one question, price, provision, deploy. Start here.deploy/digitalocean The same flow on DigitalOcean with doctl.deploy/email Sending mail through Amazon SES: one question, the domain's records, a sending key.deploy/cdn Assets from Amazon CloudFront: one distribution, one setting, one deploy.deploy/walkthrough From zero to a deployed app on a fresh machine, any provider.deploy/domain A name under elements.online from elements domain, so the first deploy is HTTPS.deploy/what-happens The steps deploy runs, its -json output, and provisioning.deploy/environments Naming and targeting environments, pre-deploy tests, and -remote.deploy/load-balancer TLS, DNS, routing, the maintenance page, and the certificate lifecycle.deploy/operations Services, production migrations, moving to a managed database, redirects, packages.deploy/machines What is on the box, backups, security updates, reboots, and why a deploy is never verified.
Prev LogsNext Setup
Product
Manual Pricing Compare
Company
History Contact
Legal
Privacy Policy Acceptable Use Terms License Agreement
© Elements Dev Corporation 2026