/etc/grafana/grafana.ini is Readonly, I cannot update grafana.ini , need to config SMTP for email

  • What Grafana version and what operating system are you using?
    I using grafana version is “grafana/grafana-enterprise” , my operating system is linux.

I using docker install grafana.I using grafana offical command to isntall:
docker run -d -p 3000:3000 --name=grafana grafana/grafana-enterprise

  • What are you trying to achieve?
    I want to in grafana dashboard config Alerting to send email, and the dashboard guide me to config grafana.ini

  • How are you trying to achieve it?
    I entry grafana container , path: /etc/grafana/grafana.ini , find the [SMTP] configuation, and I want to update these . but systemt tips “/etc/grafana/grafana.ini is Readonly,”
    I cannot update grafana.ini.

  • What did you expect to happen?
    I expect I can update /etc/grafana/grafana.ini to set [SMTP] configuration, and using grafana dashboard can set email success.

I don’t know whether the "/etc/grafana/grafana.ini " path wrong? or should I what do.
Please give me some help. Thanks to all.

might this help? I would use the following approach

    volumes:
      - ./grafana:/etc/grafana/

and have your grafana.ini in the grafana folder on left. you could try this as in the docker run so that it pushes your customized ini to the container.

docker run -v ./grafana/grafana.ini:/etc/grafana/grafana.ini

You should mount important directories to your local volume. If you make changes inside the container, it will be lost when container’s volume is removed. I would suggest to run docker something like this.

docker run -d \
  -p 3000:3000 \
  --name=grafana \
  -v /path/to/grafana/data:/var/lib/grafana \
  -v /path/to/grafana/logs:/var/log/grafana \
  -v /path/to/grafana/plugins:/var/lib/grafana/plugins \
  -v /path/to/grafana/config/grafana.ini:/etc/grafana/grafana.ini \
  grafana/grafana-enterprise

Hi viha,
the /etc/grafana/grafana.ini source file where can I get ? I using docker install grafana, I follow you guide , but I do not get the grafana.ini source file then put my local path.

You can create a grafana.ini file on your local system (outside docker) first. Since you’re interested in enabling SMTP settings, the grafana.ini file will contain below content.

[smtp]
enabled = true
host = smtp.your-email-provider.com:587
user = your-email@example.com
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
password = your-email-password
cert_file =
key_file =
skip_verify = false
from_address = your-email@example.com
from_name = Grafana
ehlo_identity =

Hi yosiasz,
thanks , bro.

1 Like

get, thanks, bro, have a good day.