Changing `` in `aurelia.json` doesn't change the host IP

Running au run in a brand new, default app in a docker container doesn’t expose the app over mapped ports because the app is listening on localhost rather than, but changing the setting in aurelia.json doesn’t seem to have any effect.

To get the app to listen on, I had to change webpack.config.js.

Is there a better way to do this?

See also this stackoverflow question:


cc @shahabganji

Before you replace host with, can you log the value of host? Some docker script might have passed a value to --host which overshadows in expression host ||



Sorry, Saeed is busy for a few days. He will reply ASAP.


You’ve added the Dockerfile manually, or you have gone through the “Custom Aurelia App” setup of the cli? If it’s the latter can you share which configurations you’ve chosen? Or tell me the steps to reproduce the problem?

1 Like

FYI, the stackoverflow issue has recieved a reply:
They have changed the value in webpack.config.js rather than in aurelia.json.


This is not anything with Aurelia, it is webpack that needs to change the host. I’ve answered on the stack question, just pass the —host to the au run command.


And there is no need to change anything, since you can override it with flags.

1 Like

au run --host did fix the problem without changing the webpack.config.js, which is good.

My question is, shouldn’t changing aurelia.json change the default setting, so I don’t have to use a command line argument? If not, is there a good way to change the default setting and what’s the purpose of aurelia.json?

Someone asked about my docker file and how I created the app. Here’s my Dockerfile:

FROM node

RUN npm install -g aurelia-cli



CMD /bin/bash

And I created the app, with au new and selected all the defaults, i.e. npm and ESNext. I think that should be enough to let you recreate it.

Thanks for all the help.

1 Like

OK, I got something wrong. Nothing to do with docker. Here is the log of host without explicit --host. Note the logged webpack command: webpack-dev-server --extractCss

⋊> ~/p/w au run
Local aurelia-cli v1.2.1
Starting 'run'...
`au run` is an alias of the `npm start`, you may use either of those; see README for more details.

> w@0.1.0 start /Users/huocp/playground/w
> webpack-dev-server --extractCss

host: localhost
ℹ 「wds」: Project is running at http://localhost:8080/

Somehow, the webpack config got localhost as the value of host, that means is never honoured in host ||

I need to find out why webpack config does that.


webpack-dev-server fills up some default value to webpack config. It adds host with value localhost when user didn’t explicitly set in command line.

This is annoying, our host || never worked.

The funny thing is webpack-dev-server only mutates the options passed to webpack config. Whether the user uses that passed in host value inside devServer config, it’s totally up to the user. This is beyond my comprehension of design.

1 Like

BTW, webpack-dev-server didn’t add default value to port option, so our port: port || project.platform.port, still works.

Update: Latest aurelia-cli release v1.2.2 bypassed this webpack-dev-server issue.

Fixed here:


It looks that @huochunpeng resolved the issue; about the Dockerfile, I see no problem in that, except that it is kind of development-like Dockerfile, for more information regarding this matter please check out here and here

1 Like