Documentation

Deployment

Deploying a Nexugen project, environment variables and secrets, connecting a custom domain and SSL certificates.

Deploying your project

A finished build deploys to Nexugen hosting on its own; you do not need to trigger it. Nexugen prepares your app, fixes anything that stops it starting, sets up its storage if it needs one, keeps a copy of every file, starts it and marks it live. Every edit and every version restore redeploys the same way and, when GitHub is connected, pushes to the repository's main branch.

The app is served at your-slug.nexugen.app over HTTPS. Under Runtime you can see whether it is awake, when it was last used, and its latest screenshot.

Sleeping. Idle sleep is off unless a platform administrator turns it on platform-wide. Where it is on, an app that has had no traffic for a while is stopped and starts again on the next request; sleeping is normal, not an error. Set Keep warm on a project that must answer instantly, and it is never put to sleep.

Redeploy on demand from the project page ("Redeploy latest" uses the current code), or take the project off hosting entirely; the files and versions remain.

Environment variables

Each project has its own environment variables, managed under Environment on the project page or through the API. They are written to the app's .env at deploy time, so saving a change redeploys the app with the new values.

  • Mark a variable as a secret to keep its value masked in the dashboard. Do this for every key, token and password.
  • Recommendations lists the variables the project's code expects that are not set yet, with a description of each, so a deploy does not fail on a missing key.
  • Auth secrets the app needs internally (for example NextAuth's secret) are generated for you.
  • Version snapshots are team working material and can carry .env contents. They are never visible on a Public project, and restoring an old version restores its configuration too, so check the environment after a restore that crosses a database or key change.

Custom domains setup

  1. Open Domains on the project and add the domain (for example example.com). One domain can be attached to one project.
  2. Add the DNS records Nexugen shows you at your registrar. There are three: an A record for @ pointing at Nexugen's address, an optional A record for www pointing at the same address, and a TXT record for @ containing the verification token (it starts with nxg-verify-) that proves the domain is yours.
  3. Click Verify. DNS changes can take a while to propagate; Verify again if it does not pass at first.
  4. Once the A record resolves to Nexugen, an HTTPS certificate is issued for the domain automatically and the site answers on it.

Buying a domain. The Domains panel can also search for a domain you do not own yet, show its price, and take payment. After payment the domain is registered for you, its DNS is pointed at Nexugen and a certificate is issued, with nothing for you to configure at a registrar. Registration runs through Namecheap, so it is available when that connection is enabled on the platform.

SSL certificates

There is nothing to configure. Every *.nexugen.app subdomain is covered by a Let's Encrypt certificate that is extended to include a new project the moment it deploys. A verified custom domain gets its own certificate issued the same way. Renewal is automatic.

NextSecurity