In the case of Docker installation, the main Persephone client application is pre-configured. The application files are located in the directory /data/WebPersephone inside the container. To enter the container environment, run the command

docker exec -it persephone bash

The main file with the configuration is SelfHostingWebCerberus.exe.config. Let's study its sections, but please keep in mind that in the case of using Docker container, the deployment of each new version of the application will overwrite the changes in the file SelfHostingWebCerberus.exe.config. To preserve your customization, extract the changes to a separate file called custom.config and located in the same directory. We provide a sample file custom.config.template for your reference.

Let's first review the sections of SelfHostingWebCerberus.exe.config and later we will see how to save the customization into custom.config.

For the beginning, let's assume that we want to keep using the default settings for the database, BLAST, and Solr text indexing pre-installed in the container. In this case, we can skip the configuration of the database connection string, the location of BLAST data and binary folders, and Solr server settings. The first serviceable part starts at the node <UserSettings>.

Only registered users can upload their files. The configuration for the user registration and settings is stored in the following sections.


...
 <!--User settings: customize user data storage quotas, specify how the users will login, etc. -->
  <UserSettings
    AnonymousLoginOnly="false"
    AllowAnonymousLogin="true"
    UsersDataDirectory="{PWD}/Users/"
    RequireRecaptcha="false"
    RecaptchaSecret="recaptcha secret here"
    QuotaMb="200">
    <UserSettingsOverride Users="*@persephonesoft.com" QuotaMb="10240" UsersDataDirectory="{PWD}/Users/"/>
  </UserSettings>

AnonymousLoginOnly - setting it to true will disable user's registration and login.
AllowAnonymousLogin - when false, the user login will be required. There are several options for user registration, see below.
QuotaMb - by default, each user will receive the disk space for their uploaded data. This value controls the size of this space in megabytes.

UserSettingsOverride - there can be multiple nodes like this. For each node, we need to specify the email or email mask with wild cards to determine the users to whom the changes will be applied. The disk quota and the location of the user files can be customized here.

The next section describes mechanisms for the user login. 

  <UserLoginOpenId Enabled="true" SuccessURL="http://localhost:8080/" SecureURL="http://localhost:8080/secure">
    <Provider name="email" DisableRegistration="false" />
    <!--
      <Provider name="google" ButtonLabel="Sign in with Google" MetadataUrl="https://accounts.google.com/.well-known/openid-configuration" 
       ClientId="SECRET.apps.googleusercontent.com" ClientSecret="CLIENT_SECRET" />
      <Provider name="microsoft" ButtonLabel="Sign in with Microsoft" MetadataUrl="https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration" 
       ClientId="CLIENT_ID" ClientSecret="CLIENT_SECRET" />
    -->
  </UserLoginOpenId>

There can be several methods for OpenAuth user authentication.

email - new users can register using their email address. A confirmation email is sent to that address using the SMTP server described below in the node <MailSettings>. If you select this method, change the settings to an SMTP server of your choice in the node <MailSettings>.

  <MailSettings MailFrom="support@persephonesoft.com" SmtpServer="email-smtp.us-west-2.amazonaws.com" 
  SmtpPassword="smtp password here" 
  SendgridHttpKey="sendgrid key here" 
  SmtpUser="smtp user here" 
  SmtpPort="587" EnableSsl="true" ConfirmationLinkTemplate="{0}#confirm-email/{1}" PasswordResetLinkTemplate="{0}#confirm-password-reset/{1}" 
  EmailResetLinkTemplate="{0}#confirm-email-reset/{1}" UserDeleteLinkTemplate="{0}#confirm-delete-user/{1}" />

google - sign in with the Google account. Provide ClientId and ClientSecret:

  <Provider name="google" ButtonLabel="Sign in with Google" MetadataUrl="https://accounts.google.com/.well-known/openid-configuration" 
       ClientId="SECRET.apps.googleusercontent.com" ClientSecret="CLIENT_SECRET" />

microsoft - sign in with the Microsoft account. Provide ClientId and ClientSecret:


<Provider name="microsoft" ButtonLabel="Sign in with Microsoft" 
   MetadataUrl="https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration" 
   ClientId="CLIENT_ID" ClientSecret="CLIENT_SECRET" />


LDAP:

  <!--
    If present and enabled, then 'Email' provider is overridden
        Enabled:                   Default value is true.
        LDAPServer:                IP or domain address with port of LDAP server on the network
        Domains:                   (optional) The list of domains separated by comma. They will be added as UserNameLoginPrefix
        UserNameLoginPrefix:       Prefix that needs to be added to user for login (ex: mydomain\{user})
        SearchDistinguishedName:   DistinguishedName used for searching user in LDAP
        UserNameAttr:              Name of field with user name
        UserEmailAttr:             Name of field with user email
        
        ButtonLabel:               Label of button on client side
        UserLabel:                 Label of User text field on client side
        PasswordLabel:             Label of Password text field on client side
  -->
  <UserLoginLDAP 
    Enabled="true" 
    LDAPServer="server end point" 
    Domains="list of domains separated by comma"
    SearchDistinguishedName="dc=example,dc=com"
    UserNameAttr="sAMAccountName" 
    UserEmailAttr="mail" 

    ButtonLabel="Sign in" 
    UserLabel="User name:" 
    PasswordLabel="Password:" />


To enable users to upload the data, at least one provider should be specified.

Please consult a separate page on advanced configuration.

Saving customization in custom.config

When the Docker deployment is used, the software updates will overwrite your changes in the file SelfHostingWebCerberus.exe.config, so to avoid patching it with every update, save your customization into a file custom.config, located in the directory /data/WebPersephone inside the container. The file format allows changes to be saved as one line per modification. For example, to change the default QuotaMb, write just one line:

UserSettings.QuotaMb="10240"

Add the user settings overriding rule like this:

UserSettings._ADD=<UserSettingsOverride Users="max*example.com" QuotaMb="10240" UsersDataDirectory="{PWD}/PowerUsers/"/>

For more examples and explanation of the file format, please check this section.