Unable to start Grafana from other location

I placed customized configuration file for grafana by name grafana_custom.ini inside /tmp directory and when I am trying to start grafana by using command:

./grafana-server -config /tmp/grafana_custom.ini web

It gives me following error:
Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath

Can someone please explain why this error is coming, I have removed defaults.ini from conf directory?

I also noticed that if I do not remove defaults.ini then it upload both the configuration files but then it always takes the port which is mentioned in defaults.ini and not the one which is mentioned in grafana_custom.ini, whereas I want to run grafana on port mentioned in grafana_custom.ini. If custom.ini is mentioned then why it is uploading default.ini and giving a precedence to it.

2 Likes

Hello Pajain,
I know is been over a year but I am new to Grafana and Iā€™m having the same issue, by any chance have you found a solution?
Thank you