LOCALTR / DOCS

Prepare a Next.js project for local HTTPS on Mac

Verify the Next.js HTTP server first, then separate local naming, HTTPS trust and development-origin checks.

Environment
Your Next.js project · app steps are separate
Evidence scope
HTTP steps checked in a local Next.js 16.4.2 example project. Check Mac installation, HTTPS and public sharing separately.
Expected outcome
Verify your HTTP server first; check local naming, HTTPS trust and origin separately.

In this guide

Prerequisites

Use an existing Next.js project and a Node.js version satisfying its dependencies. The HTTP commands here were checked against Next.js 16.4.2 in an isolated fixture. The LocalTR steps require an available Mac release and the necessary permissions. A working HTTP server does not verify HTTPS trust or public sharing.

Start with the HTTP server

In your project directory, check that the dev script in package.json runs next dev. With npm, the separating -- forwards options to Next:

npm run dev -- --hostname 127.0.0.1 --port 3000

In another terminal, run curl -i http://127.0.0.1:3000/. The expected result for the example home page is 200 and your application’s content. If the port is busy, choose another port and use that same port in the later mapping. next dev is a development server; do not use it as production hosting.

Configure HTTPS separately at the proxy

When a verified LocalTR release is available, map the running HTTP service to port 3000 and choose a local name such as magaza.local. Verify that the named HTTP address opens the intended project first. Then follow the helper and CA trust steps in the local HTTPS guide and check https://magaza.local in your browser.

The Next upstream remains HTTP in this workflow. Enabling Next’s experimental HTTPS option does not verify LocalTR’s certificate trust setup. Bypassing a browser warning or disabling trust checks is not a successful test.

Development origins and expected results

If you see a development asset/origin warning, add the hostname you actually use to the existing Next configuration; retain its other settings. Example for next.config.mjs:

export default {
  allowedDevOrigins: ['magaza.local'],
};

This entry is a hostname, without a scheme, port or path. Restart Next and inspect the page and required assets. Test your app’s callback and cookie behavior using the complete origin too. Local HMR behavior does not verify public WebSocket/SSE support.

Troubleshooting and safety

If the direct port fails, fix the Next process or port first. If HTTP works but .local fails, inspect naming/helper mapping. If only HTTPS fails, inspect the hostname and certificate trust. Do not indiscriminately allow every hostname to resolve an origin restriction, or share real customer data through a development app.

Official references: Next CLI and allowedDevOrigins. Next, follow the first local address guide and verify HTTPS in your own environment. Review the separate public URL prerequisites if you need external access.

Your next step

Notify me when downloads open

The signed installer is in preparation. Check the download page for current release availability.

Does a step look different?

Contact support with your app version