Configuration
Variables
Simple Directory supports quite a large number of parameters that are documented below. We try as much as possible to define sensible default values, still some parameters will almost always need to be overridden, these parameters have IMPORTANT in their descriptions.
Parameters can be overridden by directly modifying the files, but the recommanded way is to use environment variables.
Key in the configuration file | Environment variable | Description | Default value |
---|---|---|---|
port | PORT | 8080 | |
publicUrl | PUBLIC_URL | IMPORTANT. The URL where the service will be exposed. For example https://koumoul.com/simple-directory | http://localhost:8080 |
kid | JWT_KID | simple-directory | |
sessionDomain | SESSION_DOMAIN | null | |
jwtDurations.initialToken | JWT_DURATION_INITIAL | 15m | |
jwtDurations.exchangedToken | JWT_DURATION_EXCHANGED | 30d | |
jwtDurations.invitationToken | JWT_DURATION_INVIT | 10d | |
admins | ADMINS | IMPORTANT. The list of email addresses of the administrators of this service. | ["admin@test.com"] |
adminsOrg | ADMINS_ORG | null | |
roles.defaults | ROLES_DEFAULTS | ["admin","user"] | |
roles.editable | ROLES_EDITABLE | false | |
contact | CONTACT | IMPORTANT. The email address of contact for users of the service. | contact@test.com |
homePage | HOME_PAGE | null | |
secret.public | PUBLIC_KEY | IMPORTANT. The key to the public RSA signing key. See the install doc of the service. | ./security/simple-directory.key.pub |
secret.private | PRIVATE_KEY | IMPORTANT. The key to the private RSA signing key. See the install doc of the service. | ./security/simple-directory.key |
storage.type | STORAGE_TYPE | IMPORTANT. The type of storage for persisting users and organizations. The default type "file" is read-only and suited for development/test or to use data exported from another system. The type "mongo" depends on accessing a MongoDB instance, it is the approriate choice for most production deployments. | mongo |
storage.file.users | STORAGE_FILE_USERS | Only for storage.type=file. The path to the JSON file containing users definitions | ./data/users.json |
storage.file.organizations | STORAGE_FILE_ORGS | Only for storage.type=file. The path to the JSON file containing organizations definitions | ./data/organizations.json |
storage.mongo.url | STORAGE_MONGO_URL | Only for storage.type=mongo. The full connection string for mongo database. | mongodb://mongo:27017/simple-directory-production |
analytics | ANALYTICS | JSON for configuring analytics, matches with the "modules" section of the lib vue-multianalytics | {} |
webhooks.identities | IDENTITIES_WEBHOOKS | [] | |
theme.logo | THEME_LOGO | The URL to replace Simple Directory's default logo. | null |
theme.dark | THEME_DARK | Switch the whole apparence of pages to a dark style. Note that the default colors are mote adapted to a light style, if you switch to dark you will have to modify them. | false |
theme.colors.primary | THEME_PRIMARY | #1E88E5 | |
theme.colors.secondary | THEME_SECONDARY | #42A5F5 | |
theme.colors.accent | THEME_ACCENT | #FF9800 | |
theme.colors.error | THEME_ERROR | FF5252 | |
theme.colors.info | THEME_INFO | #2196F3 | |
theme.colors.success | THEME_SUCCESS | #4CAF50 | |
theme.colors.warning | THEME_WARNING | #E91E63 | |
theme.cssUrl | THEME_CSS_URL | Link to a stylesheet to complement the branding variables. WARNING: the HTML structure can change from one version to another. Maintaining an external stylesheet is going to create extra work for you on upgrades. | null |
theme.cssText | THEME_CSS_TEXT | Raw css content to complement the branding variables. WARNING: the HTML structure can change from one version to another. Maintaining an external stylesheet is going to create extra work for you on upgrades. | |
i18n.locales | I18N_LOCALES | ["fr","en"] | |
mails.transport | MAILS_TRANSPORT | IMPORTANT. A JSON object of configuration for the email transport compatible with the library nodemailer. | {"port":1025,"ignoreTLS":true,"default":"localhost"} |
mails.from | MAILS_FROM | 'IMPORTANT.> The address to use as sender for emails sent by the service. | no-reply@test.com |
maildev.url | MAILDEV_URL | http://localhost:1080 | |
maildev.active | MAILDEV_ACTIVE | false | |
maildev.smtp | MAILDEV_SMTP | 1025 | |
maildev.web | MAILDEV_WEB | 1080 | |
quotas.defaultMaxCreatedOrgs | DEFAULT_MAX_CREATED_ORGS | -1 | |
quotas.defaultMaxNbMembers | DEFAULT_MAX_NB_MEMBERS | 0 | |
listEntitiesMode | LIST_ENTITIES_MODE | Used to restrict in a global manner access to the lists of users and organizations. Can be 'anonymous', 'authenticated' or 'admin'. | authenticated |
onlyCreateInvited | ONLY_CREATE_INVITED | If true users can not be created at first email sent. They must be invited in an organization. | false |
defaultLoginRedirect | DEFAULT_LOGIN_REDIRECT | Default redirection after login. If not specified user will go to his profile page. | null |
invitationRedirect | INVITATION_REDIRECT | null | |
secretKeys.sendMails | SECRET_SENDMAILS | null | |
secretKeys.limits | SECRET_LIMITS | null | |
listenWhenReady | LISTEN_WHEN_READY | false | |
noUI | NO_UI | false | |
tosUrl | TOS_URL | IMPORTANT. The URL toward you terms of services. If this parameter is empty or does not link toward a proper Web page you risk not satisfying your obligations toward your users. | null |
manageDepartments | MANAGE_DEPARTMENTS | false | |
manageDepartmentLabel | MANAGE_DEPARTMENT_LABEL | false | |
passwordless | PASSWORDLESS | true | |
authRateLimit.attempts | AUTHRATELIMIT_ATTEMPTS | 5 | |
authRateLimit.duration | AUTHRATELIMIT_DURATION | 60 | |
oauth.providers | OAUTH_PROVIDERS | [] | |
oauth.github.id | OAUTH_GITHUB_ID | ||
oauth.github.secret | OAUTH_GITHUB_SECRET | ||
oauth.facebook.id | OAUTH_FACEBOOK_ID | ||
oauth.facebook.secret | OAUTH_FACEBOOK_SECRET | ||
oauth.google.id | OAUTH_GOOGLE_ID | ||
oauth.google.secret | OAUTH_GOOGLE_SECRET | ||
oauth.linkedin.id | OAUTH_LINKEDIN_ID | ||
oauth.linkedin.secret | OAUTH_LINKEDIN_SECRET |
Internationalization
All messages in Simple Directory are externalized and internationalized.
To add a language you can add a file in this directory either by overwriting the Docker image or submitting a pull request.
To change some values you can set environment variables when running the service. The table below contains the supported keys. Warning: we try to keep the keys as stables as possible, but still some modification may occur between 2 versions of Simple Directory. If you overwrite some values, you should check it again after each upgrade.
Key in I18N file | Environment variable | Value |
---|---|---|
common.id | I18N_en_common_id | Identifier |
common.next | I18N_en_common_next | Next |
common.name | I18N_en_common_name | Name |
common.home | I18N_en_common_home | Home |
common.save | I18N_en_common_save | Save |
common.role | I18N_en_common_role | Role |
common.user | I18N_en_common_user | User |
common.back | I18N_en_common_back | Back |
common.email | I18N_en_common_email | |
common.login | I18N_en_common_login | login |
common.users | I18N_en_common_users | Users |
common.logout | I18N_en_common_logout | logout |
common.reject | I18N_en_common_reject | Reject |
common.accept | I18N_en_common_accept | Accept |
common.avatar | I18N_en_common_avatar | Avatar |
common.search | I18N_en_common_search | Search |
common.asAdmin | I18N_en_common_asAdmin | Log as this user |
common.members | I18N_en_common_members | Members |
common.logLink | I18N_en_common_logLink | login / sign up |
common.validate | I18N_en_common_validate | Validate |
common.password | I18N_en_common_password | Password |
common.birthday | I18N_en_common_birthday | Birthday |
common.loggedAt | I18N_en_common_loggedAt | Logged at |
common.lastName | I18N_en_common_lastName | Family name |
common.editTitle | I18N_en_common_editTitle | Edit {name} |
common.firstName | I18N_en_common_firstName | First name |
common.createdAt | I18N_en_common_createdAt | Created on |
common.updatedAt | I18N_en_common_updatedAt | Updated on |
common.confirmOk | I18N_en_common_confirmOk | Ok |
common.autoAdmin | I18N_en_common_autoAdmin | Automatically add me as admin |
common.dashboard | I18N_en_common_dashboard | Dashboard |
common.myAccount | I18N_en_common_myAccount | My account |
common.department | I18N_en_common_department | Department |
common.delAsAdmin | I18N_en_common_delAsAdmin | Get back to your normal session |
common.checkInbox | I18N_en_common_checkInbox | Check your mail box |
common.missingInfo | I18N_en_common_missingInfo | Missing info |
common.departments | I18N_en_common_departments | Departments |
common.spamWarning | I18N_en_common_spamWarning | If you didn't receive an email, check if it was classified as spam in your mail box. |
common.invitations | I18N_en_common_invitations | Invitations |
common.description | I18N_en_common_description | Description |
common.organization | I18N_en_common_organization | Organization |
common.nbCreatedOrgs | I18N_en_common_nbCreatedOrgs | Number of organizations created : |
common.organizations | I18N_en_common_organizations | Organizations |
common.createdPhrase | I18N_en_common_createdPhrase | Created by {name} on {date} |
common.documentation | I18N_en_common_documentation | Documentation |
common.confirmCancel | I18N_en_common_confirmCancel | Cancel |
common.administration | I18N_en_common_administration | Administration |
common.maxCreatedOrgs | I18N_en_common_maxCreatedOrgs | Max number of created organizations |
common.modificationOk | I18N_en_common_modificationOk | Your modification was saved. |
common.confirmDeleteMsg | I18N_en_common_confirmDeleteMsg | Do you really want to delete this resource ? Data will not be recoverable. |
common.activateAdminMode | I18N_en_common_activateAdminMode | Activate admin mode |
common.confirmDeleteTitle | I18N_en_common_confirmDeleteTitle | Delete {name} |
common.createOrganization | I18N_en_common_createOrganization | Create organization |
common.deactivateAdminMode | I18N_en_common_deactivateAdminMode | Deactivate admin mode |
root.title | I18N_en_root_title | Simple Directory |
root.description | I18N_en_root_description | Easy users and organizations management for modern Web-oriented architectures. |
errors.badEmail | I18N_en_errors_badEmail | Email address is empty or malformed. |
errors.userUnknown | I18N_en_errors_userUnknown | Unknown user. |
errors.orgaUnknown | I18N_en_errors_orgaUnknown | Unknown organization. |
errors.unknownRole | I18N_en_errors_unknownRole | Role {role} is unknown. |
errors.invalidToken | I18N_en_errors_invalidToken | The token is not valid. Maybe it is expired. |
errors.rateLimitAuth | I18N_en_errors_rateLimitAuth | Too many attemps in a short interval. Please wait before trying again. |
errors.noPasswordless | I18N_en_errors_noPasswordless | Passordless authentication is not accepted by this service. |
errors.badCredentials | I18N_en_errors_badCredentials | Email address or password invalid. |
errors.maxCreatedOrgs | I18N_en_errors_maxCreatedOrgs | The user cannot create more organizations. Limit attained. |
errors.permissionDenied | I18N_en_errors_permissionDenied | Insufficient permissions. |
errors.malformedPassword | I18N_en_errors_malformedPassword | The password should be at least 8 characters long and contain at least one number and one uppercase character. |
errors.invitationConflict | I18N_en_errors_invitationConflict | This user is already member of the organization. |
errors.serviceUnavailable | I18N_en_errors_serviceUnavailable | Service unavailable because of maintenance. |
errors.nonEmptyOrganization | I18N_en_errors_nonEmptyOrganization | You must remove other members from this organization |
mails.login.text | I18N_en_mails_login_text | An identification request was made from {host}. To confirm copy the URL below in the address bar of your Web browser. This URL is valid for 15 minutes. {link} If you encounter a problem with your account or if you didn't submit this identification request to {host}, feel free to contact us at {contact}. |
mails.login.htmlMsg | I18N_en_mails_login_htmlMsg | An identification request was made from <a href="{origin}">{host}</a>. To confirm click on the button below. This link is valid for 15 minutes. |
mails.login.subject | I18N_en_mails_login_subject | Identification on {host} |
mails.login.htmlButton | I18N_en_mails_login_htmlButton | Connect to {host} |
mails.login.htmlCaption | I18N_en_mails_login_htmlCaption | If you encounter a problem with your account or if you didn't submit this identification request to <a href="{origin}">{host}</a>, feel free to contact us at <a href="mailto:{contact}">{contact}</a>. |
mails.login.htmlAlternativeLink | I18N_en_mails_login_htmlAlternativeLink | If the button doesn't work, you can copy/paste this link in the address bar of your browser: |
mails.action.text | I18N_en_mails_action_text | An action requiring confirmation by email was triggered on this address. To confirm this action you can copy the URL below in your browers. Ths URL is valid for 15 minutes. {link} If you encounter a problem with your account or if you find this message suspicious feel free to contact us at {contact}. |
mails.action.htmlMsg | I18N_en_mails_action_htmlMsg | An action requiring confirmation by email was triggered on this address. To confirm this action click on the button below. The link is valid for 15 minutes. |
mails.action.subject | I18N_en_mails_action_subject | Accomplish an action on your account {host} |
mails.action.htmlButton | I18N_en_mails_action_htmlButton | Confirm |
mails.action.htmlCaption | I18N_en_mails_action_htmlCaption | If you encounter a problem with your account or if you find this message suspicious feel free to contact us at <a href="mailto:{contact}">{contact}</a>. |
mails.action.htmlAlternativeLink | I18N_en_mails_action_htmlAlternativeLink | If the button doesn't work, you can copy/paste this link in the address bar of your browser: |
mails.conflict.text | I18N_en_mails_conflict_text | An account creation request was made from {host}, but it was rejected as this email address is already associated to an account. Feel free to contact us at {contact}. |
mails.conflict.subject | I18N_en_mails_conflict_subject | Failure to create an account on {host} |
mails.conflict.htmlMsg | I18N_en_mails_conflict_htmlMsg | An account creation request was made from <a href="{origin}">{host}</a>, but it was rejected as this email address is already associated to an account. |
mails.conflict.htmlCaption | I18N_en_mails_conflict_htmlCaption | Feel free to contact us at <a href="mailto:{contact}">{contact}</a>. |
mails.creation.text | I18N_en_mails_creation_text | An account creation request was made from {host}. To activate the account you must copy the URL below in the address bar of your Web browser. This URL is valid for 15 minutes. {link} If you encounter a problem with your account or if you didn't submit this identification request to {host}, feel free to contact us at {contact}. |
mails.creation.subject | I18N_en_mails_creation_subject | Welcome to {host} |
mails.creation.htmlMsg | I18N_en_mails_creation_htmlMsg | An account creation request was made from <a href="{origin}">{host}</a>. To activate the account you must click on the button below. This link is valid for 15 minutes. |
mails.creation.htmlButton | I18N_en_mails_creation_htmlButton | Validate the account creation |
mails.creation.htmlCaption | I18N_en_mails_creation_htmlCaption | If you encounter a problem with your account or if you didn't submit this identification request to <a href="{origin}">{host}</a>, feel free to contact us at <a href="mailto:{contact}">{contact}</a>. |
mails.creation.htmlAlternativeLink | I18N_en_mails_creation_htmlAlternativeLink | If the button doesn't work, you can copy/paste this link in the address bar of your browser: |
mails.invitation.text | I18N_en_mails_invitation_text | An administrator from the organization {organization} invited you to join. To accept this invitation copy the URL below in the address bar of your Web browser. If you do not have an account yet it will be created automatically. {link} If you encounter a problem with your account or if you find this invitation suspicious feel free to contact us at {contact}. |
mails.invitation.htmlMsg | I18N_en_mails_invitation_htmlMsg | An administrator from the organization {organization} invited you to join. To accept this invitation click on the button below. If you do not have an account yet it will be created automatically. |
mails.invitation.subject | I18N_en_mails_invitation_subject | Join the organization {organization} on {host} |
mails.invitation.htmlButton | I18N_en_mails_invitation_htmlButton | Accept the invitation |
mails.invitation.htmlCaption | I18N_en_mails_invitation_htmlCaption | If you encounter a problem with your account or if you find this invitation suspicious feel free to contact us at <a href="mailto:{contact}">{contact}</a>. |
mails.invitation.htmlAlternativeLink | I18N_en_mails_invitation_htmlAlternativeLink | If the button doesn't work, you can copy/paste this link in the address bar of your browser: |
mails.noCreation.text | I18N_en_mails_noCreation_text | An identification request was made from {host}, but it was rejected as this email address is unknown. Feel free to contact us at {contact}. |
mails.noCreation.htmlMsg | I18N_en_mails_noCreation_htmlMsg | An identification request was made from <a href="{origin}">{host}</a>, but it was rejected as this email address is unknown. |
mails.noCreation.subject | I18N_en_mails_noCreation_subject | Failure to authenticate to {host} |
mails.noCreation.htmlCaption | I18N_en_mails_noCreation_htmlCaption | Feel free to contact us at <a href="mailto:{contact}">{contact}</a>. |
pages.login.oauth | I18N_en_pages_login_oauth | Connect with: |
pages.login.title | I18N_en_pages_login_title | Identify yourself |
pages.login.tosMsg | I18N_en_pages_login_tosMsg | Before creating an account please read <a href="{tosUrl}" target="_blank">our terms of services</a>. |
pages.login.success | I18N_en_pages_login_success | You will receive an email at the specified address. Please use the link in this email to conclude your identification. |
pages.login.adminMode | I18N_en_pages_login_adminMode | Confirm your identity to switch to admin mode. |
pages.login.emailLabel | I18N_en_pages_login_emailLabel | Your email address |
pages.login.tosConfirm | I18N_en_pages_login_tosConfirm | I confirm that I have read the terms of services for this site. |
pages.login.newPassword | I18N_en_pages_login_newPassword | New password |
pages.login.maildevLink | I18N_en_pages_login_maildevLink | Open the development mail box |
pages.login.emailCaption | I18N_en_pages_login_emailCaption | Learn more about <a href="https://medium.com/@ninjudd/passwords-are-obsolete-9ed56d483eb">passwordless</a> authentication |
pages.login.newPassword2 | I18N_en_pages_login_newPassword2 | Confirm new password |
pages.login.createUserMsg1 | I18N_en_pages_login_createUserMsg1 | If you didn't already connect to our platform you must create an account. |
pages.login.newPasswordMsg | I18N_en_pages_login_newPasswordMsg | Type twice the new password. |
pages.login.createUserMsg2 | I18N_en_pages_login_createUserMsg2 | Create an account. |
pages.login.changePassword | I18N_en_pages_login_changePassword | Renew the password. |
pages.login.passwordlessMsg1 | I18N_en_pages_login_passwordlessMsg1 | To login an email is sufficient. |
pages.login.passwordlessMsg2 | I18N_en_pages_login_passwordlessMsg2 | Send a login email. |
pages.login.createUserConfirm | I18N_en_pages_login_createUserConfirm | Create the account |
pages.login.changePasswordSent | I18N_en_pages_login_changePasswordSent | An email was sent to the address {email}. This email contains a link to change the password of your account. |
pages.login.createUserConfirmed | I18N_en_pages_login_createUserConfirmed | An email was sent to the address {email}. This email contains a link to validate the creation of your account. |
pages.login.passwordlessConfirmed | I18N_en_pages_login_passwordlessConfirmed | An email was sent to the address {email}. This email contains a link to connect to the platform. |
pages.login.changePasswordTooltip | I18N_en_pages_login_changePasswordTooltip | In case you forgot your password or if you need to change it, renew your password. |
pages.avatar.prepare | I18N_en_pages_avatar_prepare | Prepare the image |
pages.invitation.title | I18N_en_pages_invitation_title | Invitation validated |
pages.invitation.msgSameUser | I18N_en_pages_invitation_msgSameUser | Your invitation to become member of an organization has been validated. You can visit <a href="{profileUrl}">your profile</a>. |
pages.invitation.msgDifferentUser | I18N_en_pages_invitation_msgDifferentUser | This invitation to become member of an organization has been validated. You can <a href="{loginUrl}">login with</a> the invited account. |
pages.organization.next | I18N_en_pages_organization_next | Next |
pages.organization.back | I18N_en_pages_organization_back | Back |
pages.organization.addMember | I18N_en_pages_organization_addMember | Invite a user to join this organization |
pages.organization.editMember | I18N_en_pages_organization_editMember | Change the role of this user in the organization |
pages.organization.inviteEmail | I18N_en_pages_organization_inviteEmail | Email address of the user |
pages.organization.deleteMember | I18N_en_pages_organization_deleteMember | Delete this user from the list of members |
pages.organization.inviteSuccess | I18N_en_pages_organization_inviteSuccess | An invitation was sent to the address {email} |
pages.organization.disableInvite | I18N_en_pages_organization_disableInvite | This organization already contains its maximum number of members. |
pages.organization.memberConflict | I18N_en_pages_organization_memberConflict | This user is already a member |
pages.organization.deleteMemberSuccess | I18N_en_pages_organization_deleteMemberSuccess | The user {name} was excluded from the organization |
pages.organization.departmentIdInvalid | I18N_en_pages_organization_departmentIdInvalid | Identifier should contain anly letters, numbers and spaces |
pages.organization.confirmDeleteMemberMsg | I18N_en_pages_organization_confirmDeleteMemberMsg | Do you really want to delete this user from the list of members of this organization ? |
pages.organization.confirmEditMemberTitle | I18N_en_pages_organization_confirmEditMemberTitle | Change {name} |
pages.organization.confirmDeleteMemberTitle | I18N_en_pages_organization_confirmDeleteMemberTitle | Exclude {name} |
pages.admin.users.explainLimit | I18N_en_pages_admin_users_explainLimit | Define a value to limit the number of organizations the user can create. -1 for an indeterminate value. Empty the field to fallback on the default value ({defaultMaxCreatedOrgs}). |
pages.admin.users.createdOrgsLimit | I18N_en_pages_admin_users_createdOrgsLimit | The users can create {defaultMaxCreatedOrgs} organization(s) by default. |
pages.admin.users.noCreatedOrgsLimit | I18N_en_pages_admin_users_noCreatedOrgsLimit | The users can create an indeterminate number of organizations. |
pages.admin.organizations.members | I18N_en_pages_admin_organizations_members | member(s) |
pages.admin.organizations.nbMembers | I18N_en_pages_admin_organizations_nbMembers | maximum number of members (0 for no limit) |
pages.admin.organizations.limitOrganizationTitle | I18N_en_pages_admin_organizations_limitOrganizationTitle | Edit the limits of the organization |