GET https://kbin.spritesserver.nl/u/@blasterx@lemmy.sdf.org/active

Security

Token

There is no security token.

Firewall

main Name
Security enabled
Stateless

Configuration

Key Value
provider security.user.provider.concrete.app_user_provider
context main
entry_point App\Security\KbinAuthenticator
user_checker App\Security\UserChecker
access_denied_handler (none)
access_denied_url (none)
authenticators
[
  "two_factor"
  "remember_me"
  "App\Security\KbinAuthenticator"
  "App\Security\FacebookAuthenticator"
  "App\Security\GoogleAuthenticator"
  "App\Security\GithubAuthenticator"
  "App\Security\KeycloakAuthenticator"
]

Listeners

Listener Duration Response
Symfony\Component\Security\Http\Firewall\ChannelListener {#723
  -map: Symfony\Component\Security\Http\AccessMap {#722 …}
  -logger: Monolog\Logger {#783 …}
  -httpPort: 80
  -httpsPort: 443
}
0.00 ms (none)
Symfony\Component\Security\Http\Firewall\ContextListener {#706
  -tokenStorage: Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage {#1017 …}
  -sessionKey: "_security_main"
  -logger: Monolog\Logger {#783 …}
  -userProviders: Symfony\Component\DependencyInjection\Argument\RewindableGenerator {#705 …}
  -dispatcher: Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher {#747 …}
  -registered: false
  -trustResolver: Scheb\TwoFactorBundle\Security\Authentication\AuthenticationTrustResolver {#780 …}
  -sessionTrackerEnabler: Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage::enableUsageTracking(): void {#703 …}
}
0.24 ms (none)
Symfony\Component\Security\Http\Firewall\AuthenticatorManagerListener {#584
  -authenticatorManager: Symfony\Component\Security\Http\Authentication\AuthenticatorManager {#595 …}
}
0.00 ms (none)
Scheb\TwoFactorBundle\Security\Http\Firewall\TwoFactorAccessListener {#582
  -twoFactorFirewallConfig: Scheb\TwoFactorBundle\Security\TwoFactor\TwoFactorFirewallConfig {#842 …}
  -tokenStorage: Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage {#1018 …}
  -twoFactorAccessDecider: Scheb\TwoFactorBundle\Security\Authorization\TwoFactorAccessDecider {#581 …}
}
0.04 ms (none)
Symfony\Component\Security\Http\Firewall\AccessListener {#579
  -tokenStorage: Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage {#1018 …}
  -accessDecisionManager: Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager {#937 …}
  -map: Symfony\Component\Security\Http\AccessMap {#722 …}
}
0.00 ms (none)
Symfony\Component\Security\Http\Firewall\LogoutListener {#786
  -tokenStorage: Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage {#1018 …}
  -options: [
    "csrf_parameter" => "_csrf_token"
    "csrf_token_id" => "logout"
    "logout_path" => "app_logout"
  ]
  -httpUtils: Symfony\Component\Security\Http\HttpUtils {#841 …}
  -csrfTokenManager: Symfony\Component\Security\Csrf\CsrfTokenManager {#1015 …}
  -eventDispatcher: Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher {#747 …}
}
0.00 ms (none)

Authenticators

No authenticators have been recorded. Check previous profiles on your authentication endpoint.

Access Decision

affirmative Strategy
# Voter class
1
"Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter"
2
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
3
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
4
"Symfony\Component\Security\Core\Authorization\Voter\ExpressionVoter"
5
"App\Security\Voter\EntryCommentVoter"
6
"App\Security\Voter\EntryVoter"
7
"App\Security\Voter\MagazineVoter"
8
"App\Security\Voter\MessageThreadVoter"
9
"App\Security\Voter\MessageVoter"
10
"App\Security\Voter\NotificationVoter"
11
"App\Security\Voter\OAuth2UserConsentVoter"
12
"App\Security\Voter\PostCommentVoter"
13
"App\Security\Voter\PostVoter"
14
"App\Security\Voter\UserVoter"

Access decision log

# Result Attributes Object
1 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
2 DENIED moderate
Proxies\__CG__\App\Entity\Entry {#1591
  +user: Proxies\__CG__\App\Entity\User {#2457 …}
  +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
  +image: null
  +domain: Proxies\__CG__\App\Entity\Domain {#1719 …}
  +slug: "Nextcloud-Performance-Improvements"
  +title: "Nextcloud Performance Improvements"
  +url: null
  +body: """
    Nextcloud seems to have a bad reputation around here regarding performance. It never really bothered me, but when a comment on a [post here yesterday](https://discuss.tchncs.de/post/8512710) talked about huge speed gains to be had with Postgres, I got curious and spent a few hours researching and tweaking my setup.\n
    \n
    I thought I’d write up what I learned and maybe others can jump in with their insights to make this a good general overview.\n
    \n
    To note, my installation initially started out with [this docker compose stack](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml) from the official nextcloud docker images (as opposed to the AIO image or a source installation.) I run this behind an [NGINX reverse proxy](https://github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).\n
    \n
    #### Sources of information\n
    \n
    - [Server tuning on Nextcloud Docs](https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html): Most of this are very basic things that are already taken care of in the docker image or in the proxy companion image I’m using. The one thing I haven’t tried and that comes up in other places, too, is using Imaginary for image preview generation.\n
    - [How to migrate Nextcloud 17 Database Backend from MySQL to postgreSQL](https://markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)\n
    - [Eking out some Nextcloud Performance](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) mainly talks about using a socket connection for redis, but also mentions logging to syslog (have not found a good source of information for this), using postgres, using imaginary for image previews\n
    \n
    ### Improvements\n
    \n
    #### Migrate DB to Postgres\n
    \n
    What I did first is migrate from maridb to postgres, roughly following the blog post I linked above. I didn’t do any benchmarking, but page loads felt a little faster after that (but a far cry from the “way way faster” claims I’d read.)\n
    \n
    Here's my process- add postgres container to compose file [like so](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml). I named mine “postgres”, added a “postgres” volume, and added it to depends_on for app and cron - run migration command from nextcloud app container like any other occ command. The migration process stopped with an error for a deactivated app so I completely removed it, dropped the postgres tables and started migration again and it went through. after migration, check `admin settings/system` to make sure Nextcloud is now using postgres. `./occ db:convert-type --password $POSTGRES_PASSWORD --all-apps pgsql $POSTGRES_USER postgres $POSTGRES_DB`- remove old “db” container and volume and all references to it from compose file and run `docker compose up -d --remove-orphans`\n
    \n
    #### Redis over Sockets\n
    \n
    I followed [above guide](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) for connecting to Redis with sockets with details as stated below. This improved performance quite significantly. Very fast loads for files, calendar, etc. I haven’t yet changed the postgres connection over to sockets since the article spoke about minor improvements, but I might try this next.\n
    \n
    Hints- the redis configuration (host, port, password, …) need to be set in `config/config.php`, as well as `config/redis.config.php`- the cron container needs to receive the same `/etc/localtime` and `/etc/timezone` volumes the app container did, as well as the `volumes_from: tmp`\n
    \n
    #### EDIT Postgres over Sockets\n
    \n
    I’m now connecting to Postgres over sockets as well, which gave another pretty significant speed bump. When looking at developer tools in Firefox, the dashboard now finishes loading in half the time it did before the change; just over 6s. I followed the [same blog article I did for Redis](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).\n
    \n
    Steps- in the compose file, for the db container: add volumes `/etc/localtime` and `/etc/timezone`; add `user: “70:33”`; add `command: postgres -c unix_socket_directories=‘/var/run/postgresql/,/tmp/docker/’`; add tmp container to `volumes_from` and `depends_on`- in nextcloud config.php, replace `‘dbhost’ => ‘postgres’,` with `‘dbhost’ => ‘/tmp/docker/’,`\n
    \n
    ### Outlook\n
    \n
    What have you done to improve your instance’s performance? Do you know good articles to share? I’m happy to edit this post to include any insights and make this a good source of information regarding Nextcloud performance.
    """
  +type: "article"
  +lang: "en"
  +isOc: false
  +hasEmbed: false
  +commentCount: 35
  +favouriteCount: 131
  +score: 0
  +isAdult: false
  +sticky: false
  +lastActive: DateTime @1712594949 {#1550
    date: 2024-04-08 18:49:09.0 +02:00
  }
  +ip: null
  +adaAmount: 0
  +tags: null
  +mentions: null
  +comments: Doctrine\ORM\PersistentCollection {#1715 …}
  +votes: Doctrine\ORM\PersistentCollection {#1718 …}
  +reports: Doctrine\ORM\PersistentCollection {#1717 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1611 …}
  +notifications: Doctrine\ORM\PersistentCollection {#1628 …}
  +badges: Doctrine\ORM\PersistentCollection {#1702 …}
  +children: [
    App\Entity\EntryComment {#1709
      +user: App\Entity\User {#265 …}
      +entry: Proxies\__CG__\App\Entity\Entry {#1591 …2}
      +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
      +image: null
      +parent: Proxies\__CG__\App\Entity\EntryComment {#1668 …}
      +root: Proxies\__CG__\App\Entity\EntryComment {#1667 …}
      +body: "it stands for Windows Subsystem for Linux. [Here](https://www.windowscentral.com/how-install-wsl2-windows-10) is a link on how to install it."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1704036973 {#1439
        date: 2023-12-31 16:36:13.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#1670 …}
      +nested: Doctrine\ORM\PersistentCollection {#1678 …}
      +votes: Doctrine\ORM\PersistentCollection {#1673 …}
      +reports: Doctrine\ORM\PersistentCollection {#1676 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1586 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1572 …}
      -id: 267518
      -bodyTs: "'/how-install-wsl2-windows-10)':11 'instal':18 'link':14 'linux':7 'stand':2 'subsystem':5 'window':4 'www.windowscentral.com':10 'www.windowscentral.com/how-install-wsl2-windows-10)':9"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.sdf.org/comment/6817528"
      +editedAt: DateTimeImmutable @1709934943 {#1435
        date: 2024-03-08 22:55:43.0 +01:00
      }
      +createdAt: DateTimeImmutable @1704036973 {#1436
        date: 2023-12-31 16:36:13.0 +01:00
      }
      +"title": 267518
    }
  ]
  -id: 26234
  -titleTs: "'improv':3 'nextcloud':1 'perform':2"
  -bodyTs: "'/etc/localtime':491,575 '/etc/timezone':493,577 '/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':191 '/jwilder/docker-letsencrypt-nginx-proxy-companion).':118 '/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':91 '/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':297 '/occ':369 '/post/8512710)':28 '/server/latest/admin_manual/installation/server_tuning.html):':129 '/tech/20220618-eking-out-some-nextcloud-performance/)':199,418 '/tech/20220618-eking-out-some-nextcloud-performance/).':563 '/tmp/docker':590,608 '/var/run/postgresql':589 '17':182 '33':581 '6s':550 '70':580 'ad':302,307 'add':287,573,578,582,591 'admin':359 'aio':102 'all-app':377 'alreadi':139 'also':210 'anoth':522 'app':313,321,338,379,496 'around':8 'articl':455,556,624 'backend':184 'bad':6 'basic':135 'behind':111 'benchmark':260 'blog':250,555 'bother':15 'bump':526 'c':585 'calendar':440 'care':141 'chang':446,547 'check':358 'claim':279 'come':165 'command':318,327,583 'comment':20 'companion':151 'complet':341 'compos':87,291,398,403,567 'config.php':602 'config/config.php':478 'config/redis.config.php':482 'configur':469 'connect':206,420,449,513 'contain':289,322,389,485,497,572,593 'convert':372 'convert-typ':371 'cri':273 'cron':315,484 'curious':41 'd':55,281,405 'dashboard':535 'databas':183 'db':234,370,385,388,571 'dbhost':604,607 'deactiv':337 'depend':310,598 'detail':426 'develop':530 'didn':256 'directori':588 'discuss.tchncs.de':27 'discuss.tchncs.de/post/8512710)':26 'doc':126 'docker':86,96,145,402 'docs.nextcloud.com':128 'docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html):':127 'done':613 'drop':344 'edit':506,631 'eke':192 'error':334 'etc':441 'far':272 'fast':436 'faster':267,278 'felt':264 'file':292,399,439,568 'finish':537 'firefox':533 'first':240 'follow':248,413,552 'found':217 'gain':33 'gave':521 'general':75 'generat':177 'github.com':90,117,296 'github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).':116 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':89 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':295 'good':74,219,623,642 'got':40 'guid':415 'half':540 'happi':629 'haven':160,443 'hint':466 'host':470 'hour':46 'huge':31 'imag':97,103,146,152,175,230 'imaginari':173,228 'improv':232,431,459,615 'includ':635 'inform':121,222,645 'initi':81 'insight':69,637 'instal':80,107 'instanc':617 'jump':65 'know':622 'learn':60 'like':293,323 'link':253 'littl':266 'load':263,437,538 'log':212 'look':528 'm':154,511,628 'main':200 'make':71,362,639 'maridb':244 'markus-blog.de':190 'markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':189 'mayb':62 'mention':211 'might':462 'migrat':180,233,242,317,329,350,357 'mine':300 'minor':458 'mysql':186 'name':299 'need':473,486 'never':13 'next':465 'nextcloud':1,95,125,181,195,320,364,601,647 'nginx':113 'note':78 'occ':326 'offici':94 'old':387 'one':157 'oppos':99 'orphan':408 'other':63 'outlook':609 'overview':76 'page':262 'password':374,376,472 'peekread.info':198,417,562 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/)':197,416 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).':561 'perform':11,196,432,619,648 'pgsql':380 'place':169 'port':471 'post':23,251,633 'postgr':38,226,236,246,288,301,304,346,368,375,381,383,384,448,507,515,584,605 'postgresql':188 'pretti':523 'preview':176,231 'process':286,330 'proxi':115,150 'quit':433 'read':282 'realli':14 'receiv':488 'redi':208,409,422,468,560 'refer':394 'regard':10,646 'remov':342,386,407 'remove-orphan':406 'replac':603 'reput':7 'research':47 'revers':114 'rough':247 'run':109,316,401 'seem':2 'server':122 'set':476 'settings/system':360 'setup':51 'share':626 'signific':434,524 'sinc':453 'socket':205,411,424,452,509,517,587 'sourc':106,119,220,643 'speed':32,525 'spent':43 'spoke':456 'stack':88 'start':82,349 'state':428 'step':564 'stop':331 'sure':363 'syslog':214 'tabl':347 'taken':140 'talk':29,201 'thing':136,158 'thought':53 'time':542 'tmp':505,592 'tool':531 'tri':162,463 'tune':123 'tweak':49 'type':373 'unix':586 'use':155,172,203,225,227,367 'user':382,579 'volum':305,391,494,503,574,595 'way':276,277 'well':480,500,519 'went':354 'write':56 'yesterday':25 'yet':445"
  +cross: false
  +upVotes: 0
  +downVotes: 0
  +ranking: 1704118066
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/post/8559818"
  +editedAt: DateTimeImmutable @1720292146 {#1693
    date: 2024-07-06 20:55:46.0 +02:00
  }
  +createdAt: DateTimeImmutable @1704031666 {#1562
    date: 2023-12-31 15:07:46.0 +01:00
  }
  +__isInitialized__: true
   …2
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS DENIED
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
3 DENIED edit
Proxies\__CG__\App\Entity\Entry {#1591
  +user: Proxies\__CG__\App\Entity\User {#2457 …}
  +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
  +image: null
  +domain: Proxies\__CG__\App\Entity\Domain {#1719 …}
  +slug: "Nextcloud-Performance-Improvements"
  +title: "Nextcloud Performance Improvements"
  +url: null
  +body: """
    Nextcloud seems to have a bad reputation around here regarding performance. It never really bothered me, but when a comment on a [post here yesterday](https://discuss.tchncs.de/post/8512710) talked about huge speed gains to be had with Postgres, I got curious and spent a few hours researching and tweaking my setup.\n
    \n
    I thought I’d write up what I learned and maybe others can jump in with their insights to make this a good general overview.\n
    \n
    To note, my installation initially started out with [this docker compose stack](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml) from the official nextcloud docker images (as opposed to the AIO image or a source installation.) I run this behind an [NGINX reverse proxy](https://github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).\n
    \n
    #### Sources of information\n
    \n
    - [Server tuning on Nextcloud Docs](https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html): Most of this are very basic things that are already taken care of in the docker image or in the proxy companion image I’m using. The one thing I haven’t tried and that comes up in other places, too, is using Imaginary for image preview generation.\n
    - [How to migrate Nextcloud 17 Database Backend from MySQL to postgreSQL](https://markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)\n
    - [Eking out some Nextcloud Performance](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) mainly talks about using a socket connection for redis, but also mentions logging to syslog (have not found a good source of information for this), using postgres, using imaginary for image previews\n
    \n
    ### Improvements\n
    \n
    #### Migrate DB to Postgres\n
    \n
    What I did first is migrate from maridb to postgres, roughly following the blog post I linked above. I didn’t do any benchmarking, but page loads felt a little faster after that (but a far cry from the “way way faster” claims I’d read.)\n
    \n
    Here's my process- add postgres container to compose file [like so](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml). I named mine “postgres”, added a “postgres” volume, and added it to depends_on for app and cron - run migration command from nextcloud app container like any other occ command. The migration process stopped with an error for a deactivated app so I completely removed it, dropped the postgres tables and started migration again and it went through. after migration, check `admin settings/system` to make sure Nextcloud is now using postgres. `./occ db:convert-type --password $POSTGRES_PASSWORD --all-apps pgsql $POSTGRES_USER postgres $POSTGRES_DB`- remove old “db” container and volume and all references to it from compose file and run `docker compose up -d --remove-orphans`\n
    \n
    #### Redis over Sockets\n
    \n
    I followed [above guide](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) for connecting to Redis with sockets with details as stated below. This improved performance quite significantly. Very fast loads for files, calendar, etc. I haven’t yet changed the postgres connection over to sockets since the article spoke about minor improvements, but I might try this next.\n
    \n
    Hints- the redis configuration (host, port, password, …) need to be set in `config/config.php`, as well as `config/redis.config.php`- the cron container needs to receive the same `/etc/localtime` and `/etc/timezone` volumes the app container did, as well as the `volumes_from: tmp`\n
    \n
    #### EDIT Postgres over Sockets\n
    \n
    I’m now connecting to Postgres over sockets as well, which gave another pretty significant speed bump. When looking at developer tools in Firefox, the dashboard now finishes loading in half the time it did before the change; just over 6s. I followed the [same blog article I did for Redis](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).\n
    \n
    Steps- in the compose file, for the db container: add volumes `/etc/localtime` and `/etc/timezone`; add `user: “70:33”`; add `command: postgres -c unix_socket_directories=‘/var/run/postgresql/,/tmp/docker/’`; add tmp container to `volumes_from` and `depends_on`- in nextcloud config.php, replace `‘dbhost’ => ‘postgres’,` with `‘dbhost’ => ‘/tmp/docker/’,`\n
    \n
    ### Outlook\n
    \n
    What have you done to improve your instance’s performance? Do you know good articles to share? I’m happy to edit this post to include any insights and make this a good source of information regarding Nextcloud performance.
    """
  +type: "article"
  +lang: "en"
  +isOc: false
  +hasEmbed: false
  +commentCount: 35
  +favouriteCount: 131
  +score: 0
  +isAdult: false
  +sticky: false
  +lastActive: DateTime @1712594949 {#1550
    date: 2024-04-08 18:49:09.0 +02:00
  }
  +ip: null
  +adaAmount: 0
  +tags: null
  +mentions: null
  +comments: Doctrine\ORM\PersistentCollection {#1715 …}
  +votes: Doctrine\ORM\PersistentCollection {#1718 …}
  +reports: Doctrine\ORM\PersistentCollection {#1717 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1611 …}
  +notifications: Doctrine\ORM\PersistentCollection {#1628 …}
  +badges: Doctrine\ORM\PersistentCollection {#1702 …}
  +children: [
    App\Entity\EntryComment {#1709
      +user: App\Entity\User {#265 …}
      +entry: Proxies\__CG__\App\Entity\Entry {#1591 …2}
      +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
      +image: null
      +parent: Proxies\__CG__\App\Entity\EntryComment {#1668 …}
      +root: Proxies\__CG__\App\Entity\EntryComment {#1667 …}
      +body: "it stands for Windows Subsystem for Linux. [Here](https://www.windowscentral.com/how-install-wsl2-windows-10) is a link on how to install it."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1704036973 {#1439
        date: 2023-12-31 16:36:13.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#1670 …}
      +nested: Doctrine\ORM\PersistentCollection {#1678 …}
      +votes: Doctrine\ORM\PersistentCollection {#1673 …}
      +reports: Doctrine\ORM\PersistentCollection {#1676 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1586 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1572 …}
      -id: 267518
      -bodyTs: "'/how-install-wsl2-windows-10)':11 'instal':18 'link':14 'linux':7 'stand':2 'subsystem':5 'window':4 'www.windowscentral.com':10 'www.windowscentral.com/how-install-wsl2-windows-10)':9"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.sdf.org/comment/6817528"
      +editedAt: DateTimeImmutable @1709934943 {#1435
        date: 2024-03-08 22:55:43.0 +01:00
      }
      +createdAt: DateTimeImmutable @1704036973 {#1436
        date: 2023-12-31 16:36:13.0 +01:00
      }
      +"title": 267518
    }
  ]
  -id: 26234
  -titleTs: "'improv':3 'nextcloud':1 'perform':2"
  -bodyTs: "'/etc/localtime':491,575 '/etc/timezone':493,577 '/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':191 '/jwilder/docker-letsencrypt-nginx-proxy-companion).':118 '/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':91 '/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':297 '/occ':369 '/post/8512710)':28 '/server/latest/admin_manual/installation/server_tuning.html):':129 '/tech/20220618-eking-out-some-nextcloud-performance/)':199,418 '/tech/20220618-eking-out-some-nextcloud-performance/).':563 '/tmp/docker':590,608 '/var/run/postgresql':589 '17':182 '33':581 '6s':550 '70':580 'ad':302,307 'add':287,573,578,582,591 'admin':359 'aio':102 'all-app':377 'alreadi':139 'also':210 'anoth':522 'app':313,321,338,379,496 'around':8 'articl':455,556,624 'backend':184 'bad':6 'basic':135 'behind':111 'benchmark':260 'blog':250,555 'bother':15 'bump':526 'c':585 'calendar':440 'care':141 'chang':446,547 'check':358 'claim':279 'come':165 'command':318,327,583 'comment':20 'companion':151 'complet':341 'compos':87,291,398,403,567 'config.php':602 'config/config.php':478 'config/redis.config.php':482 'configur':469 'connect':206,420,449,513 'contain':289,322,389,485,497,572,593 'convert':372 'convert-typ':371 'cri':273 'cron':315,484 'curious':41 'd':55,281,405 'dashboard':535 'databas':183 'db':234,370,385,388,571 'dbhost':604,607 'deactiv':337 'depend':310,598 'detail':426 'develop':530 'didn':256 'directori':588 'discuss.tchncs.de':27 'discuss.tchncs.de/post/8512710)':26 'doc':126 'docker':86,96,145,402 'docs.nextcloud.com':128 'docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html):':127 'done':613 'drop':344 'edit':506,631 'eke':192 'error':334 'etc':441 'far':272 'fast':436 'faster':267,278 'felt':264 'file':292,399,439,568 'finish':537 'firefox':533 'first':240 'follow':248,413,552 'found':217 'gain':33 'gave':521 'general':75 'generat':177 'github.com':90,117,296 'github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).':116 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':89 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':295 'good':74,219,623,642 'got':40 'guid':415 'half':540 'happi':629 'haven':160,443 'hint':466 'host':470 'hour':46 'huge':31 'imag':97,103,146,152,175,230 'imaginari':173,228 'improv':232,431,459,615 'includ':635 'inform':121,222,645 'initi':81 'insight':69,637 'instal':80,107 'instanc':617 'jump':65 'know':622 'learn':60 'like':293,323 'link':253 'littl':266 'load':263,437,538 'log':212 'look':528 'm':154,511,628 'main':200 'make':71,362,639 'maridb':244 'markus-blog.de':190 'markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':189 'mayb':62 'mention':211 'might':462 'migrat':180,233,242,317,329,350,357 'mine':300 'minor':458 'mysql':186 'name':299 'need':473,486 'never':13 'next':465 'nextcloud':1,95,125,181,195,320,364,601,647 'nginx':113 'note':78 'occ':326 'offici':94 'old':387 'one':157 'oppos':99 'orphan':408 'other':63 'outlook':609 'overview':76 'page':262 'password':374,376,472 'peekread.info':198,417,562 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/)':197,416 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).':561 'perform':11,196,432,619,648 'pgsql':380 'place':169 'port':471 'post':23,251,633 'postgr':38,226,236,246,288,301,304,346,368,375,381,383,384,448,507,515,584,605 'postgresql':188 'pretti':523 'preview':176,231 'process':286,330 'proxi':115,150 'quit':433 'read':282 'realli':14 'receiv':488 'redi':208,409,422,468,560 'refer':394 'regard':10,646 'remov':342,386,407 'remove-orphan':406 'replac':603 'reput':7 'research':47 'revers':114 'rough':247 'run':109,316,401 'seem':2 'server':122 'set':476 'settings/system':360 'setup':51 'share':626 'signific':434,524 'sinc':453 'socket':205,411,424,452,509,517,587 'sourc':106,119,220,643 'speed':32,525 'spent':43 'spoke':456 'stack':88 'start':82,349 'state':428 'step':564 'stop':331 'sure':363 'syslog':214 'tabl':347 'taken':140 'talk':29,201 'thing':136,158 'thought':53 'time':542 'tmp':505,592 'tool':531 'tri':162,463 'tune':123 'tweak':49 'type':373 'unix':586 'use':155,172,203,225,227,367 'user':382,579 'volum':305,391,494,503,574,595 'way':276,277 'well':480,500,519 'went':354 'write':56 'yesterday':25 'yet':445"
  +cross: false
  +upVotes: 0
  +downVotes: 0
  +ranking: 1704118066
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/post/8559818"
  +editedAt: DateTimeImmutable @1720292146 {#1693
    date: 2024-07-06 20:55:46.0 +02:00
  }
  +createdAt: DateTimeImmutable @1704031666 {#1562
    date: 2023-12-31 15:07:46.0 +01:00
  }
  +__isInitialized__: true
   …2
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS DENIED
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
4 DENIED moderate
Proxies\__CG__\App\Entity\Entry {#1591
  +user: Proxies\__CG__\App\Entity\User {#2457 …}
  +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
  +image: null
  +domain: Proxies\__CG__\App\Entity\Domain {#1719 …}
  +slug: "Nextcloud-Performance-Improvements"
  +title: "Nextcloud Performance Improvements"
  +url: null
  +body: """
    Nextcloud seems to have a bad reputation around here regarding performance. It never really bothered me, but when a comment on a [post here yesterday](https://discuss.tchncs.de/post/8512710) talked about huge speed gains to be had with Postgres, I got curious and spent a few hours researching and tweaking my setup.\n
    \n
    I thought I’d write up what I learned and maybe others can jump in with their insights to make this a good general overview.\n
    \n
    To note, my installation initially started out with [this docker compose stack](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml) from the official nextcloud docker images (as opposed to the AIO image or a source installation.) I run this behind an [NGINX reverse proxy](https://github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).\n
    \n
    #### Sources of information\n
    \n
    - [Server tuning on Nextcloud Docs](https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html): Most of this are very basic things that are already taken care of in the docker image or in the proxy companion image I’m using. The one thing I haven’t tried and that comes up in other places, too, is using Imaginary for image preview generation.\n
    - [How to migrate Nextcloud 17 Database Backend from MySQL to postgreSQL](https://markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)\n
    - [Eking out some Nextcloud Performance](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) mainly talks about using a socket connection for redis, but also mentions logging to syslog (have not found a good source of information for this), using postgres, using imaginary for image previews\n
    \n
    ### Improvements\n
    \n
    #### Migrate DB to Postgres\n
    \n
    What I did first is migrate from maridb to postgres, roughly following the blog post I linked above. I didn’t do any benchmarking, but page loads felt a little faster after that (but a far cry from the “way way faster” claims I’d read.)\n
    \n
    Here's my process- add postgres container to compose file [like so](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml). I named mine “postgres”, added a “postgres” volume, and added it to depends_on for app and cron - run migration command from nextcloud app container like any other occ command. The migration process stopped with an error for a deactivated app so I completely removed it, dropped the postgres tables and started migration again and it went through. after migration, check `admin settings/system` to make sure Nextcloud is now using postgres. `./occ db:convert-type --password $POSTGRES_PASSWORD --all-apps pgsql $POSTGRES_USER postgres $POSTGRES_DB`- remove old “db” container and volume and all references to it from compose file and run `docker compose up -d --remove-orphans`\n
    \n
    #### Redis over Sockets\n
    \n
    I followed [above guide](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) for connecting to Redis with sockets with details as stated below. This improved performance quite significantly. Very fast loads for files, calendar, etc. I haven’t yet changed the postgres connection over to sockets since the article spoke about minor improvements, but I might try this next.\n
    \n
    Hints- the redis configuration (host, port, password, …) need to be set in `config/config.php`, as well as `config/redis.config.php`- the cron container needs to receive the same `/etc/localtime` and `/etc/timezone` volumes the app container did, as well as the `volumes_from: tmp`\n
    \n
    #### EDIT Postgres over Sockets\n
    \n
    I’m now connecting to Postgres over sockets as well, which gave another pretty significant speed bump. When looking at developer tools in Firefox, the dashboard now finishes loading in half the time it did before the change; just over 6s. I followed the [same blog article I did for Redis](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).\n
    \n
    Steps- in the compose file, for the db container: add volumes `/etc/localtime` and `/etc/timezone`; add `user: “70:33”`; add `command: postgres -c unix_socket_directories=‘/var/run/postgresql/,/tmp/docker/’`; add tmp container to `volumes_from` and `depends_on`- in nextcloud config.php, replace `‘dbhost’ => ‘postgres’,` with `‘dbhost’ => ‘/tmp/docker/’,`\n
    \n
    ### Outlook\n
    \n
    What have you done to improve your instance’s performance? Do you know good articles to share? I’m happy to edit this post to include any insights and make this a good source of information regarding Nextcloud performance.
    """
  +type: "article"
  +lang: "en"
  +isOc: false
  +hasEmbed: false
  +commentCount: 35
  +favouriteCount: 131
  +score: 0
  +isAdult: false
  +sticky: false
  +lastActive: DateTime @1712594949 {#1550
    date: 2024-04-08 18:49:09.0 +02:00
  }
  +ip: null
  +adaAmount: 0
  +tags: null
  +mentions: null
  +comments: Doctrine\ORM\PersistentCollection {#1715 …}
  +votes: Doctrine\ORM\PersistentCollection {#1718 …}
  +reports: Doctrine\ORM\PersistentCollection {#1717 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1611 …}
  +notifications: Doctrine\ORM\PersistentCollection {#1628 …}
  +badges: Doctrine\ORM\PersistentCollection {#1702 …}
  +children: [
    App\Entity\EntryComment {#1709
      +user: App\Entity\User {#265 …}
      +entry: Proxies\__CG__\App\Entity\Entry {#1591 …2}
      +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
      +image: null
      +parent: Proxies\__CG__\App\Entity\EntryComment {#1668 …}
      +root: Proxies\__CG__\App\Entity\EntryComment {#1667 …}
      +body: "it stands for Windows Subsystem for Linux. [Here](https://www.windowscentral.com/how-install-wsl2-windows-10) is a link on how to install it."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1704036973 {#1439
        date: 2023-12-31 16:36:13.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#1670 …}
      +nested: Doctrine\ORM\PersistentCollection {#1678 …}
      +votes: Doctrine\ORM\PersistentCollection {#1673 …}
      +reports: Doctrine\ORM\PersistentCollection {#1676 …}
      +favourites: Doctrine\ORM\PersistentCollection {#1586 …}
      +notifications: Doctrine\ORM\PersistentCollection {#1572 …}
      -id: 267518
      -bodyTs: "'/how-install-wsl2-windows-10)':11 'instal':18 'link':14 'linux':7 'stand':2 'subsystem':5 'window':4 'www.windowscentral.com':10 'www.windowscentral.com/how-install-wsl2-windows-10)':9"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.sdf.org/comment/6817528"
      +editedAt: DateTimeImmutable @1709934943 {#1435
        date: 2024-03-08 22:55:43.0 +01:00
      }
      +createdAt: DateTimeImmutable @1704036973 {#1436
        date: 2023-12-31 16:36:13.0 +01:00
      }
      +"title": 267518
    }
  ]
  -id: 26234
  -titleTs: "'improv':3 'nextcloud':1 'perform':2"
  -bodyTs: "'/etc/localtime':491,575 '/etc/timezone':493,577 '/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':191 '/jwilder/docker-letsencrypt-nginx-proxy-companion).':118 '/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':91 '/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':297 '/occ':369 '/post/8512710)':28 '/server/latest/admin_manual/installation/server_tuning.html):':129 '/tech/20220618-eking-out-some-nextcloud-performance/)':199,418 '/tech/20220618-eking-out-some-nextcloud-performance/).':563 '/tmp/docker':590,608 '/var/run/postgresql':589 '17':182 '33':581 '6s':550 '70':580 'ad':302,307 'add':287,573,578,582,591 'admin':359 'aio':102 'all-app':377 'alreadi':139 'also':210 'anoth':522 'app':313,321,338,379,496 'around':8 'articl':455,556,624 'backend':184 'bad':6 'basic':135 'behind':111 'benchmark':260 'blog':250,555 'bother':15 'bump':526 'c':585 'calendar':440 'care':141 'chang':446,547 'check':358 'claim':279 'come':165 'command':318,327,583 'comment':20 'companion':151 'complet':341 'compos':87,291,398,403,567 'config.php':602 'config/config.php':478 'config/redis.config.php':482 'configur':469 'connect':206,420,449,513 'contain':289,322,389,485,497,572,593 'convert':372 'convert-typ':371 'cri':273 'cron':315,484 'curious':41 'd':55,281,405 'dashboard':535 'databas':183 'db':234,370,385,388,571 'dbhost':604,607 'deactiv':337 'depend':310,598 'detail':426 'develop':530 'didn':256 'directori':588 'discuss.tchncs.de':27 'discuss.tchncs.de/post/8512710)':26 'doc':126 'docker':86,96,145,402 'docs.nextcloud.com':128 'docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html):':127 'done':613 'drop':344 'edit':506,631 'eke':192 'error':334 'etc':441 'far':272 'fast':436 'faster':267,278 'felt':264 'file':292,399,439,568 'finish':537 'firefox':533 'first':240 'follow':248,413,552 'found':217 'gain':33 'gave':521 'general':75 'generat':177 'github.com':90,117,296 'github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).':116 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':89 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':295 'good':74,219,623,642 'got':40 'guid':415 'half':540 'happi':629 'haven':160,443 'hint':466 'host':470 'hour':46 'huge':31 'imag':97,103,146,152,175,230 'imaginari':173,228 'improv':232,431,459,615 'includ':635 'inform':121,222,645 'initi':81 'insight':69,637 'instal':80,107 'instanc':617 'jump':65 'know':622 'learn':60 'like':293,323 'link':253 'littl':266 'load':263,437,538 'log':212 'look':528 'm':154,511,628 'main':200 'make':71,362,639 'maridb':244 'markus-blog.de':190 'markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':189 'mayb':62 'mention':211 'might':462 'migrat':180,233,242,317,329,350,357 'mine':300 'minor':458 'mysql':186 'name':299 'need':473,486 'never':13 'next':465 'nextcloud':1,95,125,181,195,320,364,601,647 'nginx':113 'note':78 'occ':326 'offici':94 'old':387 'one':157 'oppos':99 'orphan':408 'other':63 'outlook':609 'overview':76 'page':262 'password':374,376,472 'peekread.info':198,417,562 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/)':197,416 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).':561 'perform':11,196,432,619,648 'pgsql':380 'place':169 'port':471 'post':23,251,633 'postgr':38,226,236,246,288,301,304,346,368,375,381,383,384,448,507,515,584,605 'postgresql':188 'pretti':523 'preview':176,231 'process':286,330 'proxi':115,150 'quit':433 'read':282 'realli':14 'receiv':488 'redi':208,409,422,468,560 'refer':394 'regard':10,646 'remov':342,386,407 'remove-orphan':406 'replac':603 'reput':7 'research':47 'revers':114 'rough':247 'run':109,316,401 'seem':2 'server':122 'set':476 'settings/system':360 'setup':51 'share':626 'signific':434,524 'sinc':453 'socket':205,411,424,452,509,517,587 'sourc':106,119,220,643 'speed':32,525 'spent':43 'spoke':456 'stack':88 'start':82,349 'state':428 'step':564 'stop':331 'sure':363 'syslog':214 'tabl':347 'taken':140 'talk':29,201 'thing':136,158 'thought':53 'time':542 'tmp':505,592 'tool':531 'tri':162,463 'tune':123 'tweak':49 'type':373 'unix':586 'use':155,172,203,225,227,367 'user':382,579 'volum':305,391,494,503,574,595 'way':276,277 'well':480,500,519 'went':354 'write':56 'yesterday':25 'yet':445"
  +cross: false
  +upVotes: 0
  +downVotes: 0
  +ranking: 1704118066
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/post/8559818"
  +editedAt: DateTimeImmutable @1720292146 {#1693
    date: 2024-07-06 20:55:46.0 +02:00
  }
  +createdAt: DateTimeImmutable @1704031666 {#1562
    date: 2023-12-31 15:07:46.0 +01:00
  }
  +__isInitialized__: true
   …2
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS DENIED
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
5 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
6 DENIED moderate
App\Entity\EntryComment {#1709
  +user: App\Entity\User {#265 …}
  +entry: Proxies\__CG__\App\Entity\Entry {#1591
    +user: Proxies\__CG__\App\Entity\User {#2457 …}
    +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1719 …}
    +slug: "Nextcloud-Performance-Improvements"
    +title: "Nextcloud Performance Improvements"
    +url: null
    +body: """
      Nextcloud seems to have a bad reputation around here regarding performance. It never really bothered me, but when a comment on a [post here yesterday](https://discuss.tchncs.de/post/8512710) talked about huge speed gains to be had with Postgres, I got curious and spent a few hours researching and tweaking my setup.\n
      \n
      I thought I’d write up what I learned and maybe others can jump in with their insights to make this a good general overview.\n
      \n
      To note, my installation initially started out with [this docker compose stack](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml) from the official nextcloud docker images (as opposed to the AIO image or a source installation.) I run this behind an [NGINX reverse proxy](https://github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).\n
      \n
      #### Sources of information\n
      \n
      - [Server tuning on Nextcloud Docs](https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html): Most of this are very basic things that are already taken care of in the docker image or in the proxy companion image I’m using. The one thing I haven’t tried and that comes up in other places, too, is using Imaginary for image preview generation.\n
      - [How to migrate Nextcloud 17 Database Backend from MySQL to postgreSQL](https://markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)\n
      - [Eking out some Nextcloud Performance](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) mainly talks about using a socket connection for redis, but also mentions logging to syslog (have not found a good source of information for this), using postgres, using imaginary for image previews\n
      \n
      ### Improvements\n
      \n
      #### Migrate DB to Postgres\n
      \n
      What I did first is migrate from maridb to postgres, roughly following the blog post I linked above. I didn’t do any benchmarking, but page loads felt a little faster after that (but a far cry from the “way way faster” claims I’d read.)\n
      \n
      Here's my process- add postgres container to compose file [like so](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml). I named mine “postgres”, added a “postgres” volume, and added it to depends_on for app and cron - run migration command from nextcloud app container like any other occ command. The migration process stopped with an error for a deactivated app so I completely removed it, dropped the postgres tables and started migration again and it went through. after migration, check `admin settings/system` to make sure Nextcloud is now using postgres. `./occ db:convert-type --password $POSTGRES_PASSWORD --all-apps pgsql $POSTGRES_USER postgres $POSTGRES_DB`- remove old “db” container and volume and all references to it from compose file and run `docker compose up -d --remove-orphans`\n
      \n
      #### Redis over Sockets\n
      \n
      I followed [above guide](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) for connecting to Redis with sockets with details as stated below. This improved performance quite significantly. Very fast loads for files, calendar, etc. I haven’t yet changed the postgres connection over to sockets since the article spoke about minor improvements, but I might try this next.\n
      \n
      Hints- the redis configuration (host, port, password, …) need to be set in `config/config.php`, as well as `config/redis.config.php`- the cron container needs to receive the same `/etc/localtime` and `/etc/timezone` volumes the app container did, as well as the `volumes_from: tmp`\n
      \n
      #### EDIT Postgres over Sockets\n
      \n
      I’m now connecting to Postgres over sockets as well, which gave another pretty significant speed bump. When looking at developer tools in Firefox, the dashboard now finishes loading in half the time it did before the change; just over 6s. I followed the [same blog article I did for Redis](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).\n
      \n
      Steps- in the compose file, for the db container: add volumes `/etc/localtime` and `/etc/timezone`; add `user: “70:33”`; add `command: postgres -c unix_socket_directories=‘/var/run/postgresql/,/tmp/docker/’`; add tmp container to `volumes_from` and `depends_on`- in nextcloud config.php, replace `‘dbhost’ => ‘postgres’,` with `‘dbhost’ => ‘/tmp/docker/’,`\n
      \n
      ### Outlook\n
      \n
      What have you done to improve your instance’s performance? Do you know good articles to share? I’m happy to edit this post to include any insights and make this a good source of information regarding Nextcloud performance.
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 35
    +favouriteCount: 131
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1712594949 {#1550
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1715 …}
    +votes: Doctrine\ORM\PersistentCollection {#1718 …}
    +reports: Doctrine\ORM\PersistentCollection {#1717 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1611 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1628 …}
    +badges: Doctrine\ORM\PersistentCollection {#1702 …}
    +children: [
      App\Entity\EntryComment {#1709}
    ]
    -id: 26234
    -titleTs: "'improv':3 'nextcloud':1 'perform':2"
    -bodyTs: "'/etc/localtime':491,575 '/etc/timezone':493,577 '/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':191 '/jwilder/docker-letsencrypt-nginx-proxy-companion).':118 '/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':91 '/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':297 '/occ':369 '/post/8512710)':28 '/server/latest/admin_manual/installation/server_tuning.html):':129 '/tech/20220618-eking-out-some-nextcloud-performance/)':199,418 '/tech/20220618-eking-out-some-nextcloud-performance/).':563 '/tmp/docker':590,608 '/var/run/postgresql':589 '17':182 '33':581 '6s':550 '70':580 'ad':302,307 'add':287,573,578,582,591 'admin':359 'aio':102 'all-app':377 'alreadi':139 'also':210 'anoth':522 'app':313,321,338,379,496 'around':8 'articl':455,556,624 'backend':184 'bad':6 'basic':135 'behind':111 'benchmark':260 'blog':250,555 'bother':15 'bump':526 'c':585 'calendar':440 'care':141 'chang':446,547 'check':358 'claim':279 'come':165 'command':318,327,583 'comment':20 'companion':151 'complet':341 'compos':87,291,398,403,567 'config.php':602 'config/config.php':478 'config/redis.config.php':482 'configur':469 'connect':206,420,449,513 'contain':289,322,389,485,497,572,593 'convert':372 'convert-typ':371 'cri':273 'cron':315,484 'curious':41 'd':55,281,405 'dashboard':535 'databas':183 'db':234,370,385,388,571 'dbhost':604,607 'deactiv':337 'depend':310,598 'detail':426 'develop':530 'didn':256 'directori':588 'discuss.tchncs.de':27 'discuss.tchncs.de/post/8512710)':26 'doc':126 'docker':86,96,145,402 'docs.nextcloud.com':128 'docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html):':127 'done':613 'drop':344 'edit':506,631 'eke':192 'error':334 'etc':441 'far':272 'fast':436 'faster':267,278 'felt':264 'file':292,399,439,568 'finish':537 'firefox':533 'first':240 'follow':248,413,552 'found':217 'gain':33 'gave':521 'general':75 'generat':177 'github.com':90,117,296 'github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).':116 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':89 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':295 'good':74,219,623,642 'got':40 'guid':415 'half':540 'happi':629 'haven':160,443 'hint':466 'host':470 'hour':46 'huge':31 'imag':97,103,146,152,175,230 'imaginari':173,228 'improv':232,431,459,615 'includ':635 'inform':121,222,645 'initi':81 'insight':69,637 'instal':80,107 'instanc':617 'jump':65 'know':622 'learn':60 'like':293,323 'link':253 'littl':266 'load':263,437,538 'log':212 'look':528 'm':154,511,628 'main':200 'make':71,362,639 'maridb':244 'markus-blog.de':190 'markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':189 'mayb':62 'mention':211 'might':462 'migrat':180,233,242,317,329,350,357 'mine':300 'minor':458 'mysql':186 'name':299 'need':473,486 'never':13 'next':465 'nextcloud':1,95,125,181,195,320,364,601,647 'nginx':113 'note':78 'occ':326 'offici':94 'old':387 'one':157 'oppos':99 'orphan':408 'other':63 'outlook':609 'overview':76 'page':262 'password':374,376,472 'peekread.info':198,417,562 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/)':197,416 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).':561 'perform':11,196,432,619,648 'pgsql':380 'place':169 'port':471 'post':23,251,633 'postgr':38,226,236,246,288,301,304,346,368,375,381,383,384,448,507,515,584,605 'postgresql':188 'pretti':523 'preview':176,231 'process':286,330 'proxi':115,150 'quit':433 'read':282 'realli':14 'receiv':488 'redi':208,409,422,468,560 'refer':394 'regard':10,646 'remov':342,386,407 'remove-orphan':406 'replac':603 'reput':7 'research':47 'revers':114 'rough':247 'run':109,316,401 'seem':2 'server':122 'set':476 'settings/system':360 'setup':51 'share':626 'signific':434,524 'sinc':453 'socket':205,411,424,452,509,517,587 'sourc':106,119,220,643 'speed':32,525 'spent':43 'spoke':456 'stack':88 'start':82,349 'state':428 'step':564 'stop':331 'sure':363 'syslog':214 'tabl':347 'taken':140 'talk':29,201 'thing':136,158 'thought':53 'time':542 'tmp':505,592 'tool':531 'tri':162,463 'tune':123 'tweak':49 'type':373 'unix':586 'use':155,172,203,225,227,367 'user':382,579 'volum':305,391,494,503,574,595 'way':276,277 'well':480,500,519 'went':354 'write':56 'yesterday':25 'yet':445"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1704118066
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/post/8559818"
    +editedAt: DateTimeImmutable @1720292146 {#1693
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#1562
      date: 2023-12-31 15:07:46.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
  +image: null
  +parent: Proxies\__CG__\App\Entity\EntryComment {#1668 …}
  +root: Proxies\__CG__\App\Entity\EntryComment {#1667 …}
  +body: "it stands for Windows Subsystem for Linux. [Here](https://www.windowscentral.com/how-install-wsl2-windows-10) is a link on how to install it."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1704036973 {#1439
    date: 2023-12-31 16:36:13.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#1670 …}
  +nested: Doctrine\ORM\PersistentCollection {#1678 …}
  +votes: Doctrine\ORM\PersistentCollection {#1673 …}
  +reports: Doctrine\ORM\PersistentCollection {#1676 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1586 …}
  +notifications: Doctrine\ORM\PersistentCollection {#1572 …}
  -id: 267518
  -bodyTs: "'/how-install-wsl2-windows-10)':11 'instal':18 'link':14 'linux':7 'stand':2 'subsystem':5 'window':4 'www.windowscentral.com':10 'www.windowscentral.com/how-install-wsl2-windows-10)':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.sdf.org/comment/6817528"
  +editedAt: DateTimeImmutable @1709934943 {#1435
    date: 2024-03-08 22:55:43.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704036973 {#1436
    date: 2023-12-31 16:36:13.0 +01:00
  }
  +"title": 267518
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
7 DENIED edit
App\Entity\EntryComment {#1709
  +user: App\Entity\User {#265 …}
  +entry: Proxies\__CG__\App\Entity\Entry {#1591
    +user: Proxies\__CG__\App\Entity\User {#2457 …}
    +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1719 …}
    +slug: "Nextcloud-Performance-Improvements"
    +title: "Nextcloud Performance Improvements"
    +url: null
    +body: """
      Nextcloud seems to have a bad reputation around here regarding performance. It never really bothered me, but when a comment on a [post here yesterday](https://discuss.tchncs.de/post/8512710) talked about huge speed gains to be had with Postgres, I got curious and spent a few hours researching and tweaking my setup.\n
      \n
      I thought I’d write up what I learned and maybe others can jump in with their insights to make this a good general overview.\n
      \n
      To note, my installation initially started out with [this docker compose stack](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml) from the official nextcloud docker images (as opposed to the AIO image or a source installation.) I run this behind an [NGINX reverse proxy](https://github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).\n
      \n
      #### Sources of information\n
      \n
      - [Server tuning on Nextcloud Docs](https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html): Most of this are very basic things that are already taken care of in the docker image or in the proxy companion image I’m using. The one thing I haven’t tried and that comes up in other places, too, is using Imaginary for image preview generation.\n
      - [How to migrate Nextcloud 17 Database Backend from MySQL to postgreSQL](https://markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)\n
      - [Eking out some Nextcloud Performance](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) mainly talks about using a socket connection for redis, but also mentions logging to syslog (have not found a good source of information for this), using postgres, using imaginary for image previews\n
      \n
      ### Improvements\n
      \n
      #### Migrate DB to Postgres\n
      \n
      What I did first is migrate from maridb to postgres, roughly following the blog post I linked above. I didn’t do any benchmarking, but page loads felt a little faster after that (but a far cry from the “way way faster” claims I’d read.)\n
      \n
      Here's my process- add postgres container to compose file [like so](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml). I named mine “postgres”, added a “postgres” volume, and added it to depends_on for app and cron - run migration command from nextcloud app container like any other occ command. The migration process stopped with an error for a deactivated app so I completely removed it, dropped the postgres tables and started migration again and it went through. after migration, check `admin settings/system` to make sure Nextcloud is now using postgres. `./occ db:convert-type --password $POSTGRES_PASSWORD --all-apps pgsql $POSTGRES_USER postgres $POSTGRES_DB`- remove old “db” container and volume and all references to it from compose file and run `docker compose up -d --remove-orphans`\n
      \n
      #### Redis over Sockets\n
      \n
      I followed [above guide](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) for connecting to Redis with sockets with details as stated below. This improved performance quite significantly. Very fast loads for files, calendar, etc. I haven’t yet changed the postgres connection over to sockets since the article spoke about minor improvements, but I might try this next.\n
      \n
      Hints- the redis configuration (host, port, password, …) need to be set in `config/config.php`, as well as `config/redis.config.php`- the cron container needs to receive the same `/etc/localtime` and `/etc/timezone` volumes the app container did, as well as the `volumes_from: tmp`\n
      \n
      #### EDIT Postgres over Sockets\n
      \n
      I’m now connecting to Postgres over sockets as well, which gave another pretty significant speed bump. When looking at developer tools in Firefox, the dashboard now finishes loading in half the time it did before the change; just over 6s. I followed the [same blog article I did for Redis](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).\n
      \n
      Steps- in the compose file, for the db container: add volumes `/etc/localtime` and `/etc/timezone`; add `user: “70:33”`; add `command: postgres -c unix_socket_directories=‘/var/run/postgresql/,/tmp/docker/’`; add tmp container to `volumes_from` and `depends_on`- in nextcloud config.php, replace `‘dbhost’ => ‘postgres’,` with `‘dbhost’ => ‘/tmp/docker/’,`\n
      \n
      ### Outlook\n
      \n
      What have you done to improve your instance’s performance? Do you know good articles to share? I’m happy to edit this post to include any insights and make this a good source of information regarding Nextcloud performance.
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 35
    +favouriteCount: 131
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1712594949 {#1550
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1715 …}
    +votes: Doctrine\ORM\PersistentCollection {#1718 …}
    +reports: Doctrine\ORM\PersistentCollection {#1717 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1611 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1628 …}
    +badges: Doctrine\ORM\PersistentCollection {#1702 …}
    +children: [
      App\Entity\EntryComment {#1709}
    ]
    -id: 26234
    -titleTs: "'improv':3 'nextcloud':1 'perform':2"
    -bodyTs: "'/etc/localtime':491,575 '/etc/timezone':493,577 '/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':191 '/jwilder/docker-letsencrypt-nginx-proxy-companion).':118 '/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':91 '/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':297 '/occ':369 '/post/8512710)':28 '/server/latest/admin_manual/installation/server_tuning.html):':129 '/tech/20220618-eking-out-some-nextcloud-performance/)':199,418 '/tech/20220618-eking-out-some-nextcloud-performance/).':563 '/tmp/docker':590,608 '/var/run/postgresql':589 '17':182 '33':581 '6s':550 '70':580 'ad':302,307 'add':287,573,578,582,591 'admin':359 'aio':102 'all-app':377 'alreadi':139 'also':210 'anoth':522 'app':313,321,338,379,496 'around':8 'articl':455,556,624 'backend':184 'bad':6 'basic':135 'behind':111 'benchmark':260 'blog':250,555 'bother':15 'bump':526 'c':585 'calendar':440 'care':141 'chang':446,547 'check':358 'claim':279 'come':165 'command':318,327,583 'comment':20 'companion':151 'complet':341 'compos':87,291,398,403,567 'config.php':602 'config/config.php':478 'config/redis.config.php':482 'configur':469 'connect':206,420,449,513 'contain':289,322,389,485,497,572,593 'convert':372 'convert-typ':371 'cri':273 'cron':315,484 'curious':41 'd':55,281,405 'dashboard':535 'databas':183 'db':234,370,385,388,571 'dbhost':604,607 'deactiv':337 'depend':310,598 'detail':426 'develop':530 'didn':256 'directori':588 'discuss.tchncs.de':27 'discuss.tchncs.de/post/8512710)':26 'doc':126 'docker':86,96,145,402 'docs.nextcloud.com':128 'docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html):':127 'done':613 'drop':344 'edit':506,631 'eke':192 'error':334 'etc':441 'far':272 'fast':436 'faster':267,278 'felt':264 'file':292,399,439,568 'finish':537 'firefox':533 'first':240 'follow':248,413,552 'found':217 'gain':33 'gave':521 'general':75 'generat':177 'github.com':90,117,296 'github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).':116 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':89 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':295 'good':74,219,623,642 'got':40 'guid':415 'half':540 'happi':629 'haven':160,443 'hint':466 'host':470 'hour':46 'huge':31 'imag':97,103,146,152,175,230 'imaginari':173,228 'improv':232,431,459,615 'includ':635 'inform':121,222,645 'initi':81 'insight':69,637 'instal':80,107 'instanc':617 'jump':65 'know':622 'learn':60 'like':293,323 'link':253 'littl':266 'load':263,437,538 'log':212 'look':528 'm':154,511,628 'main':200 'make':71,362,639 'maridb':244 'markus-blog.de':190 'markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':189 'mayb':62 'mention':211 'might':462 'migrat':180,233,242,317,329,350,357 'mine':300 'minor':458 'mysql':186 'name':299 'need':473,486 'never':13 'next':465 'nextcloud':1,95,125,181,195,320,364,601,647 'nginx':113 'note':78 'occ':326 'offici':94 'old':387 'one':157 'oppos':99 'orphan':408 'other':63 'outlook':609 'overview':76 'page':262 'password':374,376,472 'peekread.info':198,417,562 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/)':197,416 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).':561 'perform':11,196,432,619,648 'pgsql':380 'place':169 'port':471 'post':23,251,633 'postgr':38,226,236,246,288,301,304,346,368,375,381,383,384,448,507,515,584,605 'postgresql':188 'pretti':523 'preview':176,231 'process':286,330 'proxi':115,150 'quit':433 'read':282 'realli':14 'receiv':488 'redi':208,409,422,468,560 'refer':394 'regard':10,646 'remov':342,386,407 'remove-orphan':406 'replac':603 'reput':7 'research':47 'revers':114 'rough':247 'run':109,316,401 'seem':2 'server':122 'set':476 'settings/system':360 'setup':51 'share':626 'signific':434,524 'sinc':453 'socket':205,411,424,452,509,517,587 'sourc':106,119,220,643 'speed':32,525 'spent':43 'spoke':456 'stack':88 'start':82,349 'state':428 'step':564 'stop':331 'sure':363 'syslog':214 'tabl':347 'taken':140 'talk':29,201 'thing':136,158 'thought':53 'time':542 'tmp':505,592 'tool':531 'tri':162,463 'tune':123 'tweak':49 'type':373 'unix':586 'use':155,172,203,225,227,367 'user':382,579 'volum':305,391,494,503,574,595 'way':276,277 'well':480,500,519 'went':354 'write':56 'yesterday':25 'yet':445"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1704118066
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/post/8559818"
    +editedAt: DateTimeImmutable @1720292146 {#1693
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#1562
      date: 2023-12-31 15:07:46.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
  +image: null
  +parent: Proxies\__CG__\App\Entity\EntryComment {#1668 …}
  +root: Proxies\__CG__\App\Entity\EntryComment {#1667 …}
  +body: "it stands for Windows Subsystem for Linux. [Here](https://www.windowscentral.com/how-install-wsl2-windows-10) is a link on how to install it."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1704036973 {#1439
    date: 2023-12-31 16:36:13.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#1670 …}
  +nested: Doctrine\ORM\PersistentCollection {#1678 …}
  +votes: Doctrine\ORM\PersistentCollection {#1673 …}
  +reports: Doctrine\ORM\PersistentCollection {#1676 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1586 …}
  +notifications: Doctrine\ORM\PersistentCollection {#1572 …}
  -id: 267518
  -bodyTs: "'/how-install-wsl2-windows-10)':11 'instal':18 'link':14 'linux':7 'stand':2 'subsystem':5 'window':4 'www.windowscentral.com':10 'www.windowscentral.com/how-install-wsl2-windows-10)':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.sdf.org/comment/6817528"
  +editedAt: DateTimeImmutable @1709934943 {#1435
    date: 2024-03-08 22:55:43.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704036973 {#1436
    date: 2023-12-31 16:36:13.0 +01:00
  }
  +"title": 267518
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
8 DENIED moderate
App\Entity\EntryComment {#1709
  +user: App\Entity\User {#265 …}
  +entry: Proxies\__CG__\App\Entity\Entry {#1591
    +user: Proxies\__CG__\App\Entity\User {#2457 …}
    +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1719 …}
    +slug: "Nextcloud-Performance-Improvements"
    +title: "Nextcloud Performance Improvements"
    +url: null
    +body: """
      Nextcloud seems to have a bad reputation around here regarding performance. It never really bothered me, but when a comment on a [post here yesterday](https://discuss.tchncs.de/post/8512710) talked about huge speed gains to be had with Postgres, I got curious and spent a few hours researching and tweaking my setup.\n
      \n
      I thought I’d write up what I learned and maybe others can jump in with their insights to make this a good general overview.\n
      \n
      To note, my installation initially started out with [this docker compose stack](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml) from the official nextcloud docker images (as opposed to the AIO image or a source installation.) I run this behind an [NGINX reverse proxy](https://github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).\n
      \n
      #### Sources of information\n
      \n
      - [Server tuning on Nextcloud Docs](https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html): Most of this are very basic things that are already taken care of in the docker image or in the proxy companion image I’m using. The one thing I haven’t tried and that comes up in other places, too, is using Imaginary for image preview generation.\n
      - [How to migrate Nextcloud 17 Database Backend from MySQL to postgreSQL](https://markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)\n
      - [Eking out some Nextcloud Performance](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) mainly talks about using a socket connection for redis, but also mentions logging to syslog (have not found a good source of information for this), using postgres, using imaginary for image previews\n
      \n
      ### Improvements\n
      \n
      #### Migrate DB to Postgres\n
      \n
      What I did first is migrate from maridb to postgres, roughly following the blog post I linked above. I didn’t do any benchmarking, but page loads felt a little faster after that (but a far cry from the “way way faster” claims I’d read.)\n
      \n
      Here's my process- add postgres container to compose file [like so](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml). I named mine “postgres”, added a “postgres” volume, and added it to depends_on for app and cron - run migration command from nextcloud app container like any other occ command. The migration process stopped with an error for a deactivated app so I completely removed it, dropped the postgres tables and started migration again and it went through. after migration, check `admin settings/system` to make sure Nextcloud is now using postgres. `./occ db:convert-type --password $POSTGRES_PASSWORD --all-apps pgsql $POSTGRES_USER postgres $POSTGRES_DB`- remove old “db” container and volume and all references to it from compose file and run `docker compose up -d --remove-orphans`\n
      \n
      #### Redis over Sockets\n
      \n
      I followed [above guide](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/) for connecting to Redis with sockets with details as stated below. This improved performance quite significantly. Very fast loads for files, calendar, etc. I haven’t yet changed the postgres connection over to sockets since the article spoke about minor improvements, but I might try this next.\n
      \n
      Hints- the redis configuration (host, port, password, …) need to be set in `config/config.php`, as well as `config/redis.config.php`- the cron container needs to receive the same `/etc/localtime` and `/etc/timezone` volumes the app container did, as well as the `volumes_from: tmp`\n
      \n
      #### EDIT Postgres over Sockets\n
      \n
      I’m now connecting to Postgres over sockets as well, which gave another pretty significant speed bump. When looking at developer tools in Firefox, the dashboard now finishes loading in half the time it did before the change; just over 6s. I followed the [same blog article I did for Redis](https://peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).\n
      \n
      Steps- in the compose file, for the db container: add volumes `/etc/localtime` and `/etc/timezone`; add `user: “70:33”`; add `command: postgres -c unix_socket_directories=‘/var/run/postgresql/,/tmp/docker/’`; add tmp container to `volumes_from` and `depends_on`- in nextcloud config.php, replace `‘dbhost’ => ‘postgres’,` with `‘dbhost’ => ‘/tmp/docker/’,`\n
      \n
      ### Outlook\n
      \n
      What have you done to improve your instance’s performance? Do you know good articles to share? I’m happy to edit this post to include any insights and make this a good source of information regarding Nextcloud performance.
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 35
    +favouriteCount: 131
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1712594949 {#1550
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1715 …}
    +votes: Doctrine\ORM\PersistentCollection {#1718 …}
    +reports: Doctrine\ORM\PersistentCollection {#1717 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1611 …}
    +notifications: Doctrine\ORM\PersistentCollection {#1628 …}
    +badges: Doctrine\ORM\PersistentCollection {#1702 …}
    +children: [
      App\Entity\EntryComment {#1709}
    ]
    -id: 26234
    -titleTs: "'improv':3 'nextcloud':1 'perform':2"
    -bodyTs: "'/etc/localtime':491,575 '/etc/timezone':493,577 '/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':191 '/jwilder/docker-letsencrypt-nginx-proxy-companion).':118 '/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':91 '/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':297 '/occ':369 '/post/8512710)':28 '/server/latest/admin_manual/installation/server_tuning.html):':129 '/tech/20220618-eking-out-some-nextcloud-performance/)':199,418 '/tech/20220618-eking-out-some-nextcloud-performance/).':563 '/tmp/docker':590,608 '/var/run/postgresql':589 '17':182 '33':581 '6s':550 '70':580 'ad':302,307 'add':287,573,578,582,591 'admin':359 'aio':102 'all-app':377 'alreadi':139 'also':210 'anoth':522 'app':313,321,338,379,496 'around':8 'articl':455,556,624 'backend':184 'bad':6 'basic':135 'behind':111 'benchmark':260 'blog':250,555 'bother':15 'bump':526 'c':585 'calendar':440 'care':141 'chang':446,547 'check':358 'claim':279 'come':165 'command':318,327,583 'comment':20 'companion':151 'complet':341 'compos':87,291,398,403,567 'config.php':602 'config/config.php':478 'config/redis.config.php':482 'configur':469 'connect':206,420,449,513 'contain':289,322,389,485,497,572,593 'convert':372 'convert-typ':371 'cri':273 'cron':315,484 'curious':41 'd':55,281,405 'dashboard':535 'databas':183 'db':234,370,385,388,571 'dbhost':604,607 'deactiv':337 'depend':310,598 'detail':426 'develop':530 'didn':256 'directori':588 'discuss.tchncs.de':27 'discuss.tchncs.de/post/8512710)':26 'doc':126 'docker':86,96,145,402 'docs.nextcloud.com':128 'docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html):':127 'done':613 'drop':344 'edit':506,631 'eke':192 'error':334 'etc':441 'far':272 'fast':436 'faster':267,278 'felt':264 'file':292,399,439,568 'finish':537 'firefox':533 'first':240 'follow':248,413,552 'found':217 'gain':33 'gave':521 'general':75 'generat':177 'github.com':90,117,296 'github.com/jwilder/docker-letsencrypt-nginx-proxy-companion).':116 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml)':89 'github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml).':295 'good':74,219,623,642 'got':40 'guid':415 'half':540 'happi':629 'haven':160,443 'hint':466 'host':470 'hour':46 'huge':31 'imag':97,103,146,152,175,230 'imaginari':173,228 'improv':232,431,459,615 'includ':635 'inform':121,222,645 'initi':81 'insight':69,637 'instal':80,107 'instanc':617 'jump':65 'know':622 'learn':60 'like':293,323 'link':253 'littl':266 'load':263,437,538 'log':212 'look':528 'm':154,511,628 'main':200 'make':71,362,639 'maridb':244 'markus-blog.de':190 'markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/)':189 'mayb':62 'mention':211 'might':462 'migrat':180,233,242,317,329,350,357 'mine':300 'minor':458 'mysql':186 'name':299 'need':473,486 'never':13 'next':465 'nextcloud':1,95,125,181,195,320,364,601,647 'nginx':113 'note':78 'occ':326 'offici':94 'old':387 'one':157 'oppos':99 'orphan':408 'other':63 'outlook':609 'overview':76 'page':262 'password':374,376,472 'peekread.info':198,417,562 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/)':197,416 'peekread.info/tech/20220618-eking-out-some-nextcloud-performance/).':561 'perform':11,196,432,619,648 'pgsql':380 'place':169 'port':471 'post':23,251,633 'postgr':38,226,236,246,288,301,304,346,368,375,381,383,384,448,507,515,584,605 'postgresql':188 'pretti':523 'preview':176,231 'process':286,330 'proxi':115,150 'quit':433 'read':282 'realli':14 'receiv':488 'redi':208,409,422,468,560 'refer':394 'regard':10,646 'remov':342,386,407 'remove-orphan':406 'replac':603 'reput':7 'research':47 'revers':114 'rough':247 'run':109,316,401 'seem':2 'server':122 'set':476 'settings/system':360 'setup':51 'share':626 'signific':434,524 'sinc':453 'socket':205,411,424,452,509,517,587 'sourc':106,119,220,643 'speed':32,525 'spent':43 'spoke':456 'stack':88 'start':82,349 'state':428 'step':564 'stop':331 'sure':363 'syslog':214 'tabl':347 'taken':140 'talk':29,201 'thing':136,158 'thought':53 'time':542 'tmp':505,592 'tool':531 'tri':162,463 'tune':123 'tweak':49 'type':373 'unix':586 'use':155,172,203,225,227,367 'user':382,579 'volum':305,391,494,503,574,595 'way':276,277 'well':480,500,519 'went':354 'write':56 'yesterday':25 'yet':445"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1704118066
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/post/8559818"
    +editedAt: DateTimeImmutable @1720292146 {#1693
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#1562
      date: 2023-12-31 15:07:46.0 +01:00
    }
    +__isInitialized__: true
     …2
  }
  +magazine: Proxies\__CG__\App\Entity\Magazine {#1584 …}
  +image: null
  +parent: Proxies\__CG__\App\Entity\EntryComment {#1668 …}
  +root: Proxies\__CG__\App\Entity\EntryComment {#1667 …}
  +body: "it stands for Windows Subsystem for Linux. [Here](https://www.windowscentral.com/how-install-wsl2-windows-10) is a link on how to install it."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1704036973 {#1439
    date: 2023-12-31 16:36:13.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#1670 …}
  +nested: Doctrine\ORM\PersistentCollection {#1678 …}
  +votes: Doctrine\ORM\PersistentCollection {#1673 …}
  +reports: Doctrine\ORM\PersistentCollection {#1676 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1586 …}
  +notifications: Doctrine\ORM\PersistentCollection {#1572 …}
  -id: 267518
  -bodyTs: "'/how-install-wsl2-windows-10)':11 'instal':18 'link':14 'linux':7 'stand':2 'subsystem':5 'window':4 'www.windowscentral.com':10 'www.windowscentral.com/how-install-wsl2-windows-10)':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.sdf.org/comment/6817528"
  +editedAt: DateTimeImmutable @1709934943 {#1435
    date: 2024-03-08 22:55:43.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704036973 {#1436
    date: 2023-12-31 16:36:13.0 +01:00
  }
  +"title": 267518
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
9 DENIED ROLE_ADMIN
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
10 DENIED ROLE_MODERATOR
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details