# Environment Variables are not working

**URL:** <https://community.grafana.com/t/environment-variables-are-not-working/21450>\
**Category:** Configuration\
**Created:** [September 26, 2019, 9:39pm UTC](https://community.grafana.com/t/environment-variables-are-not-working/21450 "2019-09-26T21:39:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![me2017](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@me2017](https://community.grafana.com/u/me2017)\
**Post date:** [September 26, 2019, 9:39pm UTC](https://community.grafana.com/t/environment-variables-are-not-working/21450/1 "2019-09-26T21:39:19Z")

</div>

I’m having a similar issue as described in the post below.

I’ve set the following vars:

```
# env | grep GF
GF_SERVER_HTTP_PORT=1234
GF_LOG_LEVEL=debug
GF_DATABASE_URL=mysql://grafana:PASSWORD@mydatabase.example.com:3306/grafana

systemctl start grafana-server

```

I would expect one of these to be reflected in the log, yet nothing appears:

` grep GF /var/log/grafana/grafana.log`

And settings are still reporing defaults:

`t=2019-09-26T21:30:14+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket=`

This post is similar to my issue but there is no followup:

> [@Environment variables doesn't work at all. help me plz](https://community.grafana.com/t/environment-variables-doesnt-work-at-all-help-me-plz/2557):
>
> Hola there. I’m trying to configure my grafana server by environment variables. For some reason, it doesn’t work at all. (for any configuration) Using latest build 4.4.3 on ubuntu 14.04 Before starting the service: (service grafana-server start) export GF\_SECURITY\_ADMIN\_PASSWORD=kuku export GF\_SERVER\_HTTP\_PORT=1337 service grafana-server start t=2017-09-03T15:12:13+0300 lvl=info msg=“Starting Grafana” logger=main version=4.4.3 commit=54c79c5 compiled=2017-08-07T11:50:18+0300 t=2017-09-03…

---

<div class="post-metadata">

**Author:** ![khalilruss15](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@khalilruss15](https://community.grafana.com/u/khalilruss15)\
**Post date:** [February 14, 2022, 4:35pm UTC](https://community.grafana.com/t/environment-variables-are-not-working/21450/2 "2022-02-14T16:35:56Z")

</div>

Did you ever find a solution for this problem? Having the same issue and have no clue what to do 😅
