Configure static ngrok hostname

Is it possible to configure ACE to use a static ngrok hostname in development? Can’t seem to find any instruction in the docs or this forum? I realise a paid plan with ngrok is required - but once this is in place how do you configure in ACE? ACE seems to just continue to establish a tunnel with a dynamic hostname?



1 Like

Hi, all you need to do is add: AC_OPTS=no-reg
in npm start script
In my case:

"scripts": {
    "start": "cross-env AC_OPTS=no-reg node -r esm app.js",

Or AC_LOCAL_BASE_URL= node app.js , to keep automatic registration, but you will need to start ngrok separately, e.g. ./node_modules/.bin/ngrok http -subdomain=yourdomain 3000

1 Like

Thanks so much Maciej and Andriy. Just the pointer I needed. In the end, I created a new npm run script as I wasn’t sure if changing my start script would impact deployment… so my solution was:

"scripts": {
    "start": "npm i && node -r esm app.js",
    "lint": "eslint app.js routes",
    "startdev": "npm i &&  AC_LOCAL_BASE_URL= node -r esm app.js"

Seems to work great - thanks again