<p>A <code>SECRET_KEY</code> has to be set in the <code>/opt/graphite/webapp/graphite/local_settings.py</code> file. More information could be found <a href="http://graphite.readthedocs.io/en/latest/config-local-settings.html" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 3.0
2017-10-29T19:51:54.927Z
2017-10-29T19:51:54.927Z
030
<p>We installed Graphite on our Linux server, and when we started running it, we saw the following warning from the <code>graphite-manage</code> script:</p>

<pre><code> graphite-manage syncdb --noinput

 /usr/lib/python2.7/site-packages/graphite/settings.py:246: UserWarning: 
 SECRET_KEY is set to an unsafe default. This should be set in 
 local_settings.py for better security
 warn('SECRET_KEY is set to an unsafe default. This should be set in 
 local_settings.py for better security')
 Creating tables ...
 Installing custom SQL ...
 Installing indexes ...
 Installed 0 object(s) from 0 fixture(s
</code></pre>

<p>How do you avoid this warning? What is needed to fix it?</p>

CC BY-SA 3.0
2017-11-29T15:23:20.030Z
May you extend on what you do not understand from the error message itself and what search/reading you did in graphite documentation which didn't solve the problem ?
Tensibai
<linux><python>
How to avoid and fix the warning from Graphite-manage?
yael
# How to avoid and fix the warning from Graphite-manage?

(Asked by: username_0 on 2017-10-29)

We installed Graphite on our Linux server, and when we started running it, we saw the following warning from the graphite-manage script:
 graphite-manage syncdb --noinput

 /usr/lib/python2.7/site-packages/graphite/settings.py:246: UserWarning: 
 SECRET_KEY is set to an unsafe default. This should be set in 
 local_settings.py for better security
 warn('SECRET_KEY is set to an unsafe default. This should be set in 
 local_settings.py for better security')
 Creating tables ...
 Installing custom SQL ...
 Installing indexes ...
 Installed 0 object(s) from 0 fixture(s

How do you avoid this warning? What is needed to fix it?

**Tags:** linux, python

> **Comments:**
> **username_1**: May you extend on what you do not understand from the error message itself and what search/reading you did in graphite documentation which didn't solve the problem ?  

---

## 1 answers

### Answer by username_2 on 2017-10-29. Score: 1

A `SECRET_KEY` has to be set in the `/opt/graphite/webapp/graphite/local_settings.py` file. More information could be found [here](http://graphite.readthedocs.io/en/latest/config-local-settings.html).


---

