Skip to main content

Development tunnel

While you develop an application locally, Riseact loads it inside an iframe in its own panel. Riseact's servers, however, cannot reach your computer: localhost only exists for you.

The tunnel solves that. riseact app dev opens a connection to the Riseact infrastructure and gives you a public HTTPS URL that forwards requests to your local server.

No external account and no token to configure: earlier versions of the CLI required an ngrok account, and that is no longer the case.

The URL is stable

Your development address looks like this:

https://d3f2c1a9b8e7d6c5b4a3f2e1d0.tun.riseact.org

The subdomain is derived from your application's credentials, so for the same application it is always the same. Two practical consequences:

  • you do not have to update the URL in your application on every restart, as you did with ngrok's random URLs
  • your OAuth redirect_uri values stay valid over time

The CLI updates the URL registered on Riseact automatically once the tunnel is ready.

Different applications get different subdomains, and nobody else can take yours: Riseact authorizes every tunnel by verifying the credentials of the application requesting it.

The first run is slower

The first time you open the tunnel for a new application, the HTTPS certificate for that subdomain does not exist yet and is issued on the spot. It takes a few seconds, and the CLI tells you:

Preparing the HTTPS certificate, this happens once per app...

The CLI waits for the certificate before printing the URL, so it works as soon as you open it in the browser. From the second run onwards this step is instant.

What goes through the tunnel

All HTTP traffic to your local server, WebSocket connections included. The SDK's hot reload therefore works through the tunnel with no extra configuration.

Stopping the tunnel

Ctrl+C closes the tunnel and the development server together. The subdomain is released immediately, so restarting right away works without waiting.

With the tunnel down, anyone opening the URL sees a page telling them to run riseact app dev.

If something goes wrong

"start error: invalid application credentials"

The client_id or client_secret in the project's .env does not match what is registered on Riseact. This happens if the application was recreated or its credentials regenerated. Run riseact app init in the project folder to link it again.

"start error: subdomain does not belong to this application"

The requested subdomain does not match the credentials presented. Usually this means .env was edited by hand, mixing credentials from different applications.

"router config conflict"

That subdomain is already in use by another connection: there is another riseact app dev running for the same application, perhaps in another terminal or left open. Close it and try again.

The iframe shows "The dev server is not answering yet"

The tunnel is working but your local server has not finished starting. Wait a few seconds and reload. If it persists, check in the terminal that the server actually came up on the expected port.

A certificate error in the browser

This happens if you open the URL before the tunnel is up, because the certificate is only issued once a tunnel is bound. Start riseact app dev and try again; if you retried many times before starting it, wait a few minutes before trying once more.

For anything else, the CLI keeps a detailed tunnel log at ~/.config/riseact-tunnel.log — attach it when you get in touch.