GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — emoncms/default-settings.php at master · emoncms/emoncms

Expand file tree

/

default-settings.php

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
363 lines (303 loc) · 13.2 KB
/

default-settings.php

Copy path

File metadata and controls

363 lines (303 loc) · 13.2 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
<?php
# ------------------------------------------------------------
# Default emoncms settings.php - DO NOT EDIT!!
# ------------------------------------------------------------
// no direct access
defined('EMONCMS_EXEC') or die('Restricted access');
$_settings = array(
// Set Emoncms installation domain here to secure installation e.g domain = myemoncmsinstall.org
"domain" => false,
// Installation path for symlinked emoncms modules
"emoncms_dir" => "/opt/emoncms",
// Installation path for the emonpi and EmonScripts repository
"openenergymonitor_dir" => "/opt/openenergymonitor",
// Show all fatal PHP errors
"display_errors" => true,
// Set to true to run database update without logging in
// URL Example: http://localhost/emoncms/admin/db
"updatelogin" => false,
// index.php: force a redirect to https for every request except login.
// Leave true unless the install genuinely has no certificate.
// "https_enable" => true,
// Read only mode. Non admin users keep read access but lose write access, and
// registration is turned off.
"ui_read_only_mode" => false,
// -----------------------------------------------------------------------
// Storage and services
// -----------------------------------------------------------------------
// MySQL / MariaDB connection.
"sql"=>array(
"server" => "localhost",
"database" => "emoncms",
"username" => "_DB_USER_",
"password" => "_DB_PASSWORD_",
"port" => 3306,
// Skip database setup test - set to false once database has been setup.
"dbtest" => true
),
// Redis
"redis"=>array(
'enabled' => false,
'host' => 'localhost',
'port' => 6379,
'auth' => '',
'dbnum' => '',
'prefix' => 'emoncms' // should this be the default here?
),
// MQTT
"mqtt"=>array(
// The 'subscriber' topic format is rx/* - where * is the emoncms input node number.
// The 'publisher' topic format is user selectable from the 'Publish to MQTT' input process, for example power/solar
// Activate MQTT by changing to true
'enabled' => false,
'host' => 'localhost',
'port' => 1883,
'user' => '',
'password' => '',
'basetopic' => 'emon',
'client_id' => 'emoncms',
'userid' => 1,
'multiuser' => false,
'pub_count' => false, // Publish message count to MQTT every 5 minutes
// secure MQTT parameters
// capath must be defined to enable SSL usage.
// This is the only setting required to connect to a SSL mqtt broker.
//'capath' => '/etc/ssl/certs',
// The following settings are related to your CLIENT certificate, if your broker requires client authentication.
// certpath must point to your client certificate
//'certpath' => '/etc/letsencrypt/live/yoursite/fullkey.pem',
// keypath must point to your client private key
//'keypath' => '/etc/letsencrypt/live/yoursite/privatekey.pem',
// keypw is the client private key password.
// do not define if your private key is not password protected
//'keypw' => ''
),
// -----------------------------------------------------------------------
// Inputs and feeds
// -----------------------------------------------------------------------
"input"=>array(
// Max number of allowed different inputs per user. For limiting garbage rf data
'max_node_id_limit' => 32
),
"feed"=>array(
// The following is a list of feed engines that are disabled by default
// Existing feeds on a hidden engines keep working and stay readable.
//
// 0 MYSQL traditional mysql
// 2 PHPTIMESERIES variable interval
// 5 PHPFINA fixed interval
// 6 PHPFIWA fixed interval with averaging (deprecated)
// 8 MYSQLMEMORY mysql MEMORY tables, all data lost on shutdown
//
// This should default to an empty array. A non-empty default here could not be cleared from settings.php
'engines_hidden' => array(),
// Low-write mode. Data is buffered in redis and flushed to disk by the
// feedwriter service rather than written on every input. Requires redis
// enabled and the feedwriter service running.
'redisbuffer' => array(
// If enabled is true, requires redis enabled and feedwriter service running
'enabled' => false,
// Number of seconds to wait before write buffer to disk - user selectable option
'sleep' => 60
),
// Engine data directories. Emoncms must be able to write to these.
'phpfina' => array('datadir' => '/var/opt/emoncms/phpfina/'),
'phptimeseries' => array('datadir' => '/var/opt/emoncms/phptimeseries/'),
// MysqlTimeSeries table naming. With generic true every feed is stored in a
// table named prefix + feed id. Set to false to name each table on creation.
// The engine can also use its own database server, add 'server', 'port',
// 'database', 'username' and 'password' here to enable that.
'mysqltimeseries' => array('generic' => true, 'prefix' => 'feed_'),
// Minumum PHPFina feed interval
'min_feed_interval' => 10,
// Most datapoints one feed/data call may return. Raising it allows longer
// ranges in a single request at the cost of memory and response time.
'max_datapoints' => 70000,
// CSV export options for the number of decimal_places, decimal_place_separator and field_separator
// The thousands separator is not used (specified as "nothing")
// number of decimal places
'csv_decimal_places' => 2,
// decimal place separator
'csv_decimal_place_separator' => ".",
// field separator
'csv_field_separator' => ",",
// Max csv download size in MB
'csv_downloadlimit_mb' => 25
),
// -----------------------------------------------------------------------
// Accounts
// -----------------------------------------------------------------------
// Account password hashing
//
// algo is "bcrypt" (default) or "argon2id".
//
// bcrypt: always available, low memory use, sufficient for a single user RPi
//
// argon2id is stronger, because its cost is memory as well as time and memory is
// the scarce resource on a GPU cracking rig. Use it where you control the server
// and can spare the RAM. It needs PHP built with libargon2, and its hashes are 97
// characters, so run the database update first so that users.password is
// varchar(255). If argon2 is unavailable emoncms falls back to bcrypt and notes
// it in the error log.
//
// Changing this is safe at any time: existing hashes still verify whatever they
// were written with, and each account is rewritten to the new algorithm the next
// time its owner logs in.
"password"=>array(
'algo' => "bcrypt",
// bcrypt: 10 is roughly 50ms on a modest x86 server, more on a Pi.
// Each step up doubles the work.
'bcrypt_cost' => 10,
// argon2id: memory in KiB, then passes, then threads. 65536 KiB (64 MiB) with
// 3 passes is roughly 140ms on a modest x86 server. This much memory is held
// per concurrent login.
'argon2_memory_cost' => 65536,
'argon2_time_cost' => 3,
'argon2_threads' => 1
),
// -----------------------------------------------------------------------
// User interface
// -----------------------------------------------------------------------
"interface"=>array(
// Applicaton name
'appname' => "emoncms",
// gettext translations are found under each Module's locale directory
'default_language' => 'en_GB',
// Theme colour options: "standard", "blue", "sun"
'themecolor' => "blue",
// Favicon filename in Theme/
'favicon' => "favicon.png",
// Default controller and action if none are specified and user is anonymous
'default_controller' => "user",
'default_action' => "login",
// Default controller and action if none are specified and user is logged in
'default_controller_auth' => "feed",
'default_action_auth' => "list",
// Requires module https://github.com/emoncms/graph
'feedviewpath' => "graph/",
// Enable multi user emoncms.
// If set to false, emoncms will automatically remove the register form and
// ability to create further users after the first user has been created
'enable_multi_user' => false,
// Enable remember me feature
'enable_rememberme' => true,
// Allow user to reset password
'enable_password_reset' => false,
// If installed on Emonpi, allow admin menu tools
'enable_admin_ui' => false,
// Email verification
'email_verification' => false,
// Disable rate limiting (login, register, auth, etc.)
// WARNING: only set to true in development/test environments
'disable_rate_limiting' => false,
// Which other sites may place emoncms pages in an iframe, sent as the
// Content-Security-Policy frame-ancestors header and, where it maps to a
// single keyword, X-Frame-Options. "self" allows this site only, which
// blocks clickjacking. "none" blocks all framing. A space separated list is
// also accepted, for example "self https://example.com"
'frame_ancestors' => "self",
// The same setting for content meant to be embedded on another site, a
// public dashboard and graph/embed. "*" allows any site, the long standing
// behaviour. Set it to an origin list, or to "self", to lock embeds down.
// It is not applied to a page the session cookie authenticated, so a
// private dashboard is covered by frame_ancestors above whatever this says.
'embed_frame_ancestors' => "*",
// Sent as the Referrer-Policy header. The default keeps the query string,
// which may carry an apikey or a readkey, out of the referer sent to
// another site, while leaving same origin requests alone. Set it to "" to
// send no header.
'referrer_policy' => "strict-origin-when-cross-origin",
),
"public_profile"=>array(
// Public profile functionality
// Allows http://yourdomain.com/[username]/[dash alias] or ?id=[dash id]
// Alternative to http://yourdomain.com/dashboard/view?id=[dash id]
// Add optional '&embed=1' in the end to remove header and footer
'enabled' => true
),
// -----------------------------------------------------------------------
// Email
// -----------------------------------------------------------------------
// How email is delivered.
//
// transport selects one of:
// smtp SMTP relay, configured in the "smtp" block below
// sendmail the local /usr/sbin/sendmail binary
// mailersend the MailerSend HTTP API
//
// Empty means smtp, or sendmail where the deprecated "smtp" sendmail flag is
// set, so installs that predate this block need no change.
"email"=>array(
'transport' => '',
// Address email is sent from, used by every transport
'from_email' => '',
'from_name' => '',
// Where the 'Send email' input process sends to
'default_to' => '',
// Only used by the mailersend transport. Create a key in the MailerSend
// dashboard. The sending domain has to be verified there, and from_email
// above has to be an address on it.
'mailersend_api_key' => ''
),
// SMTP relay connection, used by the smtp transport
"smtp"=>array(
'host'=>"",
// 25, 465, 587
'port'=>"",
// ssl or tls, leave empty for none
'encryption'=>"",
'username'=>"",
'password'=>"",
// Socket timeout in seconds
'timeout'=>30
),
// -----------------------------------------------------------------------
// Logging
// -----------------------------------------------------------------------
// Log file configuration
"log"=>array(
"enabled" => true,
// On windows or shared hosting you will likely need to specify a
// different logfile directory
"location" => "/var/log/emoncms",
// Log Level: 1=INFO, 2=WARN, 3=ERROR
"level" => 2
),
// -----------------------------------------------------------------------
// Modules
// -----------------------------------------------------------------------
// Dashboards
"dashboard"=>array(
// The button and curl widgets act when clicked instead of only displaying
// data. The button widget writes a value to a feed. The curl widget sends a
// request to an address stored in the dashboard.
//
// WARNING: both act in the session of whoever is viewing the page, and any
// dashboard marked public can be opened by any logged in visitor. A
// dashboard author can therefore point these at another account on the same
// install and get a visitor to trigger it with one click. Only enable this
// on a single user install, or where every account holder is trusted. Do
// not enable it on a server open to public registration.
'enable_action_widgets' => false
),
"device"=>array(
// Hide the device menu entry
'hide_menu' => false
),
// Apps
"app"=>array(
// Check and migrate the app module database tables on load. Set to false
// to skip the check once the schema is up to date.
'auto_migrate' => true
// Comma separated list of app names to hide from the app list, e.g my_solar_app
//,'hidden' => ''
// Key that allows myheatpump daily stats to be cleared without a write
// session. Leave it out unless you need it. An empty value would match an
// empty request.
//,'clearkey' => ''
),
"postprocess"=>array(
// Let the postprocess module run its jobs from cron.
"cron_enabled" => 0
)
);
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.