Mayan EDMS can be configure using various methods.
Via environment variables¶
Go to themenu.
Create a new index using Actions > Create new.
To use environment variables, lookup the name of the setting you want to
override in the
"MAYAN_" to the name of the settings option. For example, to change
the number of documents displayed per page (
COMMON_PAGINATE_BY, by default 40),
Restart Mayan EDMS and the new value will take effect. The Settings menu can be used to verify if the overridden setting value is being interpreted correctly.
Via YAML configuration file¶
New in version 3.1.
It is possible to modify the different settings by creating or editing the
media/config.yml file. This file is formatted in the YAML markup language
(http://yaml.org/). Here is an example of what the looks like:
DOCUMENT_PARSING_AUTO_PARSING: true DOCUMENT_PARSING_PDFTOTEXT_PATH: /usr/bin/pdftotext EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend EMAIL_HOST: localhost EMAIL_HOST_PASSWORD: '' EMAIL_HOST_USER: '' EMAIL_PORT: 25 EMAIL_TIMEOUT: null EMAIL_USE_SSL: false EMAIL_USE_TLS: false FILE_UPLOAD_MAX_MEMORY_SIZE: 2621440 HOME_VIEW: common:home
Every time Mayan EDMS is able to start correctly it will copy the
and create a backup copy in the same directory named
This file is used to revert to the last know configuration file known
to be valid. You can revert manually by copy the file or by using the
revertsettings management command from the command line.
Via Python settings files¶
Another way to configure Mayan EDMS and the one required when more extensive
setup is required (such as when using external Python libraries), is via
Python-style, settings files. A folder named
created for the purpose of hosting these settings files.
If you installed Mayan EDMS according to the Direct deployment
instructions provided in this documentation, your
folder should be located in the directory:
If Mayan EDMS was installed using Docker, the
folder will be found inside the Docker volume. If you installed Mayan EDMS
according to the Docker instructions provided in this
user_settings/ folder should be located in
Create a file with any valid name and a
.py extension in the
user_settings/ folder. The file must starts with a global import
mayan.settings.production. In the form:
from mayan.settings.production import *
Now add the corresponding lines to override the default settings.
In the settings file, it is not necessary to prepend the string
the setting option. For example, to change the number of documents displayed
per page (
COMMON_PAGINATE_BY, by default 40),
when using the environment variable method.
For this example let’s assume the file was saved with the name
The way used to tell Mayan EDMS to import this file will vary based on the installation method.
For the Direct deployment method, the full import path will be
mayan.media.user_settings.mysettings and can be passed via the
--settings command line argument like this:
/opt/mayan-edms/bin/mayan-edms.py runserver --settings=mayan.media.user_settings.mysettings
or via the
DJANGO_SETTINGS_MODULE environment variable like this:
To make the use of the custom Python setting file permanent, update the
file. In the
[supervisord] section, update the
environment= value of
DJANGO_SETTINGS_MODULE from the default
mayan.media.user_settings.mysettings. Pay attention to the
indentation and comma use of the
Force supervisor to read the changes and restart using:
sudo supervisorctl reread sudo supervisorctl restart all
For the Docker installation method, the full import
path will be
user_settings.mysettings and can only be passed
MAYAN_SETTINGS_MODULE environment variable like this:
docker run <...> -e MAYAN_SETTINGS_MODULE=user_settings.mysettings
The settings files must be valid Python modules. Errors in the Python settings files might prevent Mayan EDMS for starting properly. Errors other than syntax errors, might cause Mayan EDMS to starting up in an incomplete manner making debugging difficult.
The settings will be applied in the following order:
YAML configuration file.
Python settings file.
Only settings overridden via environment variables will be identified as such in the settings view.
Settings overridden or set via Python settings files will not be identified as such in the settings view.