##
##  sftpgo.yaml -- SFTPgo Server Configuration
##

#   common configuration
common:
    idle_timeout:                      15
    max_total_connections:             0
    upload_mode:                       1
    setstat_mode:                      0
    proxy_protocol:                    0
    proxy_allowed:                     []
    post_connect_hook:                 ""
    actions:
        execute_on:                    [] # [ "update", "delete", "rename" ]
        hook:                          "" # path or url

#   data storage provider
data_provider:
    driver:                            "sqlite"
    name:                              "@l_prefix@/var/sftpgo/run/sftpgo.db"
    host:                              ""
    port:                              0
    username:                          ""
    password:                          ""
    sslmode:                           0
    connection_string:                 ""
    sql_tables_prefix:                 ""
    manage_users:                      1
    track_quota:                       2
    pool_size:                         0
    users_base_dir:                    "@l_prefix@/var/sftpgo/data"
    external_auth_hook:                ""
    external_auth_scope:               0
    credentials_path:                  "@l_prefix@/etc/sftpgo/credentials"
    pre_login_hook:                    ""
    post_login_hook:                   ""
    post_login_scope:                  0
    check_password_hook:               ""
    check_password_scope:              0
    password_hashing:
        argon2_options:
            memory:                    65536
            iterations:                1
            parallelism:               2
    actions:
        execute_on:                    []
        hook:                          ""

#   SSH/SFTP service (client access)
sftpd:
    bindings:
        -   address:                   "127.0.0.1"
            port:                      9002
            apply_proxy_config:        true
    max_auth_tries:                    0
    banner:                            ""
    host_keys:                         [ "@l_prefix@/etc/sftpgo/sftpgo.ssh.id_rsa",
                                         "@l_prefix@/etc/sftpgo/sftpgo.ssh.id_ecdsa" ]
    kex_algorithms:                    []
    ciphers:                           []
    macs:                              []
    trusted_user_ca_keys:              []
    login_banner_file:                 ""
    enabled_ssh_commands:              [ "md5sum", "sha1sum", "cd", "pwd", "scp" ]
    keyboard_interactive_auth_hook:    ""
    password_authentication:           true

#   HTTP/WebDAV service (client access)
webdavd:
    bindings:
        -   address:                   "127.0.0.1"
            port:                      9001
            client_auth_type:          0
            enable_https:              true
    certificate_file:                  "@l_prefix@/etc/sftpgo/sftpgo.tls-sv.crt"
    certificate_key_file:              "@l_prefix@/etc/sftpgo/sftpgo.tls-sv.key"
    ca_certificates:                   [ "@l_prefix@/etc/sftpgo/sftpgo.tls-ca.crt" ]
    cors:
        enabled:                       false
        allowed_origins:               []
        allowed_methods:               []
        allowed_headers:               []
        exposed_headers:               []
        allow_credentials:             false
        max_age:                       0
    cache:
        enabled:                       false
        expiration_time:               0
        max_size:                      50

#   HTTP/plain service (admin interface)
httpd:
    bind_address:                      "127.0.0.1"
    bind_port:                         9000
    templates_path:                    "@l_prefix@/share/sftpgo/templates"
    static_files_path:                 "@l_prefix@/share/sftpgo/static"
    backups_path:                      "@l_prefix@/var/sftpgo/backup"
    auth_user_file:                    "sftpgo.passwd"
    certificate_file:                  "@l_prefix@/etc/sftpgo/sftpgo.tls-sv.crt"
    certificate_key_file:              "@l_prefix@/etc/sftpgo/sftpgo.tls-sv.key"
    ca_certificates:                   [ "@l_prefix@/etc/sftpgo/sftpgo.tls-ca.crt" ]

#   HTTP client
http:
    timeout:                           20
    ca_certificates:                   []
    skip_tls_verify:                   true

