# Deploy, Licensing, Support Shipping the app, how load balancing works, and where to get help. ## Deploy Deploy to any Ubuntu Linux box with SSH access. Elements provisions the machine on first deploy (installs elements, creates a system user, sets up systemd, installs the license, configures the load balancer, provisions SSL, and brings up the bundled Postgres cluster). Deploys are fast and safe. They run peer-to-peer, your project server talking directly to the deploy machine's, so only changed files transfer and rebuild: a cold deploy takes a few seconds, a hot one a few hundred milliseconds when the server is close. Each machine stages the new release, runs the full build (compile, tests, migrations), and swaps it in with an atomic rename only after everything succeeds, so the previous release keeps serving until the new one is ready and a failed deploy leaves the running app untouched. Any failure (a compile error, a test failure, a migration failure) stops the release, and the cutover is coordinated across every machine, so if one fails none cut over and the whole cluster stays on the current release. You need SSH access (root or sudo user) and the machine's public and private IP addresses. Add the machine to `config.jsoc`: ```jsoc { deploy: { domain: "example.com", ssh: { user: "root", identityFile: "~/.ssh/id_ed25519", }, env: { production: { machines: [ { name: "production1", publicIp: "203.0.113.10", privateIp: "10.0.0.10" }, ], }, }, }, } ``` Then: ``` elements deploy # production by default elements deploy staging # named env elements ssh production # shell into the first production machine ``` The deploy machine runs the same bundled Postgres cluster as development. The scaffolded `config.jsoc` defaults `host` to `env("DB_HOST", "127.0.0.1")` and `production.env` sets `DB_HOST=127.0.0.1`, so a deploy uses the bundled cluster with no extra setup. Point at a remote database by setting `DB_HOST` (and the other `DB_*` values) in `production.env`. Local build failures block deploy. Deploy runs the same build as `elements build`. The `[host]` tag on a diagnostic identifies which machine the error came from; no `[host]` means the local machine. Full topic: `elements man deploy`. ## Load Balancing Every app server runs a built-in load balancer; no separate appliance, no config file. Each reads the same `config.jsoc` and reloads on new builds. Every machine knows the others, so any one can front the cluster: point DNS at one or all public app servers and requests balance round-robin across machines, with failover when one is unreachable. SSL is issued and renewed through Let's Encrypt for every configured domain. A static maintenance page serves only when every machine is down. Full topic: `elements man deploy`. ## Licenses and Purchasing Elements is licensed per machine. You pay for the tooling and own everything it produces. The trial is full functionality, no card. A purchase is a subscription that bundles licenses for the machine you develop from and the machine you deploy to. For current pricing and terms, see https://elements.dev/pricing. ``` elements purchase ``` After checkout, licenses are delivered automatically. Manual update: `elements license checkout`. - Pricing: https://elements.dev/pricing - Purchase: https://elements.dev/purchase Full topics: `elements man licenses`, `elements man purchase`. ## Support - https://elements.dev/feed: HN-style ranked posts from the community and the Elements team. Release announcements land here. - https://elements.dev/issues: bug reporting and tracking. Customers only. - https://elements.dev/learn: courses, open to the public.