-
Notifications
You must be signed in to change notification settings - Fork 137
Server Configuration
Starting with MunkiReport v4.0.0 you have to configure the application using environment variables set in the web server or in a .env
file in the root of the MunkiReport directory. Check .env.example
for the syntax.
Note: Some configurations need to be set using a YAML
file. Most notable are user accounts, dashboard layouts and module configurations.
Note: When upgrading from older versions: config.php
is not used anymore, you need to convert your settings to .env
Note about Docker: Start the container with the proper env vars by using the -e
flag or use --env-file
. Please note that when using --env-file
that you should not use quotes around the values as they get passed to the container.
You can set the variables in .env
by adding them line by line:
SITENAME="My Awesome MunkiReport Site"
# SQLite
CONNECTION_DRIVER="sqlite"
CONNECTION_DATABASE="db/db.sqlite"
# MySQL
CONNECTION_DRIVER="mysql"
CONNECTION_HOST="127.0.0.1"
CONNECTION_PORT=3306
CONNECTION_DATABASE="munkireport"
CONNECTION_USERNAME="root"
CONNECTION_PASSWORD=""
CONNECTION_CHARSET="utf8mb4"
CONNECTION_COLLATION="utf8mb4_unicode_ci"
CONNECTION_STRICT=TRUE
CONNECTION_ENGINE="InnoDB"
Default is index.php?
which is the most compatible form. You can leave it blank if you want nicer looking urls. You will need a server which honors .htaccess
(Apache) or figure out how to rewrite urls in the server of your choice.
INDEX_PAGE="index.php?"
$_SERVER
variable that contains the correct request path, e.g. REQUEST_URI
, QUERY_STRING
, PATH_INFO
, etc. Defaults to AUTO
.
URI_PROTOCOL="AUTO"
The hostname of the webserver, by default automatically determined but if that does not work you can set it. No trailing slash.
WEBHOST="https://munkireport"
Relative to the web root, with trailing slash. If you're running munkireport from a subdirectory of a website, enter subdir path here. E.g. if munkireport is accessible here: http://mysite/munkireport/
you should set subdirectory to '/munkireport/'
If you're using .htaccess
to rewrite urls, you should change that too. The code tries to automagically determine your subdirectory, if it fails, just add the following to .env
SUBDIRECTORY="/your_sub_dir/"
Will appear in the title bar of your browser and as heading on each webpage.
SITENAME="MunkiReport"
When false, all modules will be shown in the interface, this setting defaults to true
HIDE_INACTIVE_MODULES=FALSE
Currently six authentication methods are supported.
- "LOCAL": Local Authentication (setup via .yml files in local/users)
- "NOAUTH": No authentication
- "SAML": SAML-authentication
- "AD": LDAP-Authentication-(AD,-OpenLDAP,-FreeIPA)
- "NETWORK": IP based network Authentication
Authentication providers are checked by specifying the type in the AUTH_METHODS
array
AUTH_METHODS="SAML,LDAP,AD"
You must specify an option with AUTH_METHODS
to enable it!
Visit /index.php?/auth/generate
and put the downloaded .yml-file into local/users/
Paste the following line in your .env
:
AUTH_METHODS="NOAUTH"
Enable reCaptcha Support on the Authentication Form Request API keys from https://www.google.com/recaptcha
RECAPTCHA_LOGIN_PUBLIC_KEY=""
RECAPTCHA_LOGIN_PRIVATE_KEY=""
You can override the local
directory location by setting
LOCAL_DIRECTORY_PATH="/path/to/local/directory/"
in your .env
file. This allows you to keep your local configs separate from the MunkiReport files and optionally store them in your own versioning system.
If you are behind a proxy, MunkiReport may be unable to retrieve warranty and model information from Apple.
Note that there is only authenticated proxy support for basic authentication
PROXY_SERVER="proxy.yoursite.org" # Required
PROXY_USERNAME="proxyuser" # Optional
PROXY_PASSWORD="proxypassword" # Optional
PROXY_PORT=8888 # Optional, defaults to 8080
Authorize actions by listing roles appropriate array. Don't change these unless you know what you're doing, these roles are also used by the Business Units.
AUTHORIZATION_DELETE_MACHINE="user1,user2"
AUTHORIZATION_GLOBAL="admin1,admin2"
Add users or groups to the appropriate roles array.
ROLES_ADMIN="*"
Create local groups, add users to groups.
GROUPS_ADMIN_USERS="user1,user2"
Set to TRUE
to enable Business Units. For more information, see docs/business_units.md
.
ENABLE_BUSINESS_UNITS=TRUE
Set this value to TRUE
to force https when logging in. This is useful for sites that serve MR both via http and https.
AUTH_SECURE=TRUE
If you want to have link that opens a screensharing or SSH connection to a client, enable these settings. If you don't want the links, set either to an empty string.
VNC_LINK="vnc://%s:5900"
SSH_LINK="ssh://adminuser@%s"
Define path to the curl binary and add options this is used by the installer script. Override to use custom path and add or remove options, some environments may need to add "--insecure" if the servercertificate is not to be checked.
CURL_CMD="/usr/bin/curl, --fail, --silent, --show-error, --insecure"
By default munkireport will only install 3 basic reporting modules: munkireport, managed installs and disk_report. If you want the client to report on more items, visit:
http://example.com/index.php?/install/dump_modules/env
Paste the resulting MODULES="..." in your .env file. Remove items that you don't need reporting on from the array (e.g. servermetrics, certificate and service only make sense when installed on a client that runs Mac OS X server).
An empty list installs only the basic reporting modules, Machine and Reportdata.
MODULES='disk_report,munkireport,displays_info,network'
A module search path can be configured to facilitate custom modules. Example:
MODULE_SEARCH_PATHS=/full/path/to/custom-modules
Display a help button. Example:
SHOW_HELP=TRUE
HELP_URL=https://your.help.url
- General Upgrade Procedures
- How to Upgrade Versions
- Troubleshooting Upgrades
- Migrating sqlite to MySQL