Strange problem with nextcloud.cfg file in Linux

I have NC ver 15.0.5.3 installed on QNAP NAS (64 bit, Intel 4 core, 16 GB RAM, MySQL as DB). Linux client ver 2.5.2 AppImage on Linux desktop. I want client to login to NC via http not via WebFlow because WebFlow does not allow integration with KWallet. So I changed in ~/.config/Nextcloud/nexcloud.cfg file entry authType=webflow to authType=http. But after several seconds this entry change itself to authType=webflow does not matter I am logged to NC or not. So WebFlow screen appears anyway.
How to force client do not change that entry?

Log file from client:

OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/" has X-Request-ID "7cd777f1-e1d9-45b7-87db-e1acf35ef833"
[OCC::AbstractNetworkJob::start         OCC::PropfindJob created for "https://example.domain.com" + "/" "OCC::ConnectionValidator"
[OCC::AccountManager::saveAccount       Saving account "https://example.domain.com:45083"
[OCC::AccountManager::saveAccountHelper         Saving  3  unknown certs.
[OCC::AccountManager::saveAccountHelper         Saving cookies. "/home/maciek/.config/Nextcloud/cookies1.db"
[OCC::AccountManager::saveAccount       Saved account settings, status: QSettings::Status(NoError)
[OCC::Account::slotHandleSslErrors      "SSL-Errors happened for url  \"https://example.domain.com:45083/remote.php/dav/files/maciek/\" \tError in  QSslCertificate(\"3\", \"bd:fa:64:1e:eb:e7:50:03\", \"zuyf5JZCeCpjF40/xr/Wiw==\", (\"QoolBox\"), (\"QoolBox\"), QMap(), QDateTime(2018-10-01 03:56:42.000 UTC Qt::TimeSpec(UTC)), QDateTime(2028-09-28 03:56:42.000 UTC Qt::TimeSpec(UTC))) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n " Certs are known and trusted! This is not an actual error.
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::PropfindJob::finished     PROPFIND of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/") FINISHED WITH STATUS "OK"
[OCC::Folder::slotRunEtagJob    Trying to check "https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia" for changes via ETag check. (time since last sync: 242 s)
[OCC::Folder::slotRunEtagJob    Trying to check "https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty" for changes via ETag check. (time since last sync: 239 s)
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia" has X-Request-ID "a7825344-e21f-4494-8a39-bfb8c30e3e2f"
[OCC::AbstractNetworkJob::start         OCC::RequestEtagJob created for "https://example.domain.com" + "/Zdjęcia" "OCC::Folder"
[OCC::AccountManager::saveAccount       Saving account "https://example.domain.com:45083"
[OCC::AccountManager::saveAccountHelper         Saving  3  unknown certs.
[OCC::AccountManager::saveAccountHelper         Saving cookies. "/home/maciek/.config/Nextcloud/cookies1.db"
[OCC::AccountManager::saveAccount       Saved account settings, status: QSettings::Status(NoError)
[OCC::Account::slotHandleSslErrors      "SSL-Errors happened for url  \"https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia\" \tError in  QSslCertificate(\"3\", \"bd:fa:64:1e:eb:e7:50:03\", \"zuyf5JZCeCpjF40/xr/Wiw==\", (\"QoolBox\"), (\"QoolBox\"), QMap(), QDateTime(2018-10-01 03:56:42.000 UTC Qt::TimeSpec(UTC)), QDateTime(2028-09-28 03:56:42.000 UTC Qt::TimeSpec(UTC))) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n " Certs are known and trusted! This is not an actual error.
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::RequestEtagJob::finished  Request Etag of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia") FINISHED WITH STATUS "OK"
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty" has X-Request-ID "214923ee-7e52-4a0c-bad0-9385914e8879"
[OCC::AbstractNetworkJob::start         OCC::RequestEtagJob created for "https://example.domain.com" + "/Dokumenty" "OCC::Folder"
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::RequestEtagJob::finished  Request Etag of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty") FINISHED WITH STATUS "OK"
[OCC::AccessManager::createRequest      2 "" "https://example.domain.com:45083/ocs/v2.php/apps/notifications/api/v2/notifications?format=json" has X-Request-ID "2c3faaa3-9e8f-4903-96e4-f7549eb3f499"
[OCC::AbstractNetworkJob::start         OCC::JsonApiJob created for "https://example.domain.com" + "ocs/v2.php/apps/notifications/api/v2/notifications" "OCC::ServerNotificationHandler"
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::JsonApiJob::finished      JsonApiJob of QUrl("https://example.domain.com:45083/ocs/v2.php/apps/notifications/api/v2/notifications?format=json") FINISHED WITH STATUS "OK"
[OCC::JsonApiJob::finished      Nothing changed so nothing to retrieve - status code:  304
[OCC::ServerNotificationHandler::slotNotificationsReceived      Status code  304  Not Modified - No new notifications.
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/" has X-Request-ID "3ac422a7-56ba-4e66-852e-f50ecfe77e9e"
[OCC::AbstractNetworkJob::start         OCC::PropfindJob created for "https://example.domain.com" + "/" "OCC::QuotaInfo"
[OCC::AccountManager::saveAccount       Saving account "https://example.domain.com:45083"
[OCC::AccountManager::saveAccountHelper         Saving  3  unknown certs.
[OCC::AccountManager::saveAccountHelper         Saving cookies. "/home/maciek/.config/Nextcloud/cookies1.db"
[OCC::AccountManager::saveAccount       Saved account settings, status: QSettings::Status(NoError)
[OCC::Account::slotHandleSslErrors      "SSL-Errors happened for url  \"https://example.domain.com:45083/remote.php/dav/files/maciek/\" \tError in  QSslCertificate(\"3\", \"bd:fa:64:1e:eb:e7:50:03\", \"zuyf5JZCeCpjF40/xr/Wiw==\", (\"QoolBox\"), (\"QoolBox\"), QMap(), QDateTime(2018-10-01 03:56:42.000 UTC Qt::TimeSpec(UTC)), QDateTime(2028-09-28 03:56:42.000 UTC Qt::TimeSpec(UTC))) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n " Certs are known and trusted! This is not an actual error.
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::PropfindJob::finished     PROPFIND of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/") FINISHED WITH STATUS "OK"
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/" has X-Request-ID "914167e6-5275-4db5-b762-25c440c912e0"
[OCC::AbstractNetworkJob::start         OCC::PropfindJob created for "https://example.domain.com" + "/" "OCC::ConnectionValidator"
[OCC::AccountManager::saveAccount       Saving account "https://example.domain.com:45083"
[OCC::AccountManager::saveAccountHelper         Saving  3  unknown certs.
[OCC::AccountManager::saveAccountHelper         Saving cookies. "/home/maciek/.config/Nextcloud/cookies1.db"
[OCC::AccountManager::saveAccount       Saved account settings, status: QSettings::Status(NoError)
[OCC::Account::slotHandleSslErrors      "SSL-Errors happened for url  \"https://example.domain.com:45083/remote.php/dav/files/maciek/\" \tError in  QSslCertificate(\"3\", \"bd:fa:64:1e:eb:e7:50:03\", \"zuyf5JZCeCpjF40/xr/Wiw==\", (\"QoolBox\"), (\"QoolBox\"), QMap(), QDateTime(2018-10-01 03:56:42.000 UTC Qt::TimeSpec(UTC)), QDateTime(2028-09-28 03:56:42.000 UTC Qt::TimeSpec(UTC))) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n " Certs are known and trusted! This is not an actual error.
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::PropfindJob::finished     PROPFIND of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/") FINISHED WITH STATUS "OK"
[OCC::Folder::slotRunEtagJob    Trying to check "https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia" for changes via ETag check. (time since last sync: 272 s)
[OCC::Folder::slotRunEtagJob    Trying to check "https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty" for changes via ETag check. (time since last sync: 269 s)
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia" has X-Request-ID "e5804fdc-8a1d-41ce-ba90-114e4720b427"
[OCC::AbstractNetworkJob::start         OCC::RequestEtagJob created for "https://example.domain.com" + "/Zdjęcia" "OCC::Folder"
[OCC::AccountManager::saveAccount       Saving account "https://example.domain.com:45083"
[OCC::AccountManager::saveAccountHelper         Saving  3  unknown certs.
[OCC::AccountManager::saveAccountHelper         Saving cookies. "/home/maciek/.config/Nextcloud/cookies1.db"
[OCC::AccountManager::saveAccount       Saved account settings, status: QSettings::Status(NoError)
[OCC::Account::slotHandleSslErrors      "SSL-Errors happened for url  \"https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia\" \tError in  QSslCertificate(\"3\", \"bd:fa:64:1e:eb:e7:50:03\", \"zuyf5JZCeCpjF40/xr/Wiw==\", (\"QoolBox\"), (\"QoolBox\"), QMap(), QDateTime(2018-10-01 03:56:42.000 UTC Qt::TimeSpec(UTC)), QDateTime(2028-09-28 03:56:42.000 UTC Qt::TimeSpec(UTC))) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n " Certs are known and trusted! This is not an actual error.
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::RequestEtagJob::finished  Request Etag of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia") FINISHED WITH STATUS "OK"
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty" has X-Request-ID "028bce3b-e531-4ea4-a3cd-9f49e98e7eb2"
[OCC::AbstractNetworkJob::start         OCC::RequestEtagJob created for "https://example.domain.com" + "/Dokumenty" "OCC::Folder"
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::RequestEtagJob::finished  Request Etag of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty") FINISHED WITH STATUS "OK"
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/" has X-Request-ID "b2169ba6-94ce-485d-a752-8a993cc2a1e4"
[OCC::AbstractNetworkJob::start         OCC::PropfindJob created for "https://example.domain.com" + "/" "OCC::QuotaInfo"
[OCC::AccountManager::saveAccount       Saving account "https://example.domain.com:45083"
[OCC::AccountManager::saveAccountHelper         Saving  3  unknown certs.
[OCC::AccountManager::saveAccountHelper         Saving cookies. "/home/maciek/.config/Nextcloud/cookies1.db"
[OCC::AccountManager::saveAccount       Saved account settings, status: QSettings::Status(NoError)
[OCC::Account::slotHandleSslErrors      "SSL-Errors happened for url  \"https://example.domain.com:45083/remote.php/dav/files/maciek/\" \tError in  QSslCertificate(\"3\", \"bd:fa:64:1e:eb:e7:50:03\", \"zuyf5JZCeCpjF40/xr/Wiw==\", (\"QoolBox\"), (\"QoolBox\"), QMap(), QDateTime(2018-10-01 03:56:42.000 UTC Qt::TimeSpec(UTC)), QDateTime(2028-09-28 03:56:42.000 UTC Qt::TimeSpec(UTC))) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n " Certs are known and trusted! This is not an actual error.
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::PropfindJob::finished     PROPFIND of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/") FINISHED WITH STATUS "OK"
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/" has X-Request-ID "9061b263-7d03-4e83-bede-e3ab66b180b0"
[OCC::AbstractNetworkJob::start         OCC::PropfindJob created for "https://example.domain.com" + "/" "OCC::ConnectionValidator"
[OCC::AccountManager::saveAccount       Saving account "https://example.domain.com:45083"
[OCC::AccountManager::saveAccountHelper         Saving  3  unknown certs.
[OCC::AccountManager::saveAccountHelper         Saving cookies. "/home/maciek/.config/Nextcloud/cookies1.db"
[OCC::AccountManager::saveAccount       Saved account settings, status: QSettings::Status(NoError)
[OCC::Account::slotHandleSslErrors      "SSL-Errors happened for url  \"https://example.domain.com:45083/remote.php/dav/files/maciek/\" \tError in  QSslCertificate(\"3\", \"bd:fa:64:1e:eb:e7:50:03\", \"zuyf5JZCeCpjF40/xr/Wiw==\", (\"QoolBox\"), (\"QoolBox\"), QMap(), QDateTime(2018-10-01 03:56:42.000 UTC Qt::TimeSpec(UTC)), QDateTime(2028-09-28 03:56:42.000 UTC Qt::TimeSpec(UTC))) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n " Certs are known and trusted! This is not an actual error.
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::PropfindJob::finished     PROPFIND of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/") FINISHED WITH STATUS "OK"
[OCC::Folder::slotRunEtagJob    Trying to check "https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia" for changes via ETag check. (time since last sync: 302 s)
[OCC::Folder::slotRunEtagJob    Trying to check "https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty" for changes via ETag check. (time since last sync: 299 s)
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia" has X-Request-ID "a3c92206-5bd2-4b20-a900-e771dd64c37d"
[OCC::AbstractNetworkJob::start         OCC::RequestEtagJob created for "https://example.domain.com" + "/Zdjęcia" "OCC::Folder"
[OCC::AccountManager::saveAccount       Saving account "https://example.domain.com:45083"
[OCC::AccountManager::saveAccountHelper         Saving  3  unknown certs.
[OCC::AccountManager::saveAccountHelper         Saving cookies. "/home/maciek/.config/Nextcloud/cookies1.db"
[OCC::AccountManager::saveAccount       Saved account settings, status: QSettings::Status(NoError)
[OCC::Account::slotHandleSslErrors      "SSL-Errors happened for url  \"https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia\" \tError in  QSslCertificate(\"3\", \"bd:fa:64:1e:eb:e7:50:03\", \"zuyf5JZCeCpjF40/xr/Wiw==\", (\"QoolBox\"), (\"QoolBox\"), QMap(), QDateTime(2018-10-01 03:56:42.000 UTC Qt::TimeSpec(UTC)), QDateTime(2028-09-28 03:56:42.000 UTC Qt::TimeSpec(UTC))) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n \tError in  QSslCertificate(\"3\", \"bd:fa:64:1e:eb:e7:50:03\", \"zuyf5JZCeCpjF40/xr/Wiw==\", (\"QoolBox\"), (\"QoolBox\"), QMap(), QDateTime(2018-10-01 03:56:42.000 UTC Qt::TimeSpec(UTC)), QDateTime(2028-09-28 03:56:42.000 UTC Qt::TimeSpec(UTC))) : \"The certificate is self-signed, and untrusted\" ( \"The certificate is self-signed, and untrusted\" ) \n " Certs are known and trusted! This is not an actual error.
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::RequestEtagJob::finished  Request Etag of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia") FINISHED WITH STATUS "OK"
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty" has X-Request-ID "7dcb4719-c39f-4e75-b679-bc76d3197f50"
[OCC::AbstractNetworkJob::start         OCC::RequestEtagJob created for "https://example.domain.com" + "/Dokumenty" "OCC::Folder"
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::RequestEtagJob::finished  Request Etag of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty") FINISHED WITH STATUS "OK"
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/" has X-Request-ID "5343210a-5428-4b34-a387-ef11a5067f16"
[OCC::AbstractNetworkJob::start         OCC::PropfindJob created for "https://example.domain.com" + "/" "OCC::QuotaInfo"
[OCC::AccountManager::saveAccount       Saving account "https://example.domain.com:45083"
[OCC::AccountManager::saveAccountHelper         Saving  3  unknown certs.
[OCC::AccountManager::saveAccountHelper         Saving cookies. "/home/maciek/.config/Nextcloud/cookies1.db"
[OCC::AccountManager::saveAccount       Saved account settings, status: QSettings::Status(NoError)
[OCC::Account::slotHandleSslErrors      "SSL-Errors happened for url  \"https://example.domain.com:45083/remote.php/dav/files/maciek/\" \tError in  QSslCertificate(\"3\", \"bd:fa:64:1e:eb:e7:50:03\", \"zuyf5JZCeCpjF40/xr/Wiw==\", (\"QoolBox\"), (\"QoolBox\"), QMap(), QDateTime(2018-10-01 03:56:42.000 UTC Qt::TimeSpec(UTC)), QDateTime(2028-09-28 03:56:42.000 UTC Qt::TimeSpec(UTC))) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n " Certs are known and trusted! This is not an actual error.
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::PropfindJob::finished     PROPFIND of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/") FINISHED WITH STATUS "OK"
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/" has X-Request-ID "62317e97-3cb3-4d5e-a81b-d11e69577f12"
[OCC::AbstractNetworkJob::start         OCC::PropfindJob created for "https://example.domain.com" + "/" "OCC::ConnectionValidator"
[OCC::AccountManager::saveAccount       Saving account "https://example.domain.com:45083"
[OCC::AccountManager::saveAccountHelper         Saving  3  unknown certs.
[OCC::AccountManager::saveAccountHelper         Saving cookies. "/home/maciek/.config/Nextcloud/cookies1.db"
[OCC::AccountManager::saveAccount       Saved account settings, status: QSettings::Status(NoError)
[OCC::Account::slotHandleSslErrors      "SSL-Errors happened for url  \"https://example.domain.com:45083/remote.php/dav/files/maciek/\" \tError in  QSslCertificate(\"3\", \"bd:fa:64:1e:eb:e7:50:03\", \"zuyf5JZCeCpjF40/xr/Wiw==\", (\"QoolBox\"), (\"QoolBox\"), QMap(), QDateTime(2018-10-01 03:56:42.000 UTC Qt::TimeSpec(UTC)), QDateTime(2028-09-28 03:56:42.000 UTC Qt::TimeSpec(UTC))) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n " Certs are known and trusted! This is not an actual error.
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::PropfindJob::finished     PROPFIND of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/") FINISHED WITH STATUS "OK"
[OCC::Folder::slotRunEtagJob    Trying to check "https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia" for changes via ETag check. (time since last sync: 332 s)
[OCC::Folder::slotRunEtagJob    Trying to check "https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty" for changes via ETag check. (time since last sync: 329 s)
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia" has X-Request-ID "66b17058-16ae-442e-b1fd-dea898d06cc8"
[OCC::AbstractNetworkJob::start         OCC::RequestEtagJob created for "https://example.domain.com" + "/Zdjęcia" "OCC::Folder"
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::RequestEtagJob::finished  Request Etag of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/Zdjęcia") FINISHED WITH STATUS "OK"
[OCC::AccessManager::createRequest      6 "PROPFIND" "https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty" has X-Request-ID "1f0d4c0d-e9f4-4134-9cc0-1b37bb47fcf6"
[OCC::AbstractNetworkJob::start         OCC::RequestEtagJob created for "https://example.domain.com" + "/Dokumenty" "OCC::Folder"
[OCC::WebFlowCredentials::slotFinished  request finished
[OCC::RequestEtagJob::finished  Request Etag of QUrl("https://example.domain.com:45083/remote.php/dav/files/maciek/Dokumenty") FINISHED WITH STATUS "OK"

I think that QNAP WebServices are changing your config back to defaults. You need to check QNAP side.

I dont use QNAP build-in WebServices (“native one”). For Nextcloud needs I installed separate Apache server dedicated for only to work with NC. So nothing else use this separate Apache instance. It is because each QNAP FW upgrade, change something in “native” WebServices".