Is console.address hardcoded in docker image?

Hi, i am trying to run start a Linux Node with docker. I am almost done, the last thing i want to do is bypass the docker NAT and make it bind directly at my NIC, so the docker runs with “–network host”

I was able to change the server port from 28978 to something like 20007, using the server.address variable in config.yaml, but i am unnable to change the console.address port fromm 14002 to something else like 14007. It just doesn’t apply the config i set in config.yaml. Is it hardcoded in docker somewhere? Or is there something i am missing?

This is going to be an issue when i want to start a second docker image

On a windows node i was able to change both but i wasnt using docker there

You can pass any parameter from the config file in the command line, including console.address. Command line takes precedence over the config file. Show your docker command.

Hi, i ran it with this command

sudo docker run -d --restart unless-stopped --stop-timeout 300
–network host
-e WALLET=“xxx”
-e EMAIL=“xxx”
-e ADDRESS=“xxx:20007”
-e STORAGE=“6.5TB”
–user $(id -u):$(id -g)
–mount type=bind,source=“/mnt/storjnode07/identity”,destination=/app/identity
–mount type=bind,source=“/mnt/storjnode07/data”,destination=/app/config
–mount type=bind,source=“/mnt/storjnode07/db”,destination=/app/dbs
–name storj07 storjlabs/storagenode:latest

the changes in yaml.config are just

server.address: :20007
console.address: :14007

fyi what i had before --network host i ran with this:

sudo docker run -d --restart unless-stopped --stop-timeout 300
-p 20007:28967/tcp
-p 20007:28967/udp
-p 14007:14002
-e WALLET=“xxx”
-e EMAIL=“xxx”
-e ADDRESS=“xxx:20007”
-e STORAGE=“6.5TB”
–user $(id -u):$(id -g)
–mount type=bind,source=“/mnt/storjnode07/identity”,destination=/app/identity
–mount type=bind,source=“/mnt/storjnode07/data”,destination=/app/config
–mount type=bind,source=“/mnt/storjnode07/db”,destination=/app/dbs
–name storj07 storjlabs/storagenode:latest

And they start from the first character in the line? Are you modifying the correct configuration file?

What’s in the log?

You can add the extra parameter to your docker run command:

sudo docker run -d --restart unless-stopped --stop-timeout 300 \
–network host \
-e WALLET="xxx" \
-e EMAIL="xxx" \
-e ADDRESS="xxx:20007" \
-e STORAGE="6.5TB" \
--user $(id -u):$(id -g) \
--mount type=bind,source=/mnt/storjnode07/identity,destination=/app/identity \
--mount type=bind,source=/mnt/storjnode07/data,destination=/app/config \
--mount type=bind,source=/mnt/storjnode07/db,destination=/app/dbs \
--name storj07 \
storjlabs/storagenode:latest \
--console.address=:14007 \
--server.address=:20007
3 Likes

Hi, yes it starts from the first character in the line, it is the correct config file because i can change the other variable server.address and it applies it after docker restart.

i saw nothing unsual in the log, no errors

But, thank you for that docker run command, that one works and it now uses port 14007 now instead of 14002! Being able to configure it via docker run is much more comfortable for managing it, no need to edit config files!

1 Like

It’s not hardcoded, but if STORJ_CONSOLE_ADDRESS is not set, it will be changed to 14002 by default in the entrypoint script.

: ${STORJ_CONSOLE_ADDRESS:=0.0.0.0:14002}
export STORJ_CONSOLE_ADDRESS

You can either used the runtime arguments (as it was suggested) or -e STORJ_CONSOLE_ADDRESS=....

I don’t like this behavior (personally I would prefer more transparent and more simple entrypoint script), but it’s hard to change without compatibility issues…

Sorry for this confusing behavior.

3 Likes

i think i see the problem now, so if i don’t set STORJ_CONSOLE_ADDRESS in docker run command, which i didn’t, it defaults to “0.0.0.0:14002”, and because it’s set now, it ignores the config.yaml configuration?

Yes, the command line arguments have a precedence over config file options and variables.
It was answered there:

Isn’t it more logical to first look at command line, then the config file, and then if there still is no value use the default 14002?

instead it first looks at command line, when there is no value there it takes the default 14002 and because it is set now, it ignores the config file?

Did you see this? Is console.address hardcoded in docker image? - #6 by elek

This behaviour is specific to STORJ_CONSOLE_ADDRESS, it is not universal.

Yes, exactly (and unfortunately)

There are a few params that are set in this way, like the allocated space for ex. If you don’t add it to docker run, it ignores the config.yaml too and uses whatever default is in the code.
So try to set almost everything in docker run, just to be sure.
Take a look here:
https://forum.storj.io/t/my-docker-run-commands-for-multinodes-on-synology-nas/22034?u=snorkel

1 Like

Which is a bit of a problem with using the TrueNAS SCALE app if you want to run on the host network, in order to use tcp fast open, as then it doesn’t give you the option to set the address.

It gives you an option to add a variable, so this is your solution:

If that comment was aimed at my post, I tried setting that variable in the TrueNAS app configuration, but it still tried to open the port at 14002.

Accordingly this it should, maybe a typo?

2025-09-27T18:25:27Z    FATAL   Unrecoverable error     {"Process": "storagenode", "error": "Failed to create storage node peer: listen tcp :14002: bind: address already in use", "errorVerbose": "Failed to create storage node peer: listen tcp :14002: bind: address already in use\n\tmain.cmdRun:86\n\tmain.newRunCmd.func1:33\n\tstorj.io/common/process.cleanup.func1.2:388\n\tstorj.io/common/process.cleanup.func1:406\n\tgithub.com/spf13/cobra.(*Command).execute:985\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:1117\n\tgithub.com/spf13/cobra.(*Command).Execute:1041\n\tstorj.io/common/process.ExecWithCustomOptions:115\n\tmain.main:34\n\truntime.main:283"}

Cheers.

You need to provide not only a port, but also an IP, i.e. 0.0.0.0:14004 or :14004

Both of those options threw the same error of port 14002 in use.

Cheers.

There is no need to use the crappy TrueNAS scale app. Using “Install via YAML” is way better in my opinion.

1 Like