GET https://kbin.spritesserver.nl/m/selfhosted@lemmy.world/t/26234/Nextcloud-Performance-Improvements

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.14 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.03 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
App\Entity\Entry {#2412
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +magazine: App\Entity\Magazine {#266
    +icon: Proxies\__CG__\App\Entity\Image {#247 …}
    +name: "selfhosted@lemmy.world"
    +title: "selfhosted"
    +description: """
      A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
      \n
      Rules:\n
      \n
      - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
      - No spam posting.\n
      - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
      - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
      - No trolling.\n
      \n
      Resources:\n
      \n
      - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
      - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
      - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
      \n
      > Any issues on the community? Report it using the report flag.\n
      \n
      > Questions? DM the mods!
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 222
    +entryCommentCount: 3916
    +postCount: 0
    +postCommentCount: 0
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729582735 {#276
      date: 2024-10-22 09:38:55.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#238 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
    +entries: Doctrine\ORM\PersistentCollection {#181 …}
    +posts: Doctrine\ORM\PersistentCollection {#139 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
    +bans: Doctrine\ORM\PersistentCollection {#118 …}
    +reports: Doctrine\ORM\PersistentCollection {#104 …}
    +badges: Doctrine\ORM\PersistentCollection {#82 …}
    +logs: Doctrine\ORM\PersistentCollection {#72 …}
    +awards: Doctrine\ORM\PersistentCollection {#61 …}
    +categories: Doctrine\ORM\PersistentCollection {#1820 …}
    -id: 120
    +apId: "selfhosted@lemmy.world"
    +apProfileId: "https://lemmy.world/c/selfhosted"
    +apPublicUrl: "https://lemmy.world/c/selfhosted"
    +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
    +apInboxUrl: "https://lemmy.world/inbox"
    +apDomain: "lemmy.world"
    +apPreferredUsername: "selfhosted"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1703473826 {#270
      date: 2023-12-25 04:10:26.0 +01:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1703473826 {#272
      date: 2023-12-25 04:10:26.0 +01:00
    }
  }
  +image: null
  +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
  +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 {#2410
    date: 2024-04-08 18:49:09.0 +02:00
  }
  +ip: null
  +adaAmount: 0
  +tags: null
  +mentions: null
  +comments: Doctrine\ORM\PersistentCollection {#1884 …}
  +votes: Doctrine\ORM\PersistentCollection {#1973 …}
  +reports: Doctrine\ORM\PersistentCollection {#1959 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
  +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
  +badges: Doctrine\ORM\PersistentCollection {#2440 …}
  +children: []
  -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 {#1850
    date: 2024-07-06 20:55:46.0 +02:00
  }
  +createdAt: DateTimeImmutable @1704031666 {#2420
    date: 2023-12-31 15:07:46.0 +01:00
  }
}
"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
App\Entity\Entry {#2412
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +magazine: App\Entity\Magazine {#266
    +icon: Proxies\__CG__\App\Entity\Image {#247 …}
    +name: "selfhosted@lemmy.world"
    +title: "selfhosted"
    +description: """
      A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
      \n
      Rules:\n
      \n
      - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
      - No spam posting.\n
      - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
      - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
      - No trolling.\n
      \n
      Resources:\n
      \n
      - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
      - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
      - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
      \n
      > Any issues on the community? Report it using the report flag.\n
      \n
      > Questions? DM the mods!
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 222
    +entryCommentCount: 3916
    +postCount: 0
    +postCommentCount: 0
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729582735 {#276
      date: 2024-10-22 09:38:55.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#238 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
    +entries: Doctrine\ORM\PersistentCollection {#181 …}
    +posts: Doctrine\ORM\PersistentCollection {#139 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
    +bans: Doctrine\ORM\PersistentCollection {#118 …}
    +reports: Doctrine\ORM\PersistentCollection {#104 …}
    +badges: Doctrine\ORM\PersistentCollection {#82 …}
    +logs: Doctrine\ORM\PersistentCollection {#72 …}
    +awards: Doctrine\ORM\PersistentCollection {#61 …}
    +categories: Doctrine\ORM\PersistentCollection {#1820 …}
    -id: 120
    +apId: "selfhosted@lemmy.world"
    +apProfileId: "https://lemmy.world/c/selfhosted"
    +apPublicUrl: "https://lemmy.world/c/selfhosted"
    +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
    +apInboxUrl: "https://lemmy.world/inbox"
    +apDomain: "lemmy.world"
    +apPreferredUsername: "selfhosted"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1703473826 {#270
      date: 2023-12-25 04:10:26.0 +01:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1703473826 {#272
      date: 2023-12-25 04:10:26.0 +01:00
    }
  }
  +image: null
  +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
  +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 {#2410
    date: 2024-04-08 18:49:09.0 +02:00
  }
  +ip: null
  +adaAmount: 0
  +tags: null
  +mentions: null
  +comments: Doctrine\ORM\PersistentCollection {#1884 …}
  +votes: Doctrine\ORM\PersistentCollection {#1973 …}
  +reports: Doctrine\ORM\PersistentCollection {#1959 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
  +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
  +badges: Doctrine\ORM\PersistentCollection {#2440 …}
  +children: []
  -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 {#1850
    date: 2024-07-06 20:55:46.0 +02:00
  }
  +createdAt: DateTimeImmutable @1704031666 {#2420
    date: 2023-12-31 15:07:46.0 +01:00
  }
}
"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
App\Entity\Entry {#2412
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +magazine: App\Entity\Magazine {#266
    +icon: Proxies\__CG__\App\Entity\Image {#247 …}
    +name: "selfhosted@lemmy.world"
    +title: "selfhosted"
    +description: """
      A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
      \n
      Rules:\n
      \n
      - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
      - No spam posting.\n
      - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
      - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
      - No trolling.\n
      \n
      Resources:\n
      \n
      - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
      - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
      - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
      \n
      > Any issues on the community? Report it using the report flag.\n
      \n
      > Questions? DM the mods!
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 222
    +entryCommentCount: 3916
    +postCount: 0
    +postCommentCount: 0
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729582735 {#276
      date: 2024-10-22 09:38:55.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#238 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
    +entries: Doctrine\ORM\PersistentCollection {#181 …}
    +posts: Doctrine\ORM\PersistentCollection {#139 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
    +bans: Doctrine\ORM\PersistentCollection {#118 …}
    +reports: Doctrine\ORM\PersistentCollection {#104 …}
    +badges: Doctrine\ORM\PersistentCollection {#82 …}
    +logs: Doctrine\ORM\PersistentCollection {#72 …}
    +awards: Doctrine\ORM\PersistentCollection {#61 …}
    +categories: Doctrine\ORM\PersistentCollection {#1820 …}
    -id: 120
    +apId: "selfhosted@lemmy.world"
    +apProfileId: "https://lemmy.world/c/selfhosted"
    +apPublicUrl: "https://lemmy.world/c/selfhosted"
    +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
    +apInboxUrl: "https://lemmy.world/inbox"
    +apDomain: "lemmy.world"
    +apPreferredUsername: "selfhosted"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1703473826 {#270
      date: 2023-12-25 04:10:26.0 +01:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1703473826 {#272
      date: 2023-12-25 04:10:26.0 +01:00
    }
  }
  +image: null
  +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
  +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 {#2410
    date: 2024-04-08 18:49:09.0 +02:00
  }
  +ip: null
  +adaAmount: 0
  +tags: null
  +mentions: null
  +comments: Doctrine\ORM\PersistentCollection {#1884 …}
  +votes: Doctrine\ORM\PersistentCollection {#1973 …}
  +reports: Doctrine\ORM\PersistentCollection {#1959 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
  +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
  +badges: Doctrine\ORM\PersistentCollection {#2440 …}
  +children: []
  -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 {#1850
    date: 2024-07-06 20:55:46.0 +02:00
  }
  +createdAt: DateTimeImmutable @1704031666 {#2420
    date: 2023-12-31 15:07:46.0 +01:00
  }
}
"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 {#4199
  +user: App\Entity\User {#4147 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1712594949 {#4208
    date: 2024-04-08 18:49:09.0 +02:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4197 …}
  +nested: Doctrine\ORM\PersistentCollection {#4195 …}
  +votes: Doctrine\ORM\PersistentCollection {#4193 …}
  +reports: Doctrine\ORM\PersistentCollection {#4191 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
  -id: 274915
  -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6359207"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704235785 {#4144
    date: 2024-01-02 23:49:45.0 +01:00
  }
}
"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 {#4199
  +user: App\Entity\User {#4147 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1712594949 {#4208
    date: 2024-04-08 18:49:09.0 +02:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4197 …}
  +nested: Doctrine\ORM\PersistentCollection {#4195 …}
  +votes: Doctrine\ORM\PersistentCollection {#4193 …}
  +reports: Doctrine\ORM\PersistentCollection {#4191 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
  -id: 274915
  -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6359207"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704235785 {#4144
    date: 2024-01-02 23:49:45.0 +01:00
  }
}
"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 {#4199
  +user: App\Entity\User {#4147 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1712594949 {#4208
    date: 2024-04-08 18:49:09.0 +02:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4197 …}
  +nested: Doctrine\ORM\PersistentCollection {#4195 …}
  +votes: Doctrine\ORM\PersistentCollection {#4193 …}
  +reports: Doctrine\ORM\PersistentCollection {#4191 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
  -id: 274915
  -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6359207"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704235785 {#4144
    date: 2024-01-02 23:49:45.0 +01:00
  }
}
"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_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
10 DENIED moderate
App\Entity\EntryComment {#5199
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4199
    +user: App\Entity\User {#4147 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712594949 {#4208
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4197 …}
    +nested: Doctrine\ORM\PersistentCollection {#4195 …}
    +votes: Doctrine\ORM\PersistentCollection {#4193 …}
    +reports: Doctrine\ORM\PersistentCollection {#4191 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
    -id: 274915
    -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6359207"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704235785 {#4144
      date: 2024-01-02 23:49:45.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4199}
  +body: """
    You mean like the AIO image, the one officially supported way to install Nextcloud?\n
    \n
    But if you want to tune it, I’m afraid you’ll have to run `sudo tune` once per waking hour.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704236947 {#5197
    date: 2024-01-03 00:09:07.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5200 …}
  +nested: Doctrine\ORM\PersistentCollection {#5202 …}
  +votes: Doctrine\ORM\PersistentCollection {#5204 …}
  +reports: Doctrine\ORM\PersistentCollection {#5206 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5208 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5210 …}
  -id: 287368
  -bodyTs: "'afraid':24 'aio':5 'hour':35 'imag':6 'instal':13 'like':3 'll':26 'm':23 'mean':2 'nextcloud':14 'offici':9 'one':8 'per':33 'run':29 'sudo':30 'support':10 'tune':20,31 'wake':34 'want':18 'way':11"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6077955"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704236947 {#5198
    date: 2024-01-03 00:09:07.0 +01:00
  }
}
"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
11 DENIED edit
App\Entity\EntryComment {#5199
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4199
    +user: App\Entity\User {#4147 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712594949 {#4208
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4197 …}
    +nested: Doctrine\ORM\PersistentCollection {#4195 …}
    +votes: Doctrine\ORM\PersistentCollection {#4193 …}
    +reports: Doctrine\ORM\PersistentCollection {#4191 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
    -id: 274915
    -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6359207"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704235785 {#4144
      date: 2024-01-02 23:49:45.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4199}
  +body: """
    You mean like the AIO image, the one officially supported way to install Nextcloud?\n
    \n
    But if you want to tune it, I’m afraid you’ll have to run `sudo tune` once per waking hour.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704236947 {#5197
    date: 2024-01-03 00:09:07.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5200 …}
  +nested: Doctrine\ORM\PersistentCollection {#5202 …}
  +votes: Doctrine\ORM\PersistentCollection {#5204 …}
  +reports: Doctrine\ORM\PersistentCollection {#5206 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5208 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5210 …}
  -id: 287368
  -bodyTs: "'afraid':24 'aio':5 'hour':35 'imag':6 'instal':13 'like':3 'll':26 'm':23 'mean':2 'nextcloud':14 'offici':9 'one':8 'per':33 'run':29 'sudo':30 'support':10 'tune':20,31 'wake':34 'want':18 'way':11"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6077955"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704236947 {#5198
    date: 2024-01-03 00:09:07.0 +01:00
  }
}
"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
12 DENIED moderate
App\Entity\EntryComment {#5199
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4199
    +user: App\Entity\User {#4147 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712594949 {#4208
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4197 …}
    +nested: Doctrine\ORM\PersistentCollection {#4195 …}
    +votes: Doctrine\ORM\PersistentCollection {#4193 …}
    +reports: Doctrine\ORM\PersistentCollection {#4191 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
    -id: 274915
    -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6359207"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704235785 {#4144
      date: 2024-01-02 23:49:45.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4199}
  +body: """
    You mean like the AIO image, the one officially supported way to install Nextcloud?\n
    \n
    But if you want to tune it, I’m afraid you’ll have to run `sudo tune` once per waking hour.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704236947 {#5197
    date: 2024-01-03 00:09:07.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5200 …}
  +nested: Doctrine\ORM\PersistentCollection {#5202 …}
  +votes: Doctrine\ORM\PersistentCollection {#5204 …}
  +reports: Doctrine\ORM\PersistentCollection {#5206 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5208 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5210 …}
  -id: 287368
  -bodyTs: "'afraid':24 'aio':5 'hour':35 'imag':6 'instal':13 'like':3 'll':26 'm':23 'mean':2 'nextcloud':14 'offici':9 'one':8 'per':33 'run':29 'sudo':30 'support':10 'tune':20,31 'wake':34 'want':18 'way':11"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6077955"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704236947 {#5198
    date: 2024-01-03 00:09:07.0 +01:00
  }
}
"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
13 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
14 DENIED moderate
App\Entity\EntryComment {#5214
  +user: Proxies\__CG__\App\Entity\User {#5215 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4199
    +user: App\Entity\User {#4147 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712594949 {#4208
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4197 …}
    +nested: Doctrine\ORM\PersistentCollection {#4195 …}
    +votes: Doctrine\ORM\PersistentCollection {#4193 …}
    +reports: Doctrine\ORM\PersistentCollection {#4191 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
    -id: 274915
    -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6359207"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704235785 {#4144
      date: 2024-01-02 23:49:45.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4199}
  +body: "Nextcloud AIO or all in one. It works relatively well. I run both my own container and an AIO instance and I’ve been pretty happy with it, I’ll likely migrate to it for my docker only one in the near future. [Nextcloud AIO](https://github.com/nextcloud/all-in-one)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704245862 {#5212
    date: 2024-01-03 02:37:42.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5216 …}
  +nested: Doctrine\ORM\PersistentCollection {#5218 …}
  +votes: Doctrine\ORM\PersistentCollection {#5220 …}
  +reports: Doctrine\ORM\PersistentCollection {#5222 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5224 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5226 …}
  -id: 275329
  -bodyTs: "'/nextcloud/all-in-one)':48 'aio':2,19,45 'contain':16 'docker':37 'futur':43 'github.com':47 'github.com/nextcloud/all-in-one)':46 'happi':26 'instanc':20 'like':31 'll':30 'migrat':32 'near':42 'nextcloud':1,44 'one':6,39 'pretti':25 'relat':9 'run':12 've':23 'well':10 'work':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/7022809"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704245862 {#5213
    date: 2024-01-03 02:37:42.0 +01:00
  }
}
"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
15 DENIED edit
App\Entity\EntryComment {#5214
  +user: Proxies\__CG__\App\Entity\User {#5215 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4199
    +user: App\Entity\User {#4147 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712594949 {#4208
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4197 …}
    +nested: Doctrine\ORM\PersistentCollection {#4195 …}
    +votes: Doctrine\ORM\PersistentCollection {#4193 …}
    +reports: Doctrine\ORM\PersistentCollection {#4191 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
    -id: 274915
    -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6359207"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704235785 {#4144
      date: 2024-01-02 23:49:45.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4199}
  +body: "Nextcloud AIO or all in one. It works relatively well. I run both my own container and an AIO instance and I’ve been pretty happy with it, I’ll likely migrate to it for my docker only one in the near future. [Nextcloud AIO](https://github.com/nextcloud/all-in-one)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704245862 {#5212
    date: 2024-01-03 02:37:42.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5216 …}
  +nested: Doctrine\ORM\PersistentCollection {#5218 …}
  +votes: Doctrine\ORM\PersistentCollection {#5220 …}
  +reports: Doctrine\ORM\PersistentCollection {#5222 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5224 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5226 …}
  -id: 275329
  -bodyTs: "'/nextcloud/all-in-one)':48 'aio':2,19,45 'contain':16 'docker':37 'futur':43 'github.com':47 'github.com/nextcloud/all-in-one)':46 'happi':26 'instanc':20 'like':31 'll':30 'migrat':32 'near':42 'nextcloud':1,44 'one':6,39 'pretti':25 'relat':9 'run':12 've':23 'well':10 'work':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/7022809"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704245862 {#5213
    date: 2024-01-03 02:37:42.0 +01:00
  }
}
"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
16 DENIED moderate
App\Entity\EntryComment {#5214
  +user: Proxies\__CG__\App\Entity\User {#5215 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4199
    +user: App\Entity\User {#4147 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712594949 {#4208
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4197 …}
    +nested: Doctrine\ORM\PersistentCollection {#4195 …}
    +votes: Doctrine\ORM\PersistentCollection {#4193 …}
    +reports: Doctrine\ORM\PersistentCollection {#4191 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
    -id: 274915
    -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6359207"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704235785 {#4144
      date: 2024-01-02 23:49:45.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4199}
  +body: "Nextcloud AIO or all in one. It works relatively well. I run both my own container and an AIO instance and I’ve been pretty happy with it, I’ll likely migrate to it for my docker only one in the near future. [Nextcloud AIO](https://github.com/nextcloud/all-in-one)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704245862 {#5212
    date: 2024-01-03 02:37:42.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5216 …}
  +nested: Doctrine\ORM\PersistentCollection {#5218 …}
  +votes: Doctrine\ORM\PersistentCollection {#5220 …}
  +reports: Doctrine\ORM\PersistentCollection {#5222 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5224 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5226 …}
  -id: 275329
  -bodyTs: "'/nextcloud/all-in-one)':48 'aio':2,19,45 'contain':16 'docker':37 'futur':43 'github.com':47 'github.com/nextcloud/all-in-one)':46 'happi':26 'instanc':20 'like':31 'll':30 'migrat':32 'near':42 'nextcloud':1,44 'one':6,39 'pretti':25 'relat':9 'run':12 've':23 'well':10 'work':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/7022809"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704245862 {#5213
    date: 2024-01-03 02:37:42.0 +01:00
  }
}
"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
17 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
18 DENIED moderate
App\Entity\EntryComment {#5330
  +user: App\Entity\User {#4147 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5214
    +user: Proxies\__CG__\App\Entity\User {#5215 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4199
      +user: App\Entity\User {#4147 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1712594949 {#4208
        date: 2024-04-08 18:49:09.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4197 …}
      +nested: Doctrine\ORM\PersistentCollection {#4195 …}
      +votes: Doctrine\ORM\PersistentCollection {#4193 …}
      +reports: Doctrine\ORM\PersistentCollection {#4191 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
      -id: 274915
      -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6359207"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704235785 {#4144
        date: 2024-01-02 23:49:45.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4199}
    +body: "Nextcloud AIO or all in one. It works relatively well. I run both my own container and an AIO instance and I’ve been pretty happy with it, I’ll likely migrate to it for my docker only one in the near future. [Nextcloud AIO](https://github.com/nextcloud/all-in-one)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704245862 {#5212
      date: 2024-01-03 02:37:42.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@butt_mountain_69420@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5216 …}
    +nested: Doctrine\ORM\PersistentCollection {#5218 …}
    +votes: Doctrine\ORM\PersistentCollection {#5220 …}
    +reports: Doctrine\ORM\PersistentCollection {#5222 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5224 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5226 …}
    -id: 275329
    -bodyTs: "'/nextcloud/all-in-one)':48 'aio':2,19,45 'contain':16 'docker':37 'futur':43 'github.com':47 'github.com/nextcloud/all-in-one)':46 'happi':26 'instanc':20 'like':31 'll':30 'migrat':32 'near':42 'nextcloud':1,44 'one':6,39 'pretti':25 'relat':9 'run':12 've':23 'well':10 'work':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/7022809"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704245862 {#5213
      date: 2024-01-03 02:37:42.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4199}
  +body: """
    I didn’t think Nextcloud AIO would actually work with existing files on a separate drive. I know it says it will … but … I’m not interested in buying a gigantic new harddrive to clone all my data to just to run one program.\n
    \n
    Also, if it’s running in WSL or a VirtualBox VM it would be fucking hell to get it to play nice with the network.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704382917 {#5327
    date: 2024-01-04 16:41:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
    "@azron@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
    "@azron@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5331 …}
  +nested: Doctrine\ORM\PersistentCollection {#5333 …}
  +votes: Doctrine\ORM\PersistentCollection {#5335 …}
  +reports: Doctrine\ORM\PersistentCollection {#5337 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5339 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5341 …}
  -id: 279781
  -bodyTs: "'actual':8 'aio':6 'also':45 'buy':29 'clone':35 'data':38 'didn':2 'drive':16 'exist':11 'file':12 'fuck':59 'get':62 'gigant':31 'harddriv':33 'hell':60 'interest':27 'know':18 'm':25 'network':69 'new':32 'nextcloud':5 'nice':66 'one':43 'play':65 'program':44 'run':42,49 'say':20 'separ':15 'think':4 'virtualbox':54 'vm':55 'work':9 'would':7,57 'wsl':51"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6402024"
  +editedAt: DateTimeImmutable @1711606643 {#5328
    date: 2024-03-28 07:17:23.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704382917 {#5329
    date: 2024-01-04 16:41:57.0 +01:00
  }
}
"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
19 DENIED edit
App\Entity\EntryComment {#5330
  +user: App\Entity\User {#4147 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5214
    +user: Proxies\__CG__\App\Entity\User {#5215 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4199
      +user: App\Entity\User {#4147 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1712594949 {#4208
        date: 2024-04-08 18:49:09.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4197 …}
      +nested: Doctrine\ORM\PersistentCollection {#4195 …}
      +votes: Doctrine\ORM\PersistentCollection {#4193 …}
      +reports: Doctrine\ORM\PersistentCollection {#4191 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
      -id: 274915
      -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6359207"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704235785 {#4144
        date: 2024-01-02 23:49:45.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4199}
    +body: "Nextcloud AIO or all in one. It works relatively well. I run both my own container and an AIO instance and I’ve been pretty happy with it, I’ll likely migrate to it for my docker only one in the near future. [Nextcloud AIO](https://github.com/nextcloud/all-in-one)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704245862 {#5212
      date: 2024-01-03 02:37:42.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@butt_mountain_69420@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5216 …}
    +nested: Doctrine\ORM\PersistentCollection {#5218 …}
    +votes: Doctrine\ORM\PersistentCollection {#5220 …}
    +reports: Doctrine\ORM\PersistentCollection {#5222 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5224 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5226 …}
    -id: 275329
    -bodyTs: "'/nextcloud/all-in-one)':48 'aio':2,19,45 'contain':16 'docker':37 'futur':43 'github.com':47 'github.com/nextcloud/all-in-one)':46 'happi':26 'instanc':20 'like':31 'll':30 'migrat':32 'near':42 'nextcloud':1,44 'one':6,39 'pretti':25 'relat':9 'run':12 've':23 'well':10 'work':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/7022809"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704245862 {#5213
      date: 2024-01-03 02:37:42.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4199}
  +body: """
    I didn’t think Nextcloud AIO would actually work with existing files on a separate drive. I know it says it will … but … I’m not interested in buying a gigantic new harddrive to clone all my data to just to run one program.\n
    \n
    Also, if it’s running in WSL or a VirtualBox VM it would be fucking hell to get it to play nice with the network.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704382917 {#5327
    date: 2024-01-04 16:41:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
    "@azron@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
    "@azron@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5331 …}
  +nested: Doctrine\ORM\PersistentCollection {#5333 …}
  +votes: Doctrine\ORM\PersistentCollection {#5335 …}
  +reports: Doctrine\ORM\PersistentCollection {#5337 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5339 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5341 …}
  -id: 279781
  -bodyTs: "'actual':8 'aio':6 'also':45 'buy':29 'clone':35 'data':38 'didn':2 'drive':16 'exist':11 'file':12 'fuck':59 'get':62 'gigant':31 'harddriv':33 'hell':60 'interest':27 'know':18 'm':25 'network':69 'new':32 'nextcloud':5 'nice':66 'one':43 'play':65 'program':44 'run':42,49 'say':20 'separ':15 'think':4 'virtualbox':54 'vm':55 'work':9 'would':7,57 'wsl':51"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6402024"
  +editedAt: DateTimeImmutable @1711606643 {#5328
    date: 2024-03-28 07:17:23.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704382917 {#5329
    date: 2024-01-04 16:41:57.0 +01:00
  }
}
"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
20 DENIED moderate
App\Entity\EntryComment {#5330
  +user: App\Entity\User {#4147 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5214
    +user: Proxies\__CG__\App\Entity\User {#5215 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4199
      +user: App\Entity\User {#4147 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "Is there a way to self-host nextcloud by downloading one file, docker container, .nzb, .jpg, ANYTHING that includes all these parts and can just plug in and run? Is that a thing, or do all self-hosters spend every waking hour sudo updating?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1712594949 {#4208
        date: 2024-04-08 18:49:09.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4197 …}
      +nested: Doctrine\ORM\PersistentCollection {#4195 …}
      +votes: Doctrine\ORM\PersistentCollection {#4193 …}
      +reports: Doctrine\ORM\PersistentCollection {#4191 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4159 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4163 …}
      -id: 274915
      -bodyTs: "'anyth':18 'contain':15 'docker':14 'download':11 'everi':42 'file':13 'host':8 'hoster':40 'hour':44 'includ':20 'jpg':17 'nextcloud':9 'nzb':16 'one':12 'part':23 'plug':27 'run':30 'self':7,39 'self-host':6,38 'spend':41 'sudo':45 'thing':34 'updat':46 'wake':43 'way':4"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6359207"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704235785 {#4144
        date: 2024-01-02 23:49:45.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4199}
    +body: "Nextcloud AIO or all in one. It works relatively well. I run both my own container and an AIO instance and I’ve been pretty happy with it, I’ll likely migrate to it for my docker only one in the near future. [Nextcloud AIO](https://github.com/nextcloud/all-in-one)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704245862 {#5212
      date: 2024-01-03 02:37:42.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@butt_mountain_69420@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5216 …}
    +nested: Doctrine\ORM\PersistentCollection {#5218 …}
    +votes: Doctrine\ORM\PersistentCollection {#5220 …}
    +reports: Doctrine\ORM\PersistentCollection {#5222 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5224 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5226 …}
    -id: 275329
    -bodyTs: "'/nextcloud/all-in-one)':48 'aio':2,19,45 'contain':16 'docker':37 'futur':43 'github.com':47 'github.com/nextcloud/all-in-one)':46 'happi':26 'instanc':20 'like':31 'll':30 'migrat':32 'near':42 'nextcloud':1,44 'one':6,39 'pretti':25 'relat':9 'run':12 've':23 'well':10 'work':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/7022809"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704245862 {#5213
      date: 2024-01-03 02:37:42.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4199}
  +body: """
    I didn’t think Nextcloud AIO would actually work with existing files on a separate drive. I know it says it will … but … I’m not interested in buying a gigantic new harddrive to clone all my data to just to run one program.\n
    \n
    Also, if it’s running in WSL or a VirtualBox VM it would be fucking hell to get it to play nice with the network.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704382917 {#5327
    date: 2024-01-04 16:41:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
    "@azron@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@butt_mountain_69420@lemmy.world"
    "@azron@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5331 …}
  +nested: Doctrine\ORM\PersistentCollection {#5333 …}
  +votes: Doctrine\ORM\PersistentCollection {#5335 …}
  +reports: Doctrine\ORM\PersistentCollection {#5337 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5339 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5341 …}
  -id: 279781
  -bodyTs: "'actual':8 'aio':6 'also':45 'buy':29 'clone':35 'data':38 'didn':2 'drive':16 'exist':11 'file':12 'fuck':59 'get':62 'gigant':31 'harddriv':33 'hell':60 'interest':27 'know':18 'm':25 'network':69 'new':32 'nextcloud':5 'nice':66 'one':43 'play':65 'program':44 'run':42,49 'say':20 'separ':15 'think':4 'virtualbox':54 'vm':55 'work':9 'would':7,57 'wsl':51"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6402024"
  +editedAt: DateTimeImmutable @1711606643 {#5328
    date: 2024-03-28 07:17:23.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704382917 {#5329
    date: 2024-01-04 16:41:57.0 +01:00
  }
}
"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
21 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
22 DENIED moderate
App\Entity\EntryComment {#4231
  +user: App\Entity\User {#4220 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I wonder what performance impact there would be if you were to move pgsql onto bare metal with enough ram dedicated to caching all of the db data (think: i5 or i7 nuc). That’s going to be my next step with my homelab; I want to migrate everything to a single db host with a lot of RAM and M2 storage and avoid the db process replication I have going on. I have no performance complaints with NC currently, I’m running PHP cache and redis as well as image preview and imaginary."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704094651 {#4237
    date: 2024-01-01 08:37:31.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4236 …}
  +nested: Doctrine\ORM\PersistentCollection {#4235 …}
  +votes: Doctrine\ORM\PersistentCollection {#4226 …}
  +reports: Doctrine\ORM\PersistentCollection {#4229 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4224 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4222 …}
  -id: 269492
  -bodyTs: "'avoid':64 'bare':16 'cach':23,85 'complaint':77 'current':80 'data':28 'db':27,53,66 'dedic':21 'enough':19 'everyth':49 'go':36,71 'homelab':44 'host':54 'i5':30 'i7':32 'imag':91 'imaginari':94 'impact':5 'lot':57 'm':82 'm2':61 'metal':17 'migrat':48 'move':13 'nc':79 'next':40 'nuc':33 'onto':15 'perform':4,76 'pgsql':14 'php':84 'preview':92 'process':67 'ram':20,59 'redi':87 'replic':68 'run':83 'singl':52 'step':41 'storag':62 'think':29 'want':46 'well':89 'wonder':2 'would':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6329590"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704094651 {#4242
    date: 2024-01-01 08:37:31.0 +01:00
  }
}
"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
23 DENIED edit
App\Entity\EntryComment {#4231
  +user: App\Entity\User {#4220 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I wonder what performance impact there would be if you were to move pgsql onto bare metal with enough ram dedicated to caching all of the db data (think: i5 or i7 nuc). That’s going to be my next step with my homelab; I want to migrate everything to a single db host with a lot of RAM and M2 storage and avoid the db process replication I have going on. I have no performance complaints with NC currently, I’m running PHP cache and redis as well as image preview and imaginary."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704094651 {#4237
    date: 2024-01-01 08:37:31.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4236 …}
  +nested: Doctrine\ORM\PersistentCollection {#4235 …}
  +votes: Doctrine\ORM\PersistentCollection {#4226 …}
  +reports: Doctrine\ORM\PersistentCollection {#4229 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4224 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4222 …}
  -id: 269492
  -bodyTs: "'avoid':64 'bare':16 'cach':23,85 'complaint':77 'current':80 'data':28 'db':27,53,66 'dedic':21 'enough':19 'everyth':49 'go':36,71 'homelab':44 'host':54 'i5':30 'i7':32 'imag':91 'imaginari':94 'impact':5 'lot':57 'm':82 'm2':61 'metal':17 'migrat':48 'move':13 'nc':79 'next':40 'nuc':33 'onto':15 'perform':4,76 'pgsql':14 'php':84 'preview':92 'process':67 'ram':20,59 'redi':87 'replic':68 'run':83 'singl':52 'step':41 'storag':62 'think':29 'want':46 'well':89 'wonder':2 'would':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6329590"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704094651 {#4242
    date: 2024-01-01 08:37:31.0 +01:00
  }
}
"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
24 DENIED moderate
App\Entity\EntryComment {#4231
  +user: App\Entity\User {#4220 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I wonder what performance impact there would be if you were to move pgsql onto bare metal with enough ram dedicated to caching all of the db data (think: i5 or i7 nuc). That’s going to be my next step with my homelab; I want to migrate everything to a single db host with a lot of RAM and M2 storage and avoid the db process replication I have going on. I have no performance complaints with NC currently, I’m running PHP cache and redis as well as image preview and imaginary."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704094651 {#4237
    date: 2024-01-01 08:37:31.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4236 …}
  +nested: Doctrine\ORM\PersistentCollection {#4235 …}
  +votes: Doctrine\ORM\PersistentCollection {#4226 …}
  +reports: Doctrine\ORM\PersistentCollection {#4229 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4224 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4222 …}
  -id: 269492
  -bodyTs: "'avoid':64 'bare':16 'cach':23,85 'complaint':77 'current':80 'data':28 'db':27,53,66 'dedic':21 'enough':19 'everyth':49 'go':36,71 'homelab':44 'host':54 'i5':30 'i7':32 'imag':91 'imaginari':94 'impact':5 'lot':57 'm':82 'm2':61 'metal':17 'migrat':48 'move':13 'nc':79 'next':40 'nuc':33 'onto':15 'perform':4,76 'pgsql':14 'php':84 'preview':92 'process':67 'ram':20,59 'redi':87 'replic':68 'run':83 'singl':52 'step':41 'storag':62 'think':29 'want':46 'well':89 'wonder':2 'would':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6329590"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704094651 {#4242
    date: 2024-01-01 08:37:31.0 +01:00
  }
}
"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
25 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
26 DENIED moderate
App\Entity\EntryComment {#4317
  +user: App\Entity\User {#4330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    Try MySQL instead of MariaDB. They have some performance tweaks in version 10 that aren’t present in MariaDB.\n
    \n
    Also, tune your MySQL (or MariaDB) server. Make sure all tables use InnoDB. Enable the slow query log and analyze slow queries (there may be missing indices). If there’s a lot of unique queries, increase the query cache size.\n
    \n
    The easy approach is to run MySQLTuner after the MySQL or MariaDB server has been up for at least a week, and go through its suggestions.\n
    \n
    There shouldn’t be a significant difference in performance between PostgreSQL and MySQL/MariaDB if both have been optimized. Out-of-the-box config isn’t ideal for a production system.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1710691068 {#4311
    date: 2024-03-17 16:57:48.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4318 …}
  +nested: Doctrine\ORM\PersistentCollection {#4320 …}
  +votes: Doctrine\ORM\PersistentCollection {#4322 …}
  +reports: Doctrine\ORM\PersistentCollection {#4324 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4326 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4328 …}
  -id: 269411
  -bodyTs: "'10':13 'also':20 'analyz':39 'approach':62 'aren':15 'box':108 'cach':58 'config':109 'differ':92 'easi':61 'enabl':33 'go':82 'ideal':112 'increas':55 'indic':46 'innodb':32 'instead':3 'isn':110 'least':78 'log':37 'lot':51 'make':27 'mariadb':5,19,25,71 'may':43 'miss':45 'mysql':2,23,69 'mysql/mariadb':98 'mysqltun':66 'optim':103 'out-of-the-box':104 'perform':9,94 'postgresql':96 'present':17 'product':115 'queri':36,41,54,57 'run':65 'server':26,72 'shouldn':87 'signific':91 'size':59 'slow':35,40 'suggest':85 'sure':28 'system':116 'tabl':30 'tri':1 'tune':21 'tweak':10 'uniqu':53 'use':31 'version':12 'week':80"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://upvote.au/comment/592932"
  +editedAt: DateTimeImmutable @1710203408 {#4312
    date: 2024-03-12 01:30:08.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704090873 {#4313
    date: 2024-01-01 07:34:33.0 +01:00
  }
}
"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
27 DENIED edit
App\Entity\EntryComment {#4317
  +user: App\Entity\User {#4330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    Try MySQL instead of MariaDB. They have some performance tweaks in version 10 that aren’t present in MariaDB.\n
    \n
    Also, tune your MySQL (or MariaDB) server. Make sure all tables use InnoDB. Enable the slow query log and analyze slow queries (there may be missing indices). If there’s a lot of unique queries, increase the query cache size.\n
    \n
    The easy approach is to run MySQLTuner after the MySQL or MariaDB server has been up for at least a week, and go through its suggestions.\n
    \n
    There shouldn’t be a significant difference in performance between PostgreSQL and MySQL/MariaDB if both have been optimized. Out-of-the-box config isn’t ideal for a production system.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1710691068 {#4311
    date: 2024-03-17 16:57:48.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4318 …}
  +nested: Doctrine\ORM\PersistentCollection {#4320 …}
  +votes: Doctrine\ORM\PersistentCollection {#4322 …}
  +reports: Doctrine\ORM\PersistentCollection {#4324 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4326 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4328 …}
  -id: 269411
  -bodyTs: "'10':13 'also':20 'analyz':39 'approach':62 'aren':15 'box':108 'cach':58 'config':109 'differ':92 'easi':61 'enabl':33 'go':82 'ideal':112 'increas':55 'indic':46 'innodb':32 'instead':3 'isn':110 'least':78 'log':37 'lot':51 'make':27 'mariadb':5,19,25,71 'may':43 'miss':45 'mysql':2,23,69 'mysql/mariadb':98 'mysqltun':66 'optim':103 'out-of-the-box':104 'perform':9,94 'postgresql':96 'present':17 'product':115 'queri':36,41,54,57 'run':65 'server':26,72 'shouldn':87 'signific':91 'size':59 'slow':35,40 'suggest':85 'sure':28 'system':116 'tabl':30 'tri':1 'tune':21 'tweak':10 'uniqu':53 'use':31 'version':12 'week':80"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://upvote.au/comment/592932"
  +editedAt: DateTimeImmutable @1710203408 {#4312
    date: 2024-03-12 01:30:08.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704090873 {#4313
    date: 2024-01-01 07:34:33.0 +01:00
  }
}
"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
28 DENIED moderate
App\Entity\EntryComment {#4317
  +user: App\Entity\User {#4330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    Try MySQL instead of MariaDB. They have some performance tweaks in version 10 that aren’t present in MariaDB.\n
    \n
    Also, tune your MySQL (or MariaDB) server. Make sure all tables use InnoDB. Enable the slow query log and analyze slow queries (there may be missing indices). If there’s a lot of unique queries, increase the query cache size.\n
    \n
    The easy approach is to run MySQLTuner after the MySQL or MariaDB server has been up for at least a week, and go through its suggestions.\n
    \n
    There shouldn’t be a significant difference in performance between PostgreSQL and MySQL/MariaDB if both have been optimized. Out-of-the-box config isn’t ideal for a production system.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1710691068 {#4311
    date: 2024-03-17 16:57:48.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4318 …}
  +nested: Doctrine\ORM\PersistentCollection {#4320 …}
  +votes: Doctrine\ORM\PersistentCollection {#4322 …}
  +reports: Doctrine\ORM\PersistentCollection {#4324 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4326 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4328 …}
  -id: 269411
  -bodyTs: "'10':13 'also':20 'analyz':39 'approach':62 'aren':15 'box':108 'cach':58 'config':109 'differ':92 'easi':61 'enabl':33 'go':82 'ideal':112 'increas':55 'indic':46 'innodb':32 'instead':3 'isn':110 'least':78 'log':37 'lot':51 'make':27 'mariadb':5,19,25,71 'may':43 'miss':45 'mysql':2,23,69 'mysql/mariadb':98 'mysqltun':66 'optim':103 'out-of-the-box':104 'perform':9,94 'postgresql':96 'present':17 'product':115 'queri':36,41,54,57 'run':65 'server':26,72 'shouldn':87 'signific':91 'size':59 'slow':35,40 'suggest':85 'sure':28 'system':116 'tabl':30 'tri':1 'tune':21 'tweak':10 'uniqu':53 'use':31 'version':12 'week':80"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://upvote.au/comment/592932"
  +editedAt: DateTimeImmutable @1710203408 {#4312
    date: 2024-03-12 01:30:08.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704090873 {#4313
    date: 2024-01-01 07:34:33.0 +01:00
  }
}
"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
29 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
30 DENIED moderate
App\Entity\EntryComment {#5183
  +user: Proxies\__CG__\App\Entity\User {#5184 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4317
    +user: App\Entity\User {#4330 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Try MySQL instead of MariaDB. They have some performance tweaks in version 10 that aren’t present in MariaDB.\n
      \n
      Also, tune your MySQL (or MariaDB) server. Make sure all tables use InnoDB. Enable the slow query log and analyze slow queries (there may be missing indices). If there’s a lot of unique queries, increase the query cache size.\n
      \n
      The easy approach is to run MySQLTuner after the MySQL or MariaDB server has been up for at least a week, and go through its suggestions.\n
      \n
      There shouldn’t be a significant difference in performance between PostgreSQL and MySQL/MariaDB if both have been optimized. Out-of-the-box config isn’t ideal for a production system.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 5
    +score: 0
    +lastActive: DateTime @1710691068 {#4311
      date: 2024-03-17 16:57:48.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4318 …}
    +nested: Doctrine\ORM\PersistentCollection {#4320 …}
    +votes: Doctrine\ORM\PersistentCollection {#4322 …}
    +reports: Doctrine\ORM\PersistentCollection {#4324 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4326 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4328 …}
    -id: 269411
    -bodyTs: "'10':13 'also':20 'analyz':39 'approach':62 'aren':15 'box':108 'cach':58 'config':109 'differ':92 'easi':61 'enabl':33 'go':82 'ideal':112 'increas':55 'indic':46 'innodb':32 'instead':3 'isn':110 'least':78 'log':37 'lot':51 'make':27 'mariadb':5,19,25,71 'may':43 'miss':45 'mysql':2,23,69 'mysql/mariadb':98 'mysqltun':66 'optim':103 'out-of-the-box':104 'perform':9,94 'postgresql':96 'present':17 'product':115 'queri':36,41,54,57 'run':65 'server':26,72 'shouldn':87 'signific':91 'size':59 'slow':35,40 'suggest':85 'sure':28 'system':116 'tabl':30 'tri':1 'tune':21 'tweak':10 'uniqu':53 'use':31 'version':12 'week':80"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://upvote.au/comment/592932"
    +editedAt: DateTimeImmutable @1710203408 {#4312
      date: 2024-03-12 01:30:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1704090873 {#4313
      date: 2024-01-01 07:34:33.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4317}
  +body: """
    Depends on how you’re using it. You can wrong an absolutely insane amount of performance out of postgres that you cannot with MySQL.\n
    \n
    I wonder how much next cloud leaves on the table?
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704173307 {#5181
    date: 2024-01-02 06:28:27.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@dan@upvote.au"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5185 …}
  +nested: Doctrine\ORM\PersistentCollection {#5187 …}
  +votes: Doctrine\ORM\PersistentCollection {#5189 …}
  +reports: Doctrine\ORM\PersistentCollection {#5191 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5193 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5195 …}
  -id: 272356
  -bodyTs: "'absolut':12 'amount':14 'cannot':22 'cloud':30 'depend':1 'insan':13 'leav':31 'much':28 'mysql':24 'next':29 'perform':16 'postgr':19 're':5 'tabl':34 'use':6 'wonder':26 'wrong':10"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6344976"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704173307 {#5182
    date: 2024-01-02 06:28:27.0 +01:00
  }
}
"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
31 DENIED edit
App\Entity\EntryComment {#5183
  +user: Proxies\__CG__\App\Entity\User {#5184 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4317
    +user: App\Entity\User {#4330 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Try MySQL instead of MariaDB. They have some performance tweaks in version 10 that aren’t present in MariaDB.\n
      \n
      Also, tune your MySQL (or MariaDB) server. Make sure all tables use InnoDB. Enable the slow query log and analyze slow queries (there may be missing indices). If there’s a lot of unique queries, increase the query cache size.\n
      \n
      The easy approach is to run MySQLTuner after the MySQL or MariaDB server has been up for at least a week, and go through its suggestions.\n
      \n
      There shouldn’t be a significant difference in performance between PostgreSQL and MySQL/MariaDB if both have been optimized. Out-of-the-box config isn’t ideal for a production system.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 5
    +score: 0
    +lastActive: DateTime @1710691068 {#4311
      date: 2024-03-17 16:57:48.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4318 …}
    +nested: Doctrine\ORM\PersistentCollection {#4320 …}
    +votes: Doctrine\ORM\PersistentCollection {#4322 …}
    +reports: Doctrine\ORM\PersistentCollection {#4324 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4326 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4328 …}
    -id: 269411
    -bodyTs: "'10':13 'also':20 'analyz':39 'approach':62 'aren':15 'box':108 'cach':58 'config':109 'differ':92 'easi':61 'enabl':33 'go':82 'ideal':112 'increas':55 'indic':46 'innodb':32 'instead':3 'isn':110 'least':78 'log':37 'lot':51 'make':27 'mariadb':5,19,25,71 'may':43 'miss':45 'mysql':2,23,69 'mysql/mariadb':98 'mysqltun':66 'optim':103 'out-of-the-box':104 'perform':9,94 'postgresql':96 'present':17 'product':115 'queri':36,41,54,57 'run':65 'server':26,72 'shouldn':87 'signific':91 'size':59 'slow':35,40 'suggest':85 'sure':28 'system':116 'tabl':30 'tri':1 'tune':21 'tweak':10 'uniqu':53 'use':31 'version':12 'week':80"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://upvote.au/comment/592932"
    +editedAt: DateTimeImmutable @1710203408 {#4312
      date: 2024-03-12 01:30:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1704090873 {#4313
      date: 2024-01-01 07:34:33.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4317}
  +body: """
    Depends on how you’re using it. You can wrong an absolutely insane amount of performance out of postgres that you cannot with MySQL.\n
    \n
    I wonder how much next cloud leaves on the table?
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704173307 {#5181
    date: 2024-01-02 06:28:27.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@dan@upvote.au"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5185 …}
  +nested: Doctrine\ORM\PersistentCollection {#5187 …}
  +votes: Doctrine\ORM\PersistentCollection {#5189 …}
  +reports: Doctrine\ORM\PersistentCollection {#5191 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5193 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5195 …}
  -id: 272356
  -bodyTs: "'absolut':12 'amount':14 'cannot':22 'cloud':30 'depend':1 'insan':13 'leav':31 'much':28 'mysql':24 'next':29 'perform':16 'postgr':19 're':5 'tabl':34 'use':6 'wonder':26 'wrong':10"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6344976"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704173307 {#5182
    date: 2024-01-02 06:28:27.0 +01:00
  }
}
"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
32 DENIED moderate
App\Entity\EntryComment {#5183
  +user: Proxies\__CG__\App\Entity\User {#5184 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4317
    +user: App\Entity\User {#4330 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Try MySQL instead of MariaDB. They have some performance tweaks in version 10 that aren’t present in MariaDB.\n
      \n
      Also, tune your MySQL (or MariaDB) server. Make sure all tables use InnoDB. Enable the slow query log and analyze slow queries (there may be missing indices). If there’s a lot of unique queries, increase the query cache size.\n
      \n
      The easy approach is to run MySQLTuner after the MySQL or MariaDB server has been up for at least a week, and go through its suggestions.\n
      \n
      There shouldn’t be a significant difference in performance between PostgreSQL and MySQL/MariaDB if both have been optimized. Out-of-the-box config isn’t ideal for a production system.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 5
    +score: 0
    +lastActive: DateTime @1710691068 {#4311
      date: 2024-03-17 16:57:48.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4318 …}
    +nested: Doctrine\ORM\PersistentCollection {#4320 …}
    +votes: Doctrine\ORM\PersistentCollection {#4322 …}
    +reports: Doctrine\ORM\PersistentCollection {#4324 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4326 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4328 …}
    -id: 269411
    -bodyTs: "'10':13 'also':20 'analyz':39 'approach':62 'aren':15 'box':108 'cach':58 'config':109 'differ':92 'easi':61 'enabl':33 'go':82 'ideal':112 'increas':55 'indic':46 'innodb':32 'instead':3 'isn':110 'least':78 'log':37 'lot':51 'make':27 'mariadb':5,19,25,71 'may':43 'miss':45 'mysql':2,23,69 'mysql/mariadb':98 'mysqltun':66 'optim':103 'out-of-the-box':104 'perform':9,94 'postgresql':96 'present':17 'product':115 'queri':36,41,54,57 'run':65 'server':26,72 'shouldn':87 'signific':91 'size':59 'slow':35,40 'suggest':85 'sure':28 'system':116 'tabl':30 'tri':1 'tune':21 'tweak':10 'uniqu':53 'use':31 'version':12 'week':80"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://upvote.au/comment/592932"
    +editedAt: DateTimeImmutable @1710203408 {#4312
      date: 2024-03-12 01:30:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1704090873 {#4313
      date: 2024-01-01 07:34:33.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4317}
  +body: """
    Depends on how you’re using it. You can wrong an absolutely insane amount of performance out of postgres that you cannot with MySQL.\n
    \n
    I wonder how much next cloud leaves on the table?
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704173307 {#5181
    date: 2024-01-02 06:28:27.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@dan@upvote.au"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5185 …}
  +nested: Doctrine\ORM\PersistentCollection {#5187 …}
  +votes: Doctrine\ORM\PersistentCollection {#5189 …}
  +reports: Doctrine\ORM\PersistentCollection {#5191 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5193 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5195 …}
  -id: 272356
  -bodyTs: "'absolut':12 'amount':14 'cannot':22 'cloud':30 'depend':1 'insan':13 'leav':31 'much':28 'mysql':24 'next':29 'perform':16 'postgr':19 're':5 'tabl':34 'use':6 'wonder':26 'wrong':10"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6344976"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704173307 {#5182
    date: 2024-01-02 06:28:27.0 +01:00
  }
}
"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
33 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
34 DENIED moderate
App\Entity\EntryComment {#4391
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I’ve been a proponent here for a few months on using postgres/redis every time someone shits on NC for performance. While I agree the database change itself isn’t a huge improvement, it pays for itself long term in larger volume installs when you and your organization/group get using it heavily. The redis connected on socket like the AIO mastercontainer sets up is where the real juice comes from, but only on an install that gets used so it caches properly. The first time you fire it up, it’s pretty slow but as it gets used, things are much better."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1704070743 {#4386
    date: 2024-01-01 01:59:03.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4392 …}
  +nested: Doctrine\ORM\PersistentCollection {#4394 …}
  +votes: Doctrine\ORM\PersistentCollection {#4396 …}
  +reports: Doctrine\ORM\PersistentCollection {#4398 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4400 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4402 …}
  -id: 268827
  -bodyTs: "'agre':24 'aio':60 'better':102 'cach':81 'chang':27 'come':69 'connect':55 'databas':26 'everi':14 'fire':87 'first':84 'get':49,77,97 'heavili':52 'huge':32 'improv':33 'instal':43,75 'isn':29 'juic':68 'larger':41 'like':58 'long':38 'mastercontain':61 'month':10 'much':101 'nc':19 'organization/group':48 'pay':35 'perform':21 'postgres/redis':13 'pretti':92 'proper':82 'propon':5 'real':67 'redi':54 'set':62 'shit':17 'slow':93 'socket':57 'someon':16 'term':39 'thing':99 'time':15,85 'use':12,50,78,98 've':2 'volum':42"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6326566"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704070743 {#4387
    date: 2024-01-01 01:59:03.0 +01:00
  }
}
"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
35 DENIED edit
App\Entity\EntryComment {#4391
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I’ve been a proponent here for a few months on using postgres/redis every time someone shits on NC for performance. While I agree the database change itself isn’t a huge improvement, it pays for itself long term in larger volume installs when you and your organization/group get using it heavily. The redis connected on socket like the AIO mastercontainer sets up is where the real juice comes from, but only on an install that gets used so it caches properly. The first time you fire it up, it’s pretty slow but as it gets used, things are much better."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1704070743 {#4386
    date: 2024-01-01 01:59:03.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4392 …}
  +nested: Doctrine\ORM\PersistentCollection {#4394 …}
  +votes: Doctrine\ORM\PersistentCollection {#4396 …}
  +reports: Doctrine\ORM\PersistentCollection {#4398 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4400 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4402 …}
  -id: 268827
  -bodyTs: "'agre':24 'aio':60 'better':102 'cach':81 'chang':27 'come':69 'connect':55 'databas':26 'everi':14 'fire':87 'first':84 'get':49,77,97 'heavili':52 'huge':32 'improv':33 'instal':43,75 'isn':29 'juic':68 'larger':41 'like':58 'long':38 'mastercontain':61 'month':10 'much':101 'nc':19 'organization/group':48 'pay':35 'perform':21 'postgres/redis':13 'pretti':92 'proper':82 'propon':5 'real':67 'redi':54 'set':62 'shit':17 'slow':93 'socket':57 'someon':16 'term':39 'thing':99 'time':15,85 'use':12,50,78,98 've':2 'volum':42"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6326566"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704070743 {#4387
    date: 2024-01-01 01:59:03.0 +01:00
  }
}
"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
36 DENIED moderate
App\Entity\EntryComment {#4391
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I’ve been a proponent here for a few months on using postgres/redis every time someone shits on NC for performance. While I agree the database change itself isn’t a huge improvement, it pays for itself long term in larger volume installs when you and your organization/group get using it heavily. The redis connected on socket like the AIO mastercontainer sets up is where the real juice comes from, but only on an install that gets used so it caches properly. The first time you fire it up, it’s pretty slow but as it gets used, things are much better."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1704070743 {#4386
    date: 2024-01-01 01:59:03.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4392 …}
  +nested: Doctrine\ORM\PersistentCollection {#4394 …}
  +votes: Doctrine\ORM\PersistentCollection {#4396 …}
  +reports: Doctrine\ORM\PersistentCollection {#4398 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4400 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4402 …}
  -id: 268827
  -bodyTs: "'agre':24 'aio':60 'better':102 'cach':81 'chang':27 'come':69 'connect':55 'databas':26 'everi':14 'fire':87 'first':84 'get':49,77,97 'heavili':52 'huge':32 'improv':33 'instal':43,75 'isn':29 'juic':68 'larger':41 'like':58 'long':38 'mastercontain':61 'month':10 'much':101 'nc':19 'organization/group':48 'pay':35 'perform':21 'postgres/redis':13 'pretti':92 'proper':82 'propon':5 'real':67 'redi':54 'set':62 'shit':17 'slow':93 'socket':57 'someon':16 'term':39 'thing':99 'time':15,85 'use':12,50,78,98 've':2 'volum':42"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6326566"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704070743 {#4387
    date: 2024-01-01 01:59:03.0 +01:00
  }
}
"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
37 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
38 DENIED moderate
App\Entity\EntryComment {#4465
  +user: App\Entity\User {#4478 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Does Postgres really help that much? It runs fine for me with MariaDB"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1710123468 {#4460
    date: 2024-03-11 03:17:48.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4466 …}
  +nested: Doctrine\ORM\PersistentCollection {#4468 …}
  +votes: Doctrine\ORM\PersistentCollection {#4470 …}
  +reports: Doctrine\ORM\PersistentCollection {#4472 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4474 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4476 …}
  -id: 268749
  -bodyTs: "'fine':9 'help':4 'mariadb':13 'much':6 'postgr':2 'realli':3 'run':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.zip/comment/5881267"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704068996 {#4461
    date: 2024-01-01 01:29:56.0 +01:00
  }
}
"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
39 DENIED edit
App\Entity\EntryComment {#4465
  +user: App\Entity\User {#4478 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Does Postgres really help that much? It runs fine for me with MariaDB"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1710123468 {#4460
    date: 2024-03-11 03:17:48.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4466 …}
  +nested: Doctrine\ORM\PersistentCollection {#4468 …}
  +votes: Doctrine\ORM\PersistentCollection {#4470 …}
  +reports: Doctrine\ORM\PersistentCollection {#4472 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4474 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4476 …}
  -id: 268749
  -bodyTs: "'fine':9 'help':4 'mariadb':13 'much':6 'postgr':2 'realli':3 'run':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.zip/comment/5881267"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704068996 {#4461
    date: 2024-01-01 01:29:56.0 +01:00
  }
}
"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
40 DENIED moderate
App\Entity\EntryComment {#4465
  +user: App\Entity\User {#4478 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Does Postgres really help that much? It runs fine for me with MariaDB"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1710123468 {#4460
    date: 2024-03-11 03:17:48.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4466 …}
  +nested: Doctrine\ORM\PersistentCollection {#4468 …}
  +votes: Doctrine\ORM\PersistentCollection {#4470 …}
  +reports: Doctrine\ORM\PersistentCollection {#4472 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4474 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4476 …}
  -id: 268749
  -bodyTs: "'fine':9 'help':4 'mariadb':13 'much':6 'postgr':2 'realli':3 'run':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.zip/comment/5881267"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704068996 {#4461
    date: 2024-01-01 01:29:56.0 +01:00
  }
}
"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
41 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
42 DENIED moderate
App\Entity\EntryComment {#5168
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4465
    +user: App\Entity\User {#4478 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Does Postgres really help that much? It runs fine for me with MariaDB"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1710123468 {#4460
      date: 2024-03-11 03:17:48.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4466 …}
    +nested: Doctrine\ORM\PersistentCollection {#4468 …}
    +votes: Doctrine\ORM\PersistentCollection {#4470 …}
    +reports: Doctrine\ORM\PersistentCollection {#4472 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4474 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4476 …}
    -id: 268749
    -bodyTs: "'fine':9 'help':4 'mariadb':13 'much':6 'postgr':2 'realli':3 'run':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.zip/comment/5881267"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704068996 {#4461
      date: 2024-01-01 01:29:56.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4465}
  +body: "Very anecdotally, I saw a little speed improvement but not all that much. DB size increased a bit. I’ll be sticking with it for the time being because why not."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1704074012 {#5166
    date: 2024-01-01 02:53:32.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@possiblylinux127@lemmy.zip"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5169 …}
  +nested: Doctrine\ORM\PersistentCollection {#5171 …}
  +votes: Doctrine\ORM\PersistentCollection {#5173 …}
  +reports: Doctrine\ORM\PersistentCollection {#5175 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5177 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5179 …}
  -id: 268940
  -bodyTs: "'anecdot':2 'bit':18 'db':14 'improv':8 'increas':16 'littl':6 'll':20 'much':13 'saw':4 'size':15 'speed':7 'stick':22 'time':27"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6040247"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704074012 {#5167
    date: 2024-01-01 02:53:32.0 +01:00
  }
}
"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
43 DENIED edit
App\Entity\EntryComment {#5168
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4465
    +user: App\Entity\User {#4478 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Does Postgres really help that much? It runs fine for me with MariaDB"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1710123468 {#4460
      date: 2024-03-11 03:17:48.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4466 …}
    +nested: Doctrine\ORM\PersistentCollection {#4468 …}
    +votes: Doctrine\ORM\PersistentCollection {#4470 …}
    +reports: Doctrine\ORM\PersistentCollection {#4472 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4474 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4476 …}
    -id: 268749
    -bodyTs: "'fine':9 'help':4 'mariadb':13 'much':6 'postgr':2 'realli':3 'run':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.zip/comment/5881267"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704068996 {#4461
      date: 2024-01-01 01:29:56.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4465}
  +body: "Very anecdotally, I saw a little speed improvement but not all that much. DB size increased a bit. I’ll be sticking with it for the time being because why not."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1704074012 {#5166
    date: 2024-01-01 02:53:32.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@possiblylinux127@lemmy.zip"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5169 …}
  +nested: Doctrine\ORM\PersistentCollection {#5171 …}
  +votes: Doctrine\ORM\PersistentCollection {#5173 …}
  +reports: Doctrine\ORM\PersistentCollection {#5175 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5177 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5179 …}
  -id: 268940
  -bodyTs: "'anecdot':2 'bit':18 'db':14 'improv':8 'increas':16 'littl':6 'll':20 'much':13 'saw':4 'size':15 'speed':7 'stick':22 'time':27"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6040247"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704074012 {#5167
    date: 2024-01-01 02:53:32.0 +01:00
  }
}
"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
44 DENIED moderate
App\Entity\EntryComment {#5168
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4465
    +user: App\Entity\User {#4478 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Does Postgres really help that much? It runs fine for me with MariaDB"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1710123468 {#4460
      date: 2024-03-11 03:17:48.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4466 …}
    +nested: Doctrine\ORM\PersistentCollection {#4468 …}
    +votes: Doctrine\ORM\PersistentCollection {#4470 …}
    +reports: Doctrine\ORM\PersistentCollection {#4472 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4474 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4476 …}
    -id: 268749
    -bodyTs: "'fine':9 'help':4 'mariadb':13 'much':6 'postgr':2 'realli':3 'run':8"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.zip/comment/5881267"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704068996 {#4461
      date: 2024-01-01 01:29:56.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4465}
  +body: "Very anecdotally, I saw a little speed improvement but not all that much. DB size increased a bit. I’ll be sticking with it for the time being because why not."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1704074012 {#5166
    date: 2024-01-01 02:53:32.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@possiblylinux127@lemmy.zip"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5169 …}
  +nested: Doctrine\ORM\PersistentCollection {#5171 …}
  +votes: Doctrine\ORM\PersistentCollection {#5173 …}
  +reports: Doctrine\ORM\PersistentCollection {#5175 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5177 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5179 …}
  -id: 268940
  -bodyTs: "'anecdot':2 'bit':18 'db':14 'improv':8 'increas':16 'littl':6 'll':20 'much':13 'saw':4 'size':15 'speed':7 'stick':22 'time':27"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6040247"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704074012 {#5167
    date: 2024-01-01 02:53:32.0 +01:00
  }
}
"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
45 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
46 DENIED moderate
App\Entity\EntryComment {#4538
  +user: App\Entity\User {#4551 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Thanks. I didn’t realize syslog would help. Just configured it to send to my grafana/loki server. Not sure if it’s really helping, but seems like maybe it’s a bit faster. I’ve long since done everything listed here and more, but in the last couple months my nextcloud has seemed a bit sluggish for some reason."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704066694 {#4533
    date: 2024-01-01 00:51:34.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4539 …}
  +nested: Doctrine\ORM\PersistentCollection {#4541 …}
  +votes: Doctrine\ORM\PersistentCollection {#4543 …}
  +reports: Doctrine\ORM\PersistentCollection {#4545 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4547 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4549 …}
  -id: 268668
  -bodyTs: "'bit':32,55 'configur':10 'coupl':48 'didn':3 'done':38 'everyth':39 'faster':33 'grafana/loki':16 'help':8,24 'last':47 'like':27 'list':40 'long':36 'mayb':28 'month':49 'nextcloud':51 'realiz':5 'realli':23 'reason':59 'seem':26,53 'send':13 'server':17 'sinc':37 'sluggish':56 'sure':19 'syslog':6 'thank':1 've':35 'would':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.moorenet.casa/comment/78603"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704066694 {#4534
    date: 2024-01-01 00:51:34.0 +01:00
  }
}
"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
47 DENIED edit
App\Entity\EntryComment {#4538
  +user: App\Entity\User {#4551 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Thanks. I didn’t realize syslog would help. Just configured it to send to my grafana/loki server. Not sure if it’s really helping, but seems like maybe it’s a bit faster. I’ve long since done everything listed here and more, but in the last couple months my nextcloud has seemed a bit sluggish for some reason."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704066694 {#4533
    date: 2024-01-01 00:51:34.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4539 …}
  +nested: Doctrine\ORM\PersistentCollection {#4541 …}
  +votes: Doctrine\ORM\PersistentCollection {#4543 …}
  +reports: Doctrine\ORM\PersistentCollection {#4545 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4547 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4549 …}
  -id: 268668
  -bodyTs: "'bit':32,55 'configur':10 'coupl':48 'didn':3 'done':38 'everyth':39 'faster':33 'grafana/loki':16 'help':8,24 'last':47 'like':27 'list':40 'long':36 'mayb':28 'month':49 'nextcloud':51 'realiz':5 'realli':23 'reason':59 'seem':26,53 'send':13 'server':17 'sinc':37 'sluggish':56 'sure':19 'syslog':6 'thank':1 've':35 'would':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.moorenet.casa/comment/78603"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704066694 {#4534
    date: 2024-01-01 00:51:34.0 +01:00
  }
}
"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
48 DENIED moderate
App\Entity\EntryComment {#4538
  +user: App\Entity\User {#4551 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Thanks. I didn’t realize syslog would help. Just configured it to send to my grafana/loki server. Not sure if it’s really helping, but seems like maybe it’s a bit faster. I’ve long since done everything listed here and more, but in the last couple months my nextcloud has seemed a bit sluggish for some reason."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704066694 {#4533
    date: 2024-01-01 00:51:34.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4539 …}
  +nested: Doctrine\ORM\PersistentCollection {#4541 …}
  +votes: Doctrine\ORM\PersistentCollection {#4543 …}
  +reports: Doctrine\ORM\PersistentCollection {#4545 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4547 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4549 …}
  -id: 268668
  -bodyTs: "'bit':32,55 'configur':10 'coupl':48 'didn':3 'done':38 'everyth':39 'faster':33 'grafana/loki':16 'help':8,24 'last':47 'like':27 'list':40 'long':36 'mayb':28 'month':49 'nextcloud':51 'realiz':5 'realli':23 'reason':59 'seem':26,53 'send':13 'server':17 'sinc':37 'sluggish':56 'sure':19 'syslog':6 'thank':1 've':35 'would':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.moorenet.casa/comment/78603"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704066694 {#4534
    date: 2024-01-01 00:51:34.0 +01:00
  }
}
"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
49 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
50 DENIED moderate
App\Entity\EntryComment {#4611
  +user: App\Entity\User {#4624 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1710953113 {#4606
    date: 2024-03-20 17:45:13.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4612 …}
  +nested: Doctrine\ORM\PersistentCollection {#4614 …}
  +votes: Doctrine\ORM\PersistentCollection {#4616 …}
  +reports: Doctrine\ORM\PersistentCollection {#4618 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
  -id: 268311
  -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6966550"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704056139 {#4607
    date: 2023-12-31 21:55:39.0 +01:00
  }
}
"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
51 DENIED edit
App\Entity\EntryComment {#4611
  +user: App\Entity\User {#4624 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1710953113 {#4606
    date: 2024-03-20 17:45:13.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4612 …}
  +nested: Doctrine\ORM\PersistentCollection {#4614 …}
  +votes: Doctrine\ORM\PersistentCollection {#4616 …}
  +reports: Doctrine\ORM\PersistentCollection {#4618 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
  -id: 268311
  -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6966550"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704056139 {#4607
    date: 2023-12-31 21:55:39.0 +01:00
  }
}
"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
52 DENIED moderate
App\Entity\EntryComment {#4611
  +user: App\Entity\User {#4624 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1710953113 {#4606
    date: 2024-03-20 17:45:13.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4612 …}
  +nested: Doctrine\ORM\PersistentCollection {#4614 …}
  +votes: Doctrine\ORM\PersistentCollection {#4616 …}
  +reports: Doctrine\ORM\PersistentCollection {#4618 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
  -id: 268311
  -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6966550"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704056139 {#4607
    date: 2023-12-31 21:55:39.0 +01:00
  }
}
"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
53 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
54 DENIED moderate
App\Entity\EntryComment {#5152
  +user: Proxies\__CG__\App\Entity\User {#5153 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4611
    +user: App\Entity\User {#4624 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1710953113 {#4606
      date: 2024-03-20 17:45:13.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4612 …}
    +nested: Doctrine\ORM\PersistentCollection {#4614 …}
    +votes: Doctrine\ORM\PersistentCollection {#4616 …}
    +reports: Doctrine\ORM\PersistentCollection {#4618 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
    -id: 268311
    -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6966550"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704056139 {#4607
      date: 2023-12-31 21:55:39.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4611}
  +body: "I only recently started using nix and NixOS. How’s the update process for nextcloud? Can you use the self updater?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704060318 {#5150
    date: 2023-12-31 23:05:18.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Gooey0210@sh.itjust.works"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5154 …}
  +nested: Doctrine\ORM\PersistentCollection {#5156 …}
  +votes: Doctrine\ORM\PersistentCollection {#5158 …}
  +reports: Doctrine\ORM\PersistentCollection {#5160 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5162 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5164 …}
  -id: 268455
  -bodyTs: "'nextcloud':15 'nix':6 'nixo':8 'process':13 'recent':3 'self':20 'start':4 'updat':12,21 'use':5,18"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://eviltoast.org/comment/4333307"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704060318 {#5151
    date: 2023-12-31 23:05:18.0 +01:00
  }
}
"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
55 DENIED edit
App\Entity\EntryComment {#5152
  +user: Proxies\__CG__\App\Entity\User {#5153 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4611
    +user: App\Entity\User {#4624 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1710953113 {#4606
      date: 2024-03-20 17:45:13.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4612 …}
    +nested: Doctrine\ORM\PersistentCollection {#4614 …}
    +votes: Doctrine\ORM\PersistentCollection {#4616 …}
    +reports: Doctrine\ORM\PersistentCollection {#4618 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
    -id: 268311
    -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6966550"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704056139 {#4607
      date: 2023-12-31 21:55:39.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4611}
  +body: "I only recently started using nix and NixOS. How’s the update process for nextcloud? Can you use the self updater?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704060318 {#5150
    date: 2023-12-31 23:05:18.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Gooey0210@sh.itjust.works"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5154 …}
  +nested: Doctrine\ORM\PersistentCollection {#5156 …}
  +votes: Doctrine\ORM\PersistentCollection {#5158 …}
  +reports: Doctrine\ORM\PersistentCollection {#5160 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5162 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5164 …}
  -id: 268455
  -bodyTs: "'nextcloud':15 'nix':6 'nixo':8 'process':13 'recent':3 'self':20 'start':4 'updat':12,21 'use':5,18"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://eviltoast.org/comment/4333307"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704060318 {#5151
    date: 2023-12-31 23:05:18.0 +01:00
  }
}
"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
56 DENIED moderate
App\Entity\EntryComment {#5152
  +user: Proxies\__CG__\App\Entity\User {#5153 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4611
    +user: App\Entity\User {#4624 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1710953113 {#4606
      date: 2024-03-20 17:45:13.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4612 …}
    +nested: Doctrine\ORM\PersistentCollection {#4614 …}
    +votes: Doctrine\ORM\PersistentCollection {#4616 …}
    +reports: Doctrine\ORM\PersistentCollection {#4618 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
    -id: 268311
    -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6966550"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704056139 {#4607
      date: 2023-12-31 21:55:39.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4611}
  +body: "I only recently started using nix and NixOS. How’s the update process for nextcloud? Can you use the self updater?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704060318 {#5150
    date: 2023-12-31 23:05:18.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Gooey0210@sh.itjust.works"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5154 …}
  +nested: Doctrine\ORM\PersistentCollection {#5156 …}
  +votes: Doctrine\ORM\PersistentCollection {#5158 …}
  +reports: Doctrine\ORM\PersistentCollection {#5160 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5162 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5164 …}
  -id: 268455
  -bodyTs: "'nextcloud':15 'nix':6 'nixo':8 'process':13 'recent':3 'self':20 'start':4 'updat':12,21 'use':5,18"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://eviltoast.org/comment/4333307"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704060318 {#5151
    date: 2023-12-31 23:05:18.0 +01:00
  }
}
"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
57 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
58 DENIED moderate
App\Entity\EntryComment {#5284
  +user: App\Entity\User {#4624 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5152
    +user: Proxies\__CG__\App\Entity\User {#5153 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4611
      +user: App\Entity\User {#4624 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710953113 {#4606
        date: 2024-03-20 17:45:13.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4612 …}
      +nested: Doctrine\ORM\PersistentCollection {#4614 …}
      +votes: Doctrine\ORM\PersistentCollection {#4616 …}
      +reports: Doctrine\ORM\PersistentCollection {#4618 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
      -id: 268311
      -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://sh.itjust.works/comment/6966550"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704056139 {#4607
        date: 2023-12-31 21:55:39.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4611}
    +body: "I only recently started using nix and NixOS. How’s the update process for nextcloud? Can you use the self updater?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704060318 {#5150
      date: 2023-12-31 23:05:18.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@Gooey0210@sh.itjust.works"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5154 …}
    +nested: Doctrine\ORM\PersistentCollection {#5156 …}
    +votes: Doctrine\ORM\PersistentCollection {#5158 …}
    +reports: Doctrine\ORM\PersistentCollection {#5160 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5162 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5164 …}
    -id: 268455
    -bodyTs: "'nextcloud':15 'nix':6 'nixo':8 'process':13 'recent':3 'self':20 'start':4 'updat':12,21 'use':5,18"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://eviltoast.org/comment/4333307"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704060318 {#5151
      date: 2023-12-31 23:05:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4611}
  +body: """
    In nixos you almost never use any “self” thing\n
    \n
    You update everything with your whole system at once\n
    \n
    Even the installed apps, the true nixos way to install them is through the configuration file
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704100583 {#5282
    date: 2024-01-01 10:16:23.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Gooey0210@sh.itjust.works"
    "@johntash@eviltoast.org"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5285 …}
  +nested: Doctrine\ORM\PersistentCollection {#5287 …}
  +votes: Doctrine\ORM\PersistentCollection {#5289 …}
  +reports: Doctrine\ORM\PersistentCollection {#5291 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5293 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5295 …}
  -id: 269586
  -bodyTs: "'almost':4 'app':22 'configur':33 'even':19 'everyth':12 'file':34 'instal':21,28 'never':5 'nixo':2,25 'self':8 'system':16 'thing':9 'true':24 'updat':11 'use':6 'way':26 'whole':15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6975391"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704100583 {#5283
    date: 2024-01-01 10:16:23.0 +01:00
  }
}
"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
59 DENIED edit
App\Entity\EntryComment {#5284
  +user: App\Entity\User {#4624 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5152
    +user: Proxies\__CG__\App\Entity\User {#5153 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4611
      +user: App\Entity\User {#4624 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710953113 {#4606
        date: 2024-03-20 17:45:13.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4612 …}
      +nested: Doctrine\ORM\PersistentCollection {#4614 …}
      +votes: Doctrine\ORM\PersistentCollection {#4616 …}
      +reports: Doctrine\ORM\PersistentCollection {#4618 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
      -id: 268311
      -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://sh.itjust.works/comment/6966550"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704056139 {#4607
        date: 2023-12-31 21:55:39.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4611}
    +body: "I only recently started using nix and NixOS. How’s the update process for nextcloud? Can you use the self updater?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704060318 {#5150
      date: 2023-12-31 23:05:18.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@Gooey0210@sh.itjust.works"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5154 …}
    +nested: Doctrine\ORM\PersistentCollection {#5156 …}
    +votes: Doctrine\ORM\PersistentCollection {#5158 …}
    +reports: Doctrine\ORM\PersistentCollection {#5160 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5162 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5164 …}
    -id: 268455
    -bodyTs: "'nextcloud':15 'nix':6 'nixo':8 'process':13 'recent':3 'self':20 'start':4 'updat':12,21 'use':5,18"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://eviltoast.org/comment/4333307"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704060318 {#5151
      date: 2023-12-31 23:05:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4611}
  +body: """
    In nixos you almost never use any “self” thing\n
    \n
    You update everything with your whole system at once\n
    \n
    Even the installed apps, the true nixos way to install them is through the configuration file
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704100583 {#5282
    date: 2024-01-01 10:16:23.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Gooey0210@sh.itjust.works"
    "@johntash@eviltoast.org"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5285 …}
  +nested: Doctrine\ORM\PersistentCollection {#5287 …}
  +votes: Doctrine\ORM\PersistentCollection {#5289 …}
  +reports: Doctrine\ORM\PersistentCollection {#5291 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5293 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5295 …}
  -id: 269586
  -bodyTs: "'almost':4 'app':22 'configur':33 'even':19 'everyth':12 'file':34 'instal':21,28 'never':5 'nixo':2,25 'self':8 'system':16 'thing':9 'true':24 'updat':11 'use':6 'way':26 'whole':15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6975391"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704100583 {#5283
    date: 2024-01-01 10:16:23.0 +01:00
  }
}
"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
60 DENIED moderate
App\Entity\EntryComment {#5284
  +user: App\Entity\User {#4624 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5152
    +user: Proxies\__CG__\App\Entity\User {#5153 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4611
      +user: App\Entity\User {#4624 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710953113 {#4606
        date: 2024-03-20 17:45:13.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4612 …}
      +nested: Doctrine\ORM\PersistentCollection {#4614 …}
      +votes: Doctrine\ORM\PersistentCollection {#4616 …}
      +reports: Doctrine\ORM\PersistentCollection {#4618 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
      -id: 268311
      -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://sh.itjust.works/comment/6966550"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704056139 {#4607
        date: 2023-12-31 21:55:39.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4611}
    +body: "I only recently started using nix and NixOS. How’s the update process for nextcloud? Can you use the self updater?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704060318 {#5150
      date: 2023-12-31 23:05:18.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@Gooey0210@sh.itjust.works"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5154 …}
    +nested: Doctrine\ORM\PersistentCollection {#5156 …}
    +votes: Doctrine\ORM\PersistentCollection {#5158 …}
    +reports: Doctrine\ORM\PersistentCollection {#5160 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5162 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5164 …}
    -id: 268455
    -bodyTs: "'nextcloud':15 'nix':6 'nixo':8 'process':13 'recent':3 'self':20 'start':4 'updat':12,21 'use':5,18"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://eviltoast.org/comment/4333307"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704060318 {#5151
      date: 2023-12-31 23:05:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4611}
  +body: """
    In nixos you almost never use any “self” thing\n
    \n
    You update everything with your whole system at once\n
    \n
    Even the installed apps, the true nixos way to install them is through the configuration file
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704100583 {#5282
    date: 2024-01-01 10:16:23.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Gooey0210@sh.itjust.works"
    "@johntash@eviltoast.org"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5285 …}
  +nested: Doctrine\ORM\PersistentCollection {#5287 …}
  +votes: Doctrine\ORM\PersistentCollection {#5289 …}
  +reports: Doctrine\ORM\PersistentCollection {#5291 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5293 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5295 …}
  -id: 269586
  -bodyTs: "'almost':4 'app':22 'configur':33 'even':19 'everyth':12 'file':34 'instal':21,28 'never':5 'nixo':2,25 'self':8 'system':16 'thing':9 'true':24 'updat':11 'use':6 'way':26 'whole':15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6975391"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704100583 {#5283
    date: 2024-01-01 10:16:23.0 +01:00
  }
}
"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
61 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
62 DENIED moderate
App\Entity\EntryComment {#5384
  +user: Proxies\__CG__\App\Entity\User {#5153 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5284
    +user: App\Entity\User {#4624 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5152
      +user: Proxies\__CG__\App\Entity\User {#5153 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4611
        +user: App\Entity\User {#4624 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 1
        +score: 0
        +lastActive: DateTime @1710953113 {#4606
          date: 2024-03-20 17:45:13.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4612 …}
        +nested: Doctrine\ORM\PersistentCollection {#4614 …}
        +votes: Doctrine\ORM\PersistentCollection {#4616 …}
        +reports: Doctrine\ORM\PersistentCollection {#4618 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
        -id: 268311
        -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://sh.itjust.works/comment/6966550"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704056139 {#4607
          date: 2023-12-31 21:55:39.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4611}
      +body: "I only recently started using nix and NixOS. How’s the update process for nextcloud? Can you use the self updater?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704060318 {#5150
        date: 2023-12-31 23:05:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@Gooey0210@sh.itjust.works"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5154 …}
      +nested: Doctrine\ORM\PersistentCollection {#5156 …}
      +votes: Doctrine\ORM\PersistentCollection {#5158 …}
      +reports: Doctrine\ORM\PersistentCollection {#5160 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5162 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5164 …}
      -id: 268455
      -bodyTs: "'nextcloud':15 'nix':6 'nixo':8 'process':13 'recent':3 'self':20 'start':4 'updat':12,21 'use':5,18"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://eviltoast.org/comment/4333307"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704060318 {#5151
        date: 2023-12-31 23:05:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4611}
    +body: """
      In nixos you almost never use any “self” thing\n
      \n
      You update everything with your whole system at once\n
      \n
      Even the installed apps, the true nixos way to install them is through the configuration file
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1704100583 {#5282
      date: 2024-01-01 10:16:23.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@Gooey0210@sh.itjust.works"
      "@johntash@eviltoast.org"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5285 …}
    +nested: Doctrine\ORM\PersistentCollection {#5287 …}
    +votes: Doctrine\ORM\PersistentCollection {#5289 …}
    +reports: Doctrine\ORM\PersistentCollection {#5291 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5293 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5295 …}
    -id: 269586
    -bodyTs: "'almost':4 'app':22 'configur':33 'even':19 'everyth':12 'file':34 'instal':21,28 'never':5 'nixo':2,25 'self':8 'system':16 'thing':9 'true':24 'updat':11 'use':6 'way':26 'whole':15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6975391"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704100583 {#5283
      date: 2024-01-01 10:16:23.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4611}
  +body: "That makes sense, it does sound better to keep it within nixos! I’ve mostly been using nixos to bootstrap servers that run nomad+docker, so beyond the system-level config, I haven’t done a lot with additional software yet."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704219078 {#5382
    date: 2024-01-02 19:11:18.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Gooey0210@sh.itjust.works"
    "@johntash@eviltoast.org"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5385 …}
  +nested: Doctrine\ORM\PersistentCollection {#5387 …}
  +votes: Doctrine\ORM\PersistentCollection {#5389 …}
  +reports: Doctrine\ORM\PersistentCollection {#5391 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5393 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5395 …}
  -id: 274102
  -bodyTs: "'addit':40 'better':7 'beyond':27 'bootstrap':20 'config':32 'docker':25 'done':36 'haven':34 'keep':9 'level':31 'lot':38 'make':2 'most':15 'nixo':12,18 'nomad':24 'run':23 'sens':3 'server':21 'softwar':41 'sound':6 'system':30 'system-level':29 'use':17 've':14 'within':11 'yet':42"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://eviltoast.org/comment/4363145"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704219078 {#5383
    date: 2024-01-02 19:11:18.0 +01:00
  }
}
"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
63 DENIED edit
App\Entity\EntryComment {#5384
  +user: Proxies\__CG__\App\Entity\User {#5153 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5284
    +user: App\Entity\User {#4624 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5152
      +user: Proxies\__CG__\App\Entity\User {#5153 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4611
        +user: App\Entity\User {#4624 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 1
        +score: 0
        +lastActive: DateTime @1710953113 {#4606
          date: 2024-03-20 17:45:13.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4612 …}
        +nested: Doctrine\ORM\PersistentCollection {#4614 …}
        +votes: Doctrine\ORM\PersistentCollection {#4616 …}
        +reports: Doctrine\ORM\PersistentCollection {#4618 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
        -id: 268311
        -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://sh.itjust.works/comment/6966550"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704056139 {#4607
          date: 2023-12-31 21:55:39.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4611}
      +body: "I only recently started using nix and NixOS. How’s the update process for nextcloud? Can you use the self updater?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704060318 {#5150
        date: 2023-12-31 23:05:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@Gooey0210@sh.itjust.works"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5154 …}
      +nested: Doctrine\ORM\PersistentCollection {#5156 …}
      +votes: Doctrine\ORM\PersistentCollection {#5158 …}
      +reports: Doctrine\ORM\PersistentCollection {#5160 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5162 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5164 …}
      -id: 268455
      -bodyTs: "'nextcloud':15 'nix':6 'nixo':8 'process':13 'recent':3 'self':20 'start':4 'updat':12,21 'use':5,18"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://eviltoast.org/comment/4333307"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704060318 {#5151
        date: 2023-12-31 23:05:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4611}
    +body: """
      In nixos you almost never use any “self” thing\n
      \n
      You update everything with your whole system at once\n
      \n
      Even the installed apps, the true nixos way to install them is through the configuration file
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1704100583 {#5282
      date: 2024-01-01 10:16:23.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@Gooey0210@sh.itjust.works"
      "@johntash@eviltoast.org"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5285 …}
    +nested: Doctrine\ORM\PersistentCollection {#5287 …}
    +votes: Doctrine\ORM\PersistentCollection {#5289 …}
    +reports: Doctrine\ORM\PersistentCollection {#5291 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5293 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5295 …}
    -id: 269586
    -bodyTs: "'almost':4 'app':22 'configur':33 'even':19 'everyth':12 'file':34 'instal':21,28 'never':5 'nixo':2,25 'self':8 'system':16 'thing':9 'true':24 'updat':11 'use':6 'way':26 'whole':15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6975391"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704100583 {#5283
      date: 2024-01-01 10:16:23.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4611}
  +body: "That makes sense, it does sound better to keep it within nixos! I’ve mostly been using nixos to bootstrap servers that run nomad+docker, so beyond the system-level config, I haven’t done a lot with additional software yet."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704219078 {#5382
    date: 2024-01-02 19:11:18.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Gooey0210@sh.itjust.works"
    "@johntash@eviltoast.org"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5385 …}
  +nested: Doctrine\ORM\PersistentCollection {#5387 …}
  +votes: Doctrine\ORM\PersistentCollection {#5389 …}
  +reports: Doctrine\ORM\PersistentCollection {#5391 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5393 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5395 …}
  -id: 274102
  -bodyTs: "'addit':40 'better':7 'beyond':27 'bootstrap':20 'config':32 'docker':25 'done':36 'haven':34 'keep':9 'level':31 'lot':38 'make':2 'most':15 'nixo':12,18 'nomad':24 'run':23 'sens':3 'server':21 'softwar':41 'sound':6 'system':30 'system-level':29 'use':17 've':14 'within':11 'yet':42"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://eviltoast.org/comment/4363145"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704219078 {#5383
    date: 2024-01-02 19:11:18.0 +01:00
  }
}
"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
64 DENIED moderate
App\Entity\EntryComment {#5384
  +user: Proxies\__CG__\App\Entity\User {#5153 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5284
    +user: App\Entity\User {#4624 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5152
      +user: Proxies\__CG__\App\Entity\User {#5153 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4611
        +user: App\Entity\User {#4624 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "Since i started using nixos i don’t have any problems with nextcloud 🙃"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 1
        +score: 0
        +lastActive: DateTime @1710953113 {#4606
          date: 2024-03-20 17:45:13.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4612 …}
        +nested: Doctrine\ORM\PersistentCollection {#4614 …}
        +votes: Doctrine\ORM\PersistentCollection {#4616 …}
        +reports: Doctrine\ORM\PersistentCollection {#4618 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4620 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4622 …}
        -id: 268311
        -bodyTs: "'nextcloud':13 'nixo':5 'problem':11 'sinc':1 'start':3 'use':4"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://sh.itjust.works/comment/6966550"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704056139 {#4607
          date: 2023-12-31 21:55:39.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4611}
      +body: "I only recently started using nix and NixOS. How’s the update process for nextcloud? Can you use the self updater?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704060318 {#5150
        date: 2023-12-31 23:05:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@Gooey0210@sh.itjust.works"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5154 …}
      +nested: Doctrine\ORM\PersistentCollection {#5156 …}
      +votes: Doctrine\ORM\PersistentCollection {#5158 …}
      +reports: Doctrine\ORM\PersistentCollection {#5160 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5162 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5164 …}
      -id: 268455
      -bodyTs: "'nextcloud':15 'nix':6 'nixo':8 'process':13 'recent':3 'self':20 'start':4 'updat':12,21 'use':5,18"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://eviltoast.org/comment/4333307"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704060318 {#5151
        date: 2023-12-31 23:05:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4611}
    +body: """
      In nixos you almost never use any “self” thing\n
      \n
      You update everything with your whole system at once\n
      \n
      Even the installed apps, the true nixos way to install them is through the configuration file
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1704100583 {#5282
      date: 2024-01-01 10:16:23.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@Gooey0210@sh.itjust.works"
      "@johntash@eviltoast.org"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5285 …}
    +nested: Doctrine\ORM\PersistentCollection {#5287 …}
    +votes: Doctrine\ORM\PersistentCollection {#5289 …}
    +reports: Doctrine\ORM\PersistentCollection {#5291 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5293 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5295 …}
    -id: 269586
    -bodyTs: "'almost':4 'app':22 'configur':33 'even':19 'everyth':12 'file':34 'instal':21,28 'never':5 'nixo':2,25 'self':8 'system':16 'thing':9 'true':24 'updat':11 'use':6 'way':26 'whole':15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6975391"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704100583 {#5283
      date: 2024-01-01 10:16:23.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4611}
  +body: "That makes sense, it does sound better to keep it within nixos! I’ve mostly been using nixos to bootstrap servers that run nomad+docker, so beyond the system-level config, I haven’t done a lot with additional software yet."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704219078 {#5382
    date: 2024-01-02 19:11:18.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Gooey0210@sh.itjust.works"
    "@johntash@eviltoast.org"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5385 …}
  +nested: Doctrine\ORM\PersistentCollection {#5387 …}
  +votes: Doctrine\ORM\PersistentCollection {#5389 …}
  +reports: Doctrine\ORM\PersistentCollection {#5391 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5393 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5395 …}
  -id: 274102
  -bodyTs: "'addit':40 'better':7 'beyond':27 'bootstrap':20 'config':32 'docker':25 'done':36 'haven':34 'keep':9 'level':31 'lot':38 'make':2 'most':15 'nixo':12,18 'nomad':24 'run':23 'sens':3 'server':21 'softwar':41 'sound':6 'system':30 'system-level':29 'use':17 've':14 'within':11 'yet':42"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://eviltoast.org/comment/4363145"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704219078 {#5383
    date: 2024-01-02 19:11:18.0 +01:00
  }
}
"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
65 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
66 DENIED moderate
App\Entity\EntryComment {#4684
  +user: App\Entity\User {#4697 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1710883420 {#4679
    date: 2024-03-19 22:23:40.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4685 …}
  +nested: Doctrine\ORM\PersistentCollection {#4687 …}
  +votes: Doctrine\ORM\PersistentCollection {#4689 …}
  +reports: Doctrine\ORM\PersistentCollection {#4691 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
  -id: 267555
  -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.dbzer0.com/comment/6313166"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704038401 {#4680
    date: 2023-12-31 17:00:01.0 +01:00
  }
}
"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
67 DENIED edit
App\Entity\EntryComment {#4684
  +user: App\Entity\User {#4697 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1710883420 {#4679
    date: 2024-03-19 22:23:40.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4685 …}
  +nested: Doctrine\ORM\PersistentCollection {#4687 …}
  +votes: Doctrine\ORM\PersistentCollection {#4689 …}
  +reports: Doctrine\ORM\PersistentCollection {#4691 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
  -id: 267555
  -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.dbzer0.com/comment/6313166"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704038401 {#4680
    date: 2023-12-31 17:00:01.0 +01:00
  }
}
"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
68 DENIED moderate
App\Entity\EntryComment {#4684
  +user: App\Entity\User {#4697 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1710883420 {#4679
    date: 2024-03-19 22:23:40.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4685 …}
  +nested: Doctrine\ORM\PersistentCollection {#4687 …}
  +votes: Doctrine\ORM\PersistentCollection {#4689 …}
  +reports: Doctrine\ORM\PersistentCollection {#4691 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
  -id: 267555
  -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.dbzer0.com/comment/6313166"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704038401 {#4680
    date: 2023-12-31 17:00:01.0 +01:00
  }
}
"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
69 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
70 DENIED moderate
App\Entity\EntryComment {#5121
  +user: Proxies\__CG__\App\Entity\User {#5122 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4684
    +user: App\Entity\User {#4697 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1710883420 {#4679
      date: 2024-03-19 22:23:40.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4685 …}
    +nested: Doctrine\ORM\PersistentCollection {#4687 …}
    +votes: Doctrine\ORM\PersistentCollection {#4689 …}
    +reports: Doctrine\ORM\PersistentCollection {#4691 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
    -id: 267555
    -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/6313166"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704038401 {#4680
      date: 2023-12-31 17:00:01.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: "My advice: use the nextcloud snap package. It’s seamless."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704051091 {#5119
    date: 2023-12-31 20:31:31.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5123 …}
  +nested: Doctrine\ORM\PersistentCollection {#5125 …}
  +votes: Doctrine\ORM\PersistentCollection {#5127 …}
  +reports: Doctrine\ORM\PersistentCollection {#5129 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
  -id: 268057
  -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6322555"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704051091 {#5120
    date: 2023-12-31 20:31:31.0 +01:00
  }
}
"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
71 DENIED edit
App\Entity\EntryComment {#5121
  +user: Proxies\__CG__\App\Entity\User {#5122 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4684
    +user: App\Entity\User {#4697 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1710883420 {#4679
      date: 2024-03-19 22:23:40.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4685 …}
    +nested: Doctrine\ORM\PersistentCollection {#4687 …}
    +votes: Doctrine\ORM\PersistentCollection {#4689 …}
    +reports: Doctrine\ORM\PersistentCollection {#4691 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
    -id: 267555
    -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/6313166"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704038401 {#4680
      date: 2023-12-31 17:00:01.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: "My advice: use the nextcloud snap package. It’s seamless."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704051091 {#5119
    date: 2023-12-31 20:31:31.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5123 …}
  +nested: Doctrine\ORM\PersistentCollection {#5125 …}
  +votes: Doctrine\ORM\PersistentCollection {#5127 …}
  +reports: Doctrine\ORM\PersistentCollection {#5129 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
  -id: 268057
  -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6322555"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704051091 {#5120
    date: 2023-12-31 20:31:31.0 +01:00
  }
}
"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
72 DENIED moderate
App\Entity\EntryComment {#5121
  +user: Proxies\__CG__\App\Entity\User {#5122 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4684
    +user: App\Entity\User {#4697 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1710883420 {#4679
      date: 2024-03-19 22:23:40.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4685 …}
    +nested: Doctrine\ORM\PersistentCollection {#4687 …}
    +votes: Doctrine\ORM\PersistentCollection {#4689 …}
    +reports: Doctrine\ORM\PersistentCollection {#4691 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
    -id: 267555
    -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/6313166"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704038401 {#4680
      date: 2023-12-31 17:00:01.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: "My advice: use the nextcloud snap package. It’s seamless."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704051091 {#5119
    date: 2023-12-31 20:31:31.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5123 …}
  +nested: Doctrine\ORM\PersistentCollection {#5125 …}
  +votes: Doctrine\ORM\PersistentCollection {#5127 …}
  +reports: Doctrine\ORM\PersistentCollection {#5129 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
  -id: 268057
  -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6322555"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704051091 {#5120
    date: 2023-12-31 20:31:31.0 +01:00
  }
}
"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
73 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
74 DENIED moderate
App\Entity\EntryComment {#5253
  +user: App\Entity\User {#4697 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5121
    +user: Proxies\__CG__\App\Entity\User {#5122 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4684
      +user: App\Entity\User {#4697 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710883420 {#4679
        date: 2024-03-19 22:23:40.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4685 …}
      +nested: Doctrine\ORM\PersistentCollection {#4687 …}
      +votes: Doctrine\ORM\PersistentCollection {#4689 …}
      +reports: Doctrine\ORM\PersistentCollection {#4691 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
      -id: 267555
      -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/6313166"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704038401 {#4680
        date: 2023-12-31 17:00:01.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: "My advice: use the nextcloud snap package. It’s seamless."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704051091 {#5119
      date: 2023-12-31 20:31:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5123 …}
    +nested: Doctrine\ORM\PersistentCollection {#5125 …}
    +votes: Doctrine\ORM\PersistentCollection {#5127 …}
    +reports: Doctrine\ORM\PersistentCollection {#5129 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
    -id: 268057
    -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6322555"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704051091 {#5120
      date: 2023-12-31 20:31:31.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: "that is… surprising. not that i don’t believe you, snap just doesn’t have a good track record, lol. ill have to research if it’s feasible to run a snap package on a debian server, though."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704171183 {#5251
    date: 2024-01-02 05:53:03.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@cybersandwich@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5254 …}
  +nested: Doctrine\ORM\PersistentCollection {#5256 …}
  +votes: Doctrine\ORM\PersistentCollection {#5258 …}
  +reports: Doctrine\ORM\PersistentCollection {#5260 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5262 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5264 …}
  -id: 272292
  -bodyTs: "'believ':9 'debian':36 'doesn':13 'feasibl':28 'good':17 'ill':21 'lol':20 'packag':33 'record':19 'research':24 'run':30 'server':37 'snap':11,32 'surpris':3 'though':38 'track':18"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.dbzer0.com/comment/6344090"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704171183 {#5252
    date: 2024-01-02 05:53:03.0 +01:00
  }
}
"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
75 DENIED edit
App\Entity\EntryComment {#5253
  +user: App\Entity\User {#4697 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5121
    +user: Proxies\__CG__\App\Entity\User {#5122 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4684
      +user: App\Entity\User {#4697 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710883420 {#4679
        date: 2024-03-19 22:23:40.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4685 …}
      +nested: Doctrine\ORM\PersistentCollection {#4687 …}
      +votes: Doctrine\ORM\PersistentCollection {#4689 …}
      +reports: Doctrine\ORM\PersistentCollection {#4691 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
      -id: 267555
      -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/6313166"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704038401 {#4680
        date: 2023-12-31 17:00:01.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: "My advice: use the nextcloud snap package. It’s seamless."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704051091 {#5119
      date: 2023-12-31 20:31:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5123 …}
    +nested: Doctrine\ORM\PersistentCollection {#5125 …}
    +votes: Doctrine\ORM\PersistentCollection {#5127 …}
    +reports: Doctrine\ORM\PersistentCollection {#5129 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
    -id: 268057
    -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6322555"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704051091 {#5120
      date: 2023-12-31 20:31:31.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: "that is… surprising. not that i don’t believe you, snap just doesn’t have a good track record, lol. ill have to research if it’s feasible to run a snap package on a debian server, though."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704171183 {#5251
    date: 2024-01-02 05:53:03.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@cybersandwich@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5254 …}
  +nested: Doctrine\ORM\PersistentCollection {#5256 …}
  +votes: Doctrine\ORM\PersistentCollection {#5258 …}
  +reports: Doctrine\ORM\PersistentCollection {#5260 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5262 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5264 …}
  -id: 272292
  -bodyTs: "'believ':9 'debian':36 'doesn':13 'feasibl':28 'good':17 'ill':21 'lol':20 'packag':33 'record':19 'research':24 'run':30 'server':37 'snap':11,32 'surpris':3 'though':38 'track':18"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.dbzer0.com/comment/6344090"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704171183 {#5252
    date: 2024-01-02 05:53:03.0 +01:00
  }
}
"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
76 DENIED moderate
App\Entity\EntryComment {#5253
  +user: App\Entity\User {#4697 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5121
    +user: Proxies\__CG__\App\Entity\User {#5122 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4684
      +user: App\Entity\User {#4697 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710883420 {#4679
        date: 2024-03-19 22:23:40.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4685 …}
      +nested: Doctrine\ORM\PersistentCollection {#4687 …}
      +votes: Doctrine\ORM\PersistentCollection {#4689 …}
      +reports: Doctrine\ORM\PersistentCollection {#4691 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
      -id: 267555
      -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/6313166"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704038401 {#4680
        date: 2023-12-31 17:00:01.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: "My advice: use the nextcloud snap package. It’s seamless."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704051091 {#5119
      date: 2023-12-31 20:31:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5123 …}
    +nested: Doctrine\ORM\PersistentCollection {#5125 …}
    +votes: Doctrine\ORM\PersistentCollection {#5127 …}
    +reports: Doctrine\ORM\PersistentCollection {#5129 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
    -id: 268057
    -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6322555"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704051091 {#5120
      date: 2023-12-31 20:31:31.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: "that is… surprising. not that i don’t believe you, snap just doesn’t have a good track record, lol. ill have to research if it’s feasible to run a snap package on a debian server, though."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704171183 {#5251
    date: 2024-01-02 05:53:03.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@cybersandwich@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5254 …}
  +nested: Doctrine\ORM\PersistentCollection {#5256 …}
  +votes: Doctrine\ORM\PersistentCollection {#5258 …}
  +reports: Doctrine\ORM\PersistentCollection {#5260 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5262 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5264 …}
  -id: 272292
  -bodyTs: "'believ':9 'debian':36 'doesn':13 'feasibl':28 'good':17 'ill':21 'lol':20 'packag':33 'record':19 'research':24 'run':30 'server':37 'snap':11,32 'surpris':3 'though':38 'track':18"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.dbzer0.com/comment/6344090"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704171183 {#5252
    date: 2024-01-02 05:53:03.0 +01:00
  }
}
"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
77 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
78 DENIED moderate
App\Entity\EntryComment {#5268
  +user: Proxies\__CG__\App\Entity\User {#5269 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5121
    +user: Proxies\__CG__\App\Entity\User {#5122 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4684
      +user: App\Entity\User {#4697 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710883420 {#4679
        date: 2024-03-19 22:23:40.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4685 …}
      +nested: Doctrine\ORM\PersistentCollection {#4687 …}
      +votes: Doctrine\ORM\PersistentCollection {#4689 …}
      +reports: Doctrine\ORM\PersistentCollection {#4691 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
      -id: 267555
      -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/6313166"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704038401 {#4680
        date: 2023-12-31 17:00:01.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: "My advice: use the nextcloud snap package. It’s seamless."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704051091 {#5119
      date: 2023-12-31 20:31:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5123 …}
    +nested: Doctrine\ORM\PersistentCollection {#5125 …}
    +votes: Doctrine\ORM\PersistentCollection {#5127 …}
    +reports: Doctrine\ORM\PersistentCollection {#5129 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
    -id: 268057
    -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6322555"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704051091 {#5120
      date: 2023-12-31 20:31:31.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    It is, in fact, the only Snap I’ve ever used which worked without issues\n
    \n
    That being said, it’s kinda slow in some cases, but perfectly useable nonetheless
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704051700 {#5266
    date: 2023-12-31 20:41:40.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@cybersandwich@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5270 …}
  +nested: Doctrine\ORM\PersistentCollection {#5272 …}
  +votes: Doctrine\ORM\PersistentCollection {#5274 …}
  +reports: Doctrine\ORM\PersistentCollection {#5276 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5278 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5280 …}
  -id: 273496
  -bodyTs: "'case':25 'ever':10 'fact':4 'issu':15 'kinda':21 'nonetheless':29 'perfect':27 'said':18 'slow':22 'snap':7 'use':11 'useabl':28 've':9 'without':14 'work':13"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemm.ee/comment/7752726"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704051700 {#5267
    date: 2023-12-31 20:41:40.0 +01:00
  }
}
"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
79 DENIED edit
App\Entity\EntryComment {#5268
  +user: Proxies\__CG__\App\Entity\User {#5269 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5121
    +user: Proxies\__CG__\App\Entity\User {#5122 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4684
      +user: App\Entity\User {#4697 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710883420 {#4679
        date: 2024-03-19 22:23:40.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4685 …}
      +nested: Doctrine\ORM\PersistentCollection {#4687 …}
      +votes: Doctrine\ORM\PersistentCollection {#4689 …}
      +reports: Doctrine\ORM\PersistentCollection {#4691 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
      -id: 267555
      -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/6313166"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704038401 {#4680
        date: 2023-12-31 17:00:01.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: "My advice: use the nextcloud snap package. It’s seamless."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704051091 {#5119
      date: 2023-12-31 20:31:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5123 …}
    +nested: Doctrine\ORM\PersistentCollection {#5125 …}
    +votes: Doctrine\ORM\PersistentCollection {#5127 …}
    +reports: Doctrine\ORM\PersistentCollection {#5129 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
    -id: 268057
    -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6322555"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704051091 {#5120
      date: 2023-12-31 20:31:31.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    It is, in fact, the only Snap I’ve ever used which worked without issues\n
    \n
    That being said, it’s kinda slow in some cases, but perfectly useable nonetheless
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704051700 {#5266
    date: 2023-12-31 20:41:40.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@cybersandwich@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5270 …}
  +nested: Doctrine\ORM\PersistentCollection {#5272 …}
  +votes: Doctrine\ORM\PersistentCollection {#5274 …}
  +reports: Doctrine\ORM\PersistentCollection {#5276 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5278 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5280 …}
  -id: 273496
  -bodyTs: "'case':25 'ever':10 'fact':4 'issu':15 'kinda':21 'nonetheless':29 'perfect':27 'said':18 'slow':22 'snap':7 'use':11 'useabl':28 've':9 'without':14 'work':13"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemm.ee/comment/7752726"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704051700 {#5267
    date: 2023-12-31 20:41:40.0 +01:00
  }
}
"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
80 DENIED moderate
App\Entity\EntryComment {#5268
  +user: Proxies\__CG__\App\Entity\User {#5269 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5121
    +user: Proxies\__CG__\App\Entity\User {#5122 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4684
      +user: App\Entity\User {#4697 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710883420 {#4679
        date: 2024-03-19 22:23:40.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4685 …}
      +nested: Doctrine\ORM\PersistentCollection {#4687 …}
      +votes: Doctrine\ORM\PersistentCollection {#4689 …}
      +reports: Doctrine\ORM\PersistentCollection {#4691 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
      -id: 267555
      -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/6313166"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704038401 {#4680
        date: 2023-12-31 17:00:01.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: "My advice: use the nextcloud snap package. It’s seamless."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704051091 {#5119
      date: 2023-12-31 20:31:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5123 …}
    +nested: Doctrine\ORM\PersistentCollection {#5125 …}
    +votes: Doctrine\ORM\PersistentCollection {#5127 …}
    +reports: Doctrine\ORM\PersistentCollection {#5129 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
    -id: 268057
    -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6322555"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704051091 {#5120
      date: 2023-12-31 20:31:31.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    It is, in fact, the only Snap I’ve ever used which worked without issues\n
    \n
    That being said, it’s kinda slow in some cases, but perfectly useable nonetheless
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704051700 {#5266
    date: 2023-12-31 20:41:40.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@cybersandwich@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5270 …}
  +nested: Doctrine\ORM\PersistentCollection {#5272 …}
  +votes: Doctrine\ORM\PersistentCollection {#5274 …}
  +reports: Doctrine\ORM\PersistentCollection {#5276 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5278 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5280 …}
  -id: 273496
  -bodyTs: "'case':25 'ever':10 'fact':4 'issu':15 'kinda':21 'nonetheless':29 'perfect':27 'said':18 'slow':22 'snap':7 'use':11 'useabl':28 've':9 'without':14 'work':13"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemm.ee/comment/7752726"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704051700 {#5267
    date: 2023-12-31 20:41:40.0 +01:00
  }
}
"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
81 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
82 DENIED moderate
App\Entity\EntryComment {#5415
  +user: Proxies\__CG__\App\Entity\User {#5122 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5268
    +user: Proxies\__CG__\App\Entity\User {#5269 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5121
      +user: Proxies\__CG__\App\Entity\User {#5122 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4684
        +user: App\Entity\User {#4697 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 1
        +score: 0
        +lastActive: DateTime @1710883420 {#4679
          date: 2024-03-19 22:23:40.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4685 …}
        +nested: Doctrine\ORM\PersistentCollection {#4687 …}
        +votes: Doctrine\ORM\PersistentCollection {#4689 …}
        +reports: Doctrine\ORM\PersistentCollection {#4691 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
        -id: 267555
        -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.dbzer0.com/comment/6313166"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704038401 {#4680
          date: 2023-12-31 17:00:01.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4684}
      +body: "My advice: use the nextcloud snap package. It’s seamless."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704051091 {#5119
        date: 2023-12-31 20:31:31.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@virtueisdead@lemmy.dbzer0.com"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5123 …}
      +nested: Doctrine\ORM\PersistentCollection {#5125 …}
      +votes: Doctrine\ORM\PersistentCollection {#5127 …}
      +reports: Doctrine\ORM\PersistentCollection {#5129 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
      -id: 268057
      -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6322555"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704051091 {#5120
        date: 2023-12-31 20:31:31.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: """
      It is, in fact, the only Snap I’ve ever used which worked without issues\n
      \n
      That being said, it’s kinda slow in some cases, but perfectly useable nonetheless
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1704051700 {#5266
      date: 2023-12-31 20:41:40.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
      "@cybersandwich@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5270 …}
    +nested: Doctrine\ORM\PersistentCollection {#5272 …}
    +votes: Doctrine\ORM\PersistentCollection {#5274 …}
    +reports: Doctrine\ORM\PersistentCollection {#5276 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5278 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5280 …}
    -id: 273496
    -bodyTs: "'case':25 'ever':10 'fact':4 'issu':15 'kinda':21 'nonetheless':29 'perfect':27 'said':18 'slow':22 'snap':7 'use':11 'useabl':28 've':9 'without':14 'work':13"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemm.ee/comment/7752726"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704051700 {#5267
      date: 2023-12-31 20:41:40.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    I know snap isn’t popular among Linux nerds, but I was really having issues with the AIO docker setup and at the time I didn’t have the time to troubleshoot/fight it. I needed to give my family a file drop link to share photos for a memorial service.\n
    \n
    I figured, the snap package was recommended on their site, maybe it won’t be horrible. To my surprise it was incredibly easy, has been rock solid, never had performance issues, and it’s always up-to-date.\n
    \n
    Snap may suck for some use-cases but this one seems to be right in it’s wheel house.\n
    \n
    It also has an export/backup capability built in.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704208437 {#5413
    date: 2024-01-02 16:13:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@cybersandwich@lemmy.world"
    "@4am@lemm.ee"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5416 …}
  +nested: Doctrine\ORM\PersistentCollection {#5418 …}
  +votes: Doctrine\ORM\PersistentCollection {#5420 …}
  +reports: Doctrine\ORM\PersistentCollection {#5422 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5424 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5426 …}
  -id: 273587
  -bodyTs: "'aio':18 'also':111 'alway':85 'among':7 'built':116 'capabl':115 'case':97 'date':89 'didn':26 'docker':19 'drop':42 'easi':73 'export/backup':114 'famili':39 'figur':52 'file':41 'give':37 'horribl':66 'hous':109 'incred':72 'isn':4 'issu':15,81 'know':2 'link':43 'linux':8 'may':91 'mayb':61 'memori':49 'need':35 'nerd':9 'never':78 'one':100 'packag':55 'perform':80 'photo':46 'popular':6 'realli':13 'recommend':57 'right':104 'rock':76 'seem':101 'servic':50 'setup':20 'share':45 'site':60 'snap':3,54,90 'solid':77 'suck':92 'surpris':69 'time':24,30 'troubleshoot/fight':32 'up-to-d':86 'use':96 'use-cas':95 'wheel':108 'won':63"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6351839"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704208437 {#5414
    date: 2024-01-02 16:13:57.0 +01:00
  }
}
"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
83 DENIED edit
App\Entity\EntryComment {#5415
  +user: Proxies\__CG__\App\Entity\User {#5122 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5268
    +user: Proxies\__CG__\App\Entity\User {#5269 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5121
      +user: Proxies\__CG__\App\Entity\User {#5122 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4684
        +user: App\Entity\User {#4697 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 1
        +score: 0
        +lastActive: DateTime @1710883420 {#4679
          date: 2024-03-19 22:23:40.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4685 …}
        +nested: Doctrine\ORM\PersistentCollection {#4687 …}
        +votes: Doctrine\ORM\PersistentCollection {#4689 …}
        +reports: Doctrine\ORM\PersistentCollection {#4691 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
        -id: 267555
        -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.dbzer0.com/comment/6313166"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704038401 {#4680
          date: 2023-12-31 17:00:01.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4684}
      +body: "My advice: use the nextcloud snap package. It’s seamless."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704051091 {#5119
        date: 2023-12-31 20:31:31.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@virtueisdead@lemmy.dbzer0.com"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5123 …}
      +nested: Doctrine\ORM\PersistentCollection {#5125 …}
      +votes: Doctrine\ORM\PersistentCollection {#5127 …}
      +reports: Doctrine\ORM\PersistentCollection {#5129 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
      -id: 268057
      -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6322555"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704051091 {#5120
        date: 2023-12-31 20:31:31.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: """
      It is, in fact, the only Snap I’ve ever used which worked without issues\n
      \n
      That being said, it’s kinda slow in some cases, but perfectly useable nonetheless
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1704051700 {#5266
      date: 2023-12-31 20:41:40.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
      "@cybersandwich@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5270 …}
    +nested: Doctrine\ORM\PersistentCollection {#5272 …}
    +votes: Doctrine\ORM\PersistentCollection {#5274 …}
    +reports: Doctrine\ORM\PersistentCollection {#5276 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5278 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5280 …}
    -id: 273496
    -bodyTs: "'case':25 'ever':10 'fact':4 'issu':15 'kinda':21 'nonetheless':29 'perfect':27 'said':18 'slow':22 'snap':7 'use':11 'useabl':28 've':9 'without':14 'work':13"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemm.ee/comment/7752726"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704051700 {#5267
      date: 2023-12-31 20:41:40.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    I know snap isn’t popular among Linux nerds, but I was really having issues with the AIO docker setup and at the time I didn’t have the time to troubleshoot/fight it. I needed to give my family a file drop link to share photos for a memorial service.\n
    \n
    I figured, the snap package was recommended on their site, maybe it won’t be horrible. To my surprise it was incredibly easy, has been rock solid, never had performance issues, and it’s always up-to-date.\n
    \n
    Snap may suck for some use-cases but this one seems to be right in it’s wheel house.\n
    \n
    It also has an export/backup capability built in.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704208437 {#5413
    date: 2024-01-02 16:13:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@cybersandwich@lemmy.world"
    "@4am@lemm.ee"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5416 …}
  +nested: Doctrine\ORM\PersistentCollection {#5418 …}
  +votes: Doctrine\ORM\PersistentCollection {#5420 …}
  +reports: Doctrine\ORM\PersistentCollection {#5422 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5424 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5426 …}
  -id: 273587
  -bodyTs: "'aio':18 'also':111 'alway':85 'among':7 'built':116 'capabl':115 'case':97 'date':89 'didn':26 'docker':19 'drop':42 'easi':73 'export/backup':114 'famili':39 'figur':52 'file':41 'give':37 'horribl':66 'hous':109 'incred':72 'isn':4 'issu':15,81 'know':2 'link':43 'linux':8 'may':91 'mayb':61 'memori':49 'need':35 'nerd':9 'never':78 'one':100 'packag':55 'perform':80 'photo':46 'popular':6 'realli':13 'recommend':57 'right':104 'rock':76 'seem':101 'servic':50 'setup':20 'share':45 'site':60 'snap':3,54,90 'solid':77 'suck':92 'surpris':69 'time':24,30 'troubleshoot/fight':32 'up-to-d':86 'use':96 'use-cas':95 'wheel':108 'won':63"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6351839"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704208437 {#5414
    date: 2024-01-02 16:13:57.0 +01:00
  }
}
"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
84 DENIED moderate
App\Entity\EntryComment {#5415
  +user: Proxies\__CG__\App\Entity\User {#5122 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5268
    +user: Proxies\__CG__\App\Entity\User {#5269 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5121
      +user: Proxies\__CG__\App\Entity\User {#5122 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4684
        +user: App\Entity\User {#4697 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 1
        +score: 0
        +lastActive: DateTime @1710883420 {#4679
          date: 2024-03-19 22:23:40.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4685 …}
        +nested: Doctrine\ORM\PersistentCollection {#4687 …}
        +votes: Doctrine\ORM\PersistentCollection {#4689 …}
        +reports: Doctrine\ORM\PersistentCollection {#4691 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
        -id: 267555
        -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.dbzer0.com/comment/6313166"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704038401 {#4680
          date: 2023-12-31 17:00:01.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4684}
      +body: "My advice: use the nextcloud snap package. It’s seamless."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704051091 {#5119
        date: 2023-12-31 20:31:31.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@virtueisdead@lemmy.dbzer0.com"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5123 …}
      +nested: Doctrine\ORM\PersistentCollection {#5125 …}
      +votes: Doctrine\ORM\PersistentCollection {#5127 …}
      +reports: Doctrine\ORM\PersistentCollection {#5129 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
      -id: 268057
      -bodyTs: "'advic':2 'nextcloud':5 'packag':7 'seamless':10 'snap':6 'use':3"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6322555"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704051091 {#5120
        date: 2023-12-31 20:31:31.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: """
      It is, in fact, the only Snap I’ve ever used which worked without issues\n
      \n
      That being said, it’s kinda slow in some cases, but perfectly useable nonetheless
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1704051700 {#5266
      date: 2023-12-31 20:41:40.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
      "@cybersandwich@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5270 …}
    +nested: Doctrine\ORM\PersistentCollection {#5272 …}
    +votes: Doctrine\ORM\PersistentCollection {#5274 …}
    +reports: Doctrine\ORM\PersistentCollection {#5276 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5278 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5280 …}
    -id: 273496
    -bodyTs: "'case':25 'ever':10 'fact':4 'issu':15 'kinda':21 'nonetheless':29 'perfect':27 'said':18 'slow':22 'snap':7 'use':11 'useabl':28 've':9 'without':14 'work':13"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemm.ee/comment/7752726"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704051700 {#5267
      date: 2023-12-31 20:41:40.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    I know snap isn’t popular among Linux nerds, but I was really having issues with the AIO docker setup and at the time I didn’t have the time to troubleshoot/fight it. I needed to give my family a file drop link to share photos for a memorial service.\n
    \n
    I figured, the snap package was recommended on their site, maybe it won’t be horrible. To my surprise it was incredibly easy, has been rock solid, never had performance issues, and it’s always up-to-date.\n
    \n
    Snap may suck for some use-cases but this one seems to be right in it’s wheel house.\n
    \n
    It also has an export/backup capability built in.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704208437 {#5413
    date: 2024-01-02 16:13:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@cybersandwich@lemmy.world"
    "@4am@lemm.ee"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5416 …}
  +nested: Doctrine\ORM\PersistentCollection {#5418 …}
  +votes: Doctrine\ORM\PersistentCollection {#5420 …}
  +reports: Doctrine\ORM\PersistentCollection {#5422 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5424 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5426 …}
  -id: 273587
  -bodyTs: "'aio':18 'also':111 'alway':85 'among':7 'built':116 'capabl':115 'case':97 'date':89 'didn':26 'docker':19 'drop':42 'easi':73 'export/backup':114 'famili':39 'figur':52 'file':41 'give':37 'horribl':66 'hous':109 'incred':72 'isn':4 'issu':15,81 'know':2 'link':43 'linux':8 'may':91 'mayb':61 'memori':49 'need':35 'nerd':9 'never':78 'one':100 'packag':55 'perform':80 'photo':46 'popular':6 'realli':13 'recommend':57 'right':104 'rock':76 'seem':101 'servic':50 'setup':20 'share':45 'site':60 'snap':3,54,90 'solid':77 'suck':92 'surpris':69 'time':24,30 'troubleshoot/fight':32 'up-to-d':86 'use':96 'use-cas':95 'wheel':108 'won':63"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6351839"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704208437 {#5414
    date: 2024-01-02 16:13:57.0 +01:00
  }
}
"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
85 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
86 DENIED moderate
App\Entity\EntryComment {#5137
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4684
    +user: App\Entity\User {#4697 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1710883420 {#4679
      date: 2024-03-19 22:23:40.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4685 …}
    +nested: Doctrine\ORM\PersistentCollection {#4687 …}
    +votes: Doctrine\ORM\PersistentCollection {#4689 …}
    +reports: Doctrine\ORM\PersistentCollection {#4691 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
    -id: 267555
    -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/6313166"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704038401 {#4680
      date: 2023-12-31 17:00:01.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    Have you tried the AIO method that’s now the primary supported docker install?\n
    \n
    It’s really good, and I’ve set up and used NC in a variety of ways since about version 7.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704069909 {#5135
    date: 2024-01-01 01:45:09.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5138 …}
  +nested: Doctrine\ORM\PersistentCollection {#5140 …}
  +votes: Doctrine\ORM\PersistentCollection {#5142 …}
  +reports: Doctrine\ORM\PersistentCollection {#5144 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5146 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5148 …}
  -id: 268788
  -bodyTs: "'7':35 'aio':5 'docker':13 'good':18 'instal':14 'method':6 'nc':26 'primari':11 'realli':17 'set':22 'sinc':32 'support':12 'tri':3 'use':25 'varieti':29 've':21 'version':34 'way':31"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6326407"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704069909 {#5136
    date: 2024-01-01 01:45:09.0 +01:00
  }
}
"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
87 DENIED edit
App\Entity\EntryComment {#5137
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4684
    +user: App\Entity\User {#4697 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1710883420 {#4679
      date: 2024-03-19 22:23:40.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4685 …}
    +nested: Doctrine\ORM\PersistentCollection {#4687 …}
    +votes: Doctrine\ORM\PersistentCollection {#4689 …}
    +reports: Doctrine\ORM\PersistentCollection {#4691 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
    -id: 267555
    -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/6313166"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704038401 {#4680
      date: 2023-12-31 17:00:01.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    Have you tried the AIO method that’s now the primary supported docker install?\n
    \n
    It’s really good, and I’ve set up and used NC in a variety of ways since about version 7.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704069909 {#5135
    date: 2024-01-01 01:45:09.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5138 …}
  +nested: Doctrine\ORM\PersistentCollection {#5140 …}
  +votes: Doctrine\ORM\PersistentCollection {#5142 …}
  +reports: Doctrine\ORM\PersistentCollection {#5144 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5146 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5148 …}
  -id: 268788
  -bodyTs: "'7':35 'aio':5 'docker':13 'good':18 'instal':14 'method':6 'nc':26 'primari':11 'realli':17 'set':22 'sinc':32 'support':12 'tri':3 'use':25 'varieti':29 've':21 'version':34 'way':31"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6326407"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704069909 {#5136
    date: 2024-01-01 01:45:09.0 +01:00
  }
}
"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
88 DENIED moderate
App\Entity\EntryComment {#5137
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4684
    +user: App\Entity\User {#4697 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1710883420 {#4679
      date: 2024-03-19 22:23:40.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4685 …}
    +nested: Doctrine\ORM\PersistentCollection {#4687 …}
    +votes: Doctrine\ORM\PersistentCollection {#4689 …}
    +reports: Doctrine\ORM\PersistentCollection {#4691 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
    -id: 267555
    -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/6313166"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704038401 {#4680
      date: 2023-12-31 17:00:01.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    Have you tried the AIO method that’s now the primary supported docker install?\n
    \n
    It’s really good, and I’ve set up and used NC in a variety of ways since about version 7.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704069909 {#5135
    date: 2024-01-01 01:45:09.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5138 …}
  +nested: Doctrine\ORM\PersistentCollection {#5140 …}
  +votes: Doctrine\ORM\PersistentCollection {#5142 …}
  +reports: Doctrine\ORM\PersistentCollection {#5144 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5146 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5148 …}
  -id: 268788
  -bodyTs: "'7':35 'aio':5 'docker':13 'good':18 'instal':14 'method':6 'nc':26 'primari':11 'realli':17 'set':22 'sinc':32 'support':12 'tri':3 'use':25 'varieti':29 've':21 'version':34 'way':31"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6326407"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704069909 {#5136
    date: 2024-01-01 01:45:09.0 +01:00
  }
}
"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
89 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
90 DENIED moderate
App\Entity\EntryComment {#5299
  +user: App\Entity\User {#4697 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5137
    +user: App\Entity\User {#4404 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4684
      +user: App\Entity\User {#4697 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710883420 {#4679
        date: 2024-03-19 22:23:40.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4685 …}
      +nested: Doctrine\ORM\PersistentCollection {#4687 …}
      +votes: Doctrine\ORM\PersistentCollection {#4689 …}
      +reports: Doctrine\ORM\PersistentCollection {#4691 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
      -id: 267555
      -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/6313166"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704038401 {#4680
        date: 2023-12-31 17:00:01.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: """
      Have you tried the AIO method that’s now the primary supported docker install?\n
      \n
      It’s really good, and I’ve set up and used NC in a variety of ways since about version 7.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704069909 {#5135
      date: 2024-01-01 01:45:09.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5138 …}
    +nested: Doctrine\ORM\PersistentCollection {#5140 …}
    +votes: Doctrine\ORM\PersistentCollection {#5142 …}
    +reports: Doctrine\ORM\PersistentCollection {#5144 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5146 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5148 …}
    -id: 268788
    -bodyTs: "'7':35 'aio':5 'docker':13 'good':18 'instal':14 'method':6 'nc':26 'primari':11 'realli':17 'set':22 'sinc':32 'support':12 'tri':3 'use':25 'varieti':29 've':21 'version':34 'way':31"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6326407"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704069909 {#5136
      date: 2024-01-01 01:45:09.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: "im not sure / cannot recall. it’s been a few months since i last tried to install it and it kept erroring out. im definitely strongly considering looking back into it though, it’s just that reverse proxying to the container was a nightmare… it still haunts my config, lol"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704171359 {#5297
    date: 2024-01-02 05:55:59.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@ikidd@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5300 …}
  +nested: Doctrine\ORM\PersistentCollection {#5302 …}
  +votes: Doctrine\ORM\PersistentCollection {#5304 …}
  +reports: Doctrine\ORM\PersistentCollection {#5306 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5308 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5310 …}
  -id: 272298
  -bodyTs: "'back':29 'cannot':4 'config':49 'consid':27 'contain':41 'definit':25 'error':22 'haunt':47 'im':1,24 'instal':17 'kept':21 'last':14 'lol':50 'look':28 'month':11 'nightmar':44 'proxi':38 'recal':5 'revers':37 'sinc':12 'still':46 'strong':26 'sure':3 'though':32 'tri':15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.dbzer0.com/comment/6344135"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704171359 {#5298
    date: 2024-01-02 05:55:59.0 +01:00
  }
}
"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
91 DENIED edit
App\Entity\EntryComment {#5299
  +user: App\Entity\User {#4697 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5137
    +user: App\Entity\User {#4404 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4684
      +user: App\Entity\User {#4697 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710883420 {#4679
        date: 2024-03-19 22:23:40.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4685 …}
      +nested: Doctrine\ORM\PersistentCollection {#4687 …}
      +votes: Doctrine\ORM\PersistentCollection {#4689 …}
      +reports: Doctrine\ORM\PersistentCollection {#4691 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
      -id: 267555
      -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/6313166"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704038401 {#4680
        date: 2023-12-31 17:00:01.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: """
      Have you tried the AIO method that’s now the primary supported docker install?\n
      \n
      It’s really good, and I’ve set up and used NC in a variety of ways since about version 7.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704069909 {#5135
      date: 2024-01-01 01:45:09.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5138 …}
    +nested: Doctrine\ORM\PersistentCollection {#5140 …}
    +votes: Doctrine\ORM\PersistentCollection {#5142 …}
    +reports: Doctrine\ORM\PersistentCollection {#5144 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5146 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5148 …}
    -id: 268788
    -bodyTs: "'7':35 'aio':5 'docker':13 'good':18 'instal':14 'method':6 'nc':26 'primari':11 'realli':17 'set':22 'sinc':32 'support':12 'tri':3 'use':25 'varieti':29 've':21 'version':34 'way':31"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6326407"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704069909 {#5136
      date: 2024-01-01 01:45:09.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: "im not sure / cannot recall. it’s been a few months since i last tried to install it and it kept erroring out. im definitely strongly considering looking back into it though, it’s just that reverse proxying to the container was a nightmare… it still haunts my config, lol"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704171359 {#5297
    date: 2024-01-02 05:55:59.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@ikidd@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5300 …}
  +nested: Doctrine\ORM\PersistentCollection {#5302 …}
  +votes: Doctrine\ORM\PersistentCollection {#5304 …}
  +reports: Doctrine\ORM\PersistentCollection {#5306 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5308 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5310 …}
  -id: 272298
  -bodyTs: "'back':29 'cannot':4 'config':49 'consid':27 'contain':41 'definit':25 'error':22 'haunt':47 'im':1,24 'instal':17 'kept':21 'last':14 'lol':50 'look':28 'month':11 'nightmar':44 'proxi':38 'recal':5 'revers':37 'sinc':12 'still':46 'strong':26 'sure':3 'though':32 'tri':15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.dbzer0.com/comment/6344135"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704171359 {#5298
    date: 2024-01-02 05:55:59.0 +01:00
  }
}
"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
92 DENIED moderate
App\Entity\EntryComment {#5299
  +user: App\Entity\User {#4697 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5137
    +user: App\Entity\User {#4404 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4684
      +user: App\Entity\User {#4697 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1710883420 {#4679
        date: 2024-03-19 22:23:40.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4685 …}
      +nested: Doctrine\ORM\PersistentCollection {#4687 …}
      +votes: Doctrine\ORM\PersistentCollection {#4689 …}
      +reports: Doctrine\ORM\PersistentCollection {#4691 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
      -id: 267555
      -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.dbzer0.com/comment/6313166"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704038401 {#4680
        date: 2023-12-31 17:00:01.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: """
      Have you tried the AIO method that’s now the primary supported docker install?\n
      \n
      It’s really good, and I’ve set up and used NC in a variety of ways since about version 7.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704069909 {#5135
      date: 2024-01-01 01:45:09.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5138 …}
    +nested: Doctrine\ORM\PersistentCollection {#5140 …}
    +votes: Doctrine\ORM\PersistentCollection {#5142 …}
    +reports: Doctrine\ORM\PersistentCollection {#5144 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5146 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5148 …}
    -id: 268788
    -bodyTs: "'7':35 'aio':5 'docker':13 'good':18 'instal':14 'method':6 'nc':26 'primari':11 'realli':17 'set':22 'sinc':32 'support':12 'tri':3 'use':25 'varieti':29 've':21 'version':34 'way':31"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6326407"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704069909 {#5136
      date: 2024-01-01 01:45:09.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: "im not sure / cannot recall. it’s been a few months since i last tried to install it and it kept erroring out. im definitely strongly considering looking back into it though, it’s just that reverse proxying to the container was a nightmare… it still haunts my config, lol"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704171359 {#5297
    date: 2024-01-02 05:55:59.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@ikidd@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5300 …}
  +nested: Doctrine\ORM\PersistentCollection {#5302 …}
  +votes: Doctrine\ORM\PersistentCollection {#5304 …}
  +reports: Doctrine\ORM\PersistentCollection {#5306 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5308 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5310 …}
  -id: 272298
  -bodyTs: "'back':29 'cannot':4 'config':49 'consid':27 'contain':41 'definit':25 'error':22 'haunt':47 'im':1,24 'instal':17 'kept':21 'last':14 'lol':50 'look':28 'month':11 'nightmar':44 'proxi':38 'recal':5 'revers':37 'sinc':12 'still':46 'strong':26 'sure':3 'though':32 'tri':15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.dbzer0.com/comment/6344135"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704171359 {#5298
    date: 2024-01-02 05:55:59.0 +01:00
  }
}
"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
93 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
94 DENIED moderate
App\Entity\EntryComment {#5400
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        > Any issues on the community? Report it using the report flag.\n
        \n
        > Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5299
    +user: App\Entity\User {#4697 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5137
      +user: App\Entity\User {#4404 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4684
        +user: App\Entity\User {#4697 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 1
        +score: 0
        +lastActive: DateTime @1710883420 {#4679
          date: 2024-03-19 22:23:40.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4685 …}
        +nested: Doctrine\ORM\PersistentCollection {#4687 …}
        +votes: Doctrine\ORM\PersistentCollection {#4689 …}
        +reports: Doctrine\ORM\PersistentCollection {#4691 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
        -id: 267555
        -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.dbzer0.com/comment/6313166"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704038401 {#4680
          date: 2023-12-31 17:00:01.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4684}
      +body: """
        Have you tried the AIO method that’s now the primary supported docker install?\n
        \n
        It’s really good, and I’ve set up and used NC in a variety of ways since about version 7.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704069909 {#5135
        date: 2024-01-01 01:45:09.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@virtueisdead@lemmy.dbzer0.com"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5138 …}
      +nested: Doctrine\ORM\PersistentCollection {#5140 …}
      +votes: Doctrine\ORM\PersistentCollection {#5142 …}
      +reports: Doctrine\ORM\PersistentCollection {#5144 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5146 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5148 …}
      -id: 268788
      -bodyTs: "'7':35 'aio':5 'docker':13 'good':18 'instal':14 'method':6 'nc':26 'primari':11 'realli':17 'set':22 'sinc':32 'support':12 'tri':3 'use':25 'varieti':29 've':21 'version':34 'way':31"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6326407"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704069909 {#5136
        date: 2024-01-01 01:45:09.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: "im not sure / cannot recall. it’s been a few months since i last tried to install it and it kept erroring out. im definitely strongly considering looking back into it though, it’s just that reverse proxying to the container was a nightmare… it still haunts my config, lol"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704171359 {#5297
      date: 2024-01-02 05:55:59.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
      "@ikidd@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5300 …}
    +nested: Doctrine\ORM\PersistentCollection {#5302 …}
    +votes: Doctrine\ORM\PersistentCollection {#5304 …}
    +reports: Doctrine\ORM\PersistentCollection {#5306 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5308 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5310 …}
    -id: 272298
    -bodyTs: "'back':29 'cannot':4 'config':49 'consid':27 'contain':41 'definit':25 'error':22 'haunt':47 'im':1,24 'instal':17 'kept':21 'last':14 'lol':50 'look':28 'month':11 'nightmar':44 'proxi':38 'recal':5 'revers':37 'sinc':12 'still':46 'strong':26 'sure':3 'though':32 'tri':15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/6344135"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704171359 {#5298
      date: 2024-01-02 05:55:59.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    I use NPM and all I think I had to add to it was\n
    \n
    ```\n
    \n
    <span style="color:#323232;">client_body_buffer_size 512k;\n
    </span><span style="color:#323232;">proxy_read_timeout 86400s;\n
    </span><span style="color:#323232;">client_max_body_size 0;\n
    </span>\n
    ```\n
    \n
    in the Advanced config. I’d love to move to Traefik but I could not figure out how to make that work.\n
    \n
    There were some other gotchas. If you run into something, ping me, I might remember if I encountered it and what I did.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704172411 {#5397
    date: 2024-01-02 06:13:31.0 +01:00
  }
  +ip: null
  +tags: [
    "323232"
  ]
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@ikidd@lemmy.world"
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@ikidd@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5401 …}
  +nested: Doctrine\ORM\PersistentCollection {#5403 …}
  +votes: Doctrine\ORM\PersistentCollection {#5405 …}
  +reports: Doctrine\ORM\PersistentCollection {#5407 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5409 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5411 …}
  -id: 272335
  -bodyTs: "'0':28 '512k':19 '86400s':23 'add':11 'advanc':31 'bodi':16,26 'buffer':17 'client':15,24 'config':32 'could':42 'd':34 'encount':68 'figur':44 'gotcha':55 'love':35 'make':48 'max':25 'might':64 'move':37 'npm':3 'ping':61 'proxi':20 'read':21 'rememb':65 'run':58 'size':18,27 'someth':60 'think':7 'timeout':22 'traefik':39 'use':2 'work':50"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6344817"
  +editedAt: DateTimeImmutable @1710686655 {#5398
    date: 2024-03-17 15:44:15.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704172411 {#5399
    date: 2024-01-02 06:13:31.0 +01:00
  }
}
"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
95 DENIED edit
App\Entity\EntryComment {#5400
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5299
    +user: App\Entity\User {#4697 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5137
      +user: App\Entity\User {#4404 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4684
        +user: App\Entity\User {#4697 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 1
        +score: 0
        +lastActive: DateTime @1710883420 {#4679
          date: 2024-03-19 22:23:40.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4685 …}
        +nested: Doctrine\ORM\PersistentCollection {#4687 …}
        +votes: Doctrine\ORM\PersistentCollection {#4689 …}
        +reports: Doctrine\ORM\PersistentCollection {#4691 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
        -id: 267555
        -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.dbzer0.com/comment/6313166"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704038401 {#4680
          date: 2023-12-31 17:00:01.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4684}
      +body: """
        Have you tried the AIO method that’s now the primary supported docker install?\n
        \n
        It’s really good, and I’ve set up and used NC in a variety of ways since about version 7.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704069909 {#5135
        date: 2024-01-01 01:45:09.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@virtueisdead@lemmy.dbzer0.com"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5138 …}
      +nested: Doctrine\ORM\PersistentCollection {#5140 …}
      +votes: Doctrine\ORM\PersistentCollection {#5142 …}
      +reports: Doctrine\ORM\PersistentCollection {#5144 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5146 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5148 …}
      -id: 268788
      -bodyTs: "'7':35 'aio':5 'docker':13 'good':18 'instal':14 'method':6 'nc':26 'primari':11 'realli':17 'set':22 'sinc':32 'support':12 'tri':3 'use':25 'varieti':29 've':21 'version':34 'way':31"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6326407"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704069909 {#5136
        date: 2024-01-01 01:45:09.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: "im not sure / cannot recall. it’s been a few months since i last tried to install it and it kept erroring out. im definitely strongly considering looking back into it though, it’s just that reverse proxying to the container was a nightmare… it still haunts my config, lol"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704171359 {#5297
      date: 2024-01-02 05:55:59.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
      "@ikidd@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5300 …}
    +nested: Doctrine\ORM\PersistentCollection {#5302 …}
    +votes: Doctrine\ORM\PersistentCollection {#5304 …}
    +reports: Doctrine\ORM\PersistentCollection {#5306 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5308 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5310 …}
    -id: 272298
    -bodyTs: "'back':29 'cannot':4 'config':49 'consid':27 'contain':41 'definit':25 'error':22 'haunt':47 'im':1,24 'instal':17 'kept':21 'last':14 'lol':50 'look':28 'month':11 'nightmar':44 'proxi':38 'recal':5 'revers':37 'sinc':12 'still':46 'strong':26 'sure':3 'though':32 'tri':15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/6344135"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704171359 {#5298
      date: 2024-01-02 05:55:59.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    I use NPM and all I think I had to add to it was\n
    \n
    ```\n
    \n
    <span style="color:#323232;">client_body_buffer_size 512k;\n
    </span><span style="color:#323232;">proxy_read_timeout 86400s;\n
    </span><span style="color:#323232;">client_max_body_size 0;\n
    </span>\n
    ```\n
    \n
    in the Advanced config. I’d love to move to Traefik but I could not figure out how to make that work.\n
    \n
    There were some other gotchas. If you run into something, ping me, I might remember if I encountered it and what I did.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704172411 {#5397
    date: 2024-01-02 06:13:31.0 +01:00
  }
  +ip: null
  +tags: [
    "323232"
  ]
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@ikidd@lemmy.world"
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@ikidd@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5401 …}
  +nested: Doctrine\ORM\PersistentCollection {#5403 …}
  +votes: Doctrine\ORM\PersistentCollection {#5405 …}
  +reports: Doctrine\ORM\PersistentCollection {#5407 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5409 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5411 …}
  -id: 272335
  -bodyTs: "'0':28 '512k':19 '86400s':23 'add':11 'advanc':31 'bodi':16,26 'buffer':17 'client':15,24 'config':32 'could':42 'd':34 'encount':68 'figur':44 'gotcha':55 'love':35 'make':48 'max':25 'might':64 'move':37 'npm':3 'ping':61 'proxi':20 'read':21 'rememb':65 'run':58 'size':18,27 'someth':60 'think':7 'timeout':22 'traefik':39 'use':2 'work':50"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6344817"
  +editedAt: DateTimeImmutable @1710686655 {#5398
    date: 2024-03-17 15:44:15.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704172411 {#5399
    date: 2024-01-02 06:13:31.0 +01:00
  }
}
"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
96 DENIED moderate
App\Entity\EntryComment {#5400
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5299
    +user: App\Entity\User {#4697 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5137
      +user: App\Entity\User {#4404 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4684
        +user: App\Entity\User {#4697 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "ive tried to get nextcloud working several times and it just seems to never work for some reason… maybe i should set it up on a pi ive got laying around instead of my main server lol"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 1
        +score: 0
        +lastActive: DateTime @1710883420 {#4679
          date: 2024-03-19 22:23:40.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4685 …}
        +nested: Doctrine\ORM\PersistentCollection {#4687 …}
        +votes: Doctrine\ORM\PersistentCollection {#4689 …}
        +reports: Doctrine\ORM\PersistentCollection {#4691 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4693 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4695 …}
        -id: 267555
        -bodyTs: "'around':31 'get':4 'got':29 'instead':32 'ive':1,28 'lay':30 'lol':37 'main':35 'mayb':19 'never':14 'nextcloud':5 'pi':27 'reason':18 'seem':12 'server':36 'set':22 'sever':7 'time':8 'tri':2 'work':6,15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.dbzer0.com/comment/6313166"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704038401 {#4680
          date: 2023-12-31 17:00:01.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4684}
      +body: """
        Have you tried the AIO method that’s now the primary supported docker install?\n
        \n
        It’s really good, and I’ve set up and used NC in a variety of ways since about version 7.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704069909 {#5135
        date: 2024-01-01 01:45:09.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@virtueisdead@lemmy.dbzer0.com"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5138 …}
      +nested: Doctrine\ORM\PersistentCollection {#5140 …}
      +votes: Doctrine\ORM\PersistentCollection {#5142 …}
      +reports: Doctrine\ORM\PersistentCollection {#5144 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5146 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5148 …}
      -id: 268788
      -bodyTs: "'7':35 'aio':5 'docker':13 'good':18 'instal':14 'method':6 'nc':26 'primari':11 'realli':17 'set':22 'sinc':32 'support':12 'tri':3 'use':25 'varieti':29 've':21 'version':34 'way':31"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6326407"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704069909 {#5136
        date: 2024-01-01 01:45:09.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4684}
    +body: "im not sure / cannot recall. it’s been a few months since i last tried to install it and it kept erroring out. im definitely strongly considering looking back into it though, it’s just that reverse proxying to the container was a nightmare… it still haunts my config, lol"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704171359 {#5297
      date: 2024-01-02 05:55:59.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@virtueisdead@lemmy.dbzer0.com"
      "@ikidd@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5300 …}
    +nested: Doctrine\ORM\PersistentCollection {#5302 …}
    +votes: Doctrine\ORM\PersistentCollection {#5304 …}
    +reports: Doctrine\ORM\PersistentCollection {#5306 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5308 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5310 …}
    -id: 272298
    -bodyTs: "'back':29 'cannot':4 'config':49 'consid':27 'contain':41 'definit':25 'error':22 'haunt':47 'im':1,24 'instal':17 'kept':21 'last':14 'lol':50 'look':28 'month':11 'nightmar':44 'proxi':38 'recal':5 'revers':37 'sinc':12 'still':46 'strong':26 'sure':3 'though':32 'tri':15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.dbzer0.com/comment/6344135"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704171359 {#5298
      date: 2024-01-02 05:55:59.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4684}
  +body: """
    I use NPM and all I think I had to add to it was\n
    \n
    ```\n
    \n
    <span style="color:#323232;">client_body_buffer_size 512k;\n
    </span><span style="color:#323232;">proxy_read_timeout 86400s;\n
    </span><span style="color:#323232;">client_max_body_size 0;\n
    </span>\n
    ```\n
    \n
    in the Advanced config. I’d love to move to Traefik but I could not figure out how to make that work.\n
    \n
    There were some other gotchas. If you run into something, ping me, I might remember if I encountered it and what I did.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704172411 {#5397
    date: 2024-01-02 06:13:31.0 +01:00
  }
  +ip: null
  +tags: [
    "323232"
  ]
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@ikidd@lemmy.world"
    "@tofubl@discuss.tchncs.de"
    "@virtueisdead@lemmy.dbzer0.com"
    "@ikidd@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5401 …}
  +nested: Doctrine\ORM\PersistentCollection {#5403 …}
  +votes: Doctrine\ORM\PersistentCollection {#5405 …}
  +reports: Doctrine\ORM\PersistentCollection {#5407 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5409 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5411 …}
  -id: 272335
  -bodyTs: "'0':28 '512k':19 '86400s':23 'add':11 'advanc':31 'bodi':16,26 'buffer':17 'client':15,24 'config':32 'could':42 'd':34 'encount':68 'figur':44 'gotcha':55 'love':35 'make':48 'max':25 'might':64 'move':37 'npm':3 'ping':61 'proxi':20 'read':21 'rememb':65 'run':58 'size':18,27 'someth':60 'think':7 'timeout':22 'traefik':39 'use':2 'work':50"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6344817"
  +editedAt: DateTimeImmutable @1710686655 {#5398
    date: 2024-03-17 15:44:15.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704172411 {#5399
    date: 2024-01-02 06:13:31.0 +01:00
  }
}
"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
97 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
98 DENIED moderate
App\Entity\EntryComment {#4757
  +user: App\Entity\User {#4770 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Thanks for sharing it, really helpful post"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704033819 {#4752
    date: 2023-12-31 15:43:39.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4758 …}
  +nested: Doctrine\ORM\PersistentCollection {#4760 …}
  +votes: Doctrine\ORM\PersistentCollection {#4762 …}
  +reports: Doctrine\ORM\PersistentCollection {#4764 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4766 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4768 …}
  -id: 267429
  -bodyTs: "'help':6 'post':7 'realli':5 'share':3 'thank':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6318857"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704033819 {#4753
    date: 2023-12-31 15:43:39.0 +01:00
  }
}
"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
99 DENIED edit
App\Entity\EntryComment {#4757
  +user: App\Entity\User {#4770 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Thanks for sharing it, really helpful post"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704033819 {#4752
    date: 2023-12-31 15:43:39.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4758 …}
  +nested: Doctrine\ORM\PersistentCollection {#4760 …}
  +votes: Doctrine\ORM\PersistentCollection {#4762 …}
  +reports: Doctrine\ORM\PersistentCollection {#4764 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4766 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4768 …}
  -id: 267429
  -bodyTs: "'help':6 'post':7 'realli':5 'share':3 'thank':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6318857"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704033819 {#4753
    date: 2023-12-31 15:43:39.0 +01:00
  }
}
"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
100 DENIED moderate
App\Entity\EntryComment {#4757
  +user: App\Entity\User {#4770 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Thanks for sharing it, really helpful post"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704033819 {#4752
    date: 2023-12-31 15:43:39.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4758 …}
  +nested: Doctrine\ORM\PersistentCollection {#4760 …}
  +votes: Doctrine\ORM\PersistentCollection {#4762 …}
  +reports: Doctrine\ORM\PersistentCollection {#4764 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4766 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4768 …}
  -id: 267429
  -bodyTs: "'help':6 'post':7 'realli':5 'share':3 'thank':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6318857"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704033819 {#4753
    date: 2023-12-31 15:43:39.0 +01:00
  }
}
"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
101 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
102 DENIED moderate
App\Entity\EntryComment {#4830
  +user: App\Entity\User {#4843 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1712568000 {#4825
    date: 2024-04-08 11:20:00.0 +02:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4831 …}
  +nested: Doctrine\ORM\PersistentCollection {#4833 …}
  +votes: Doctrine\ORM\PersistentCollection {#4835 …}
  +reports: Doctrine\ORM\PersistentCollection {#4837 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
  -id: 267419
  -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6974052"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704033563 {#4826
    date: 2023-12-31 15:39:23.0 +01:00
  }
}
"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
103 DENIED edit
App\Entity\EntryComment {#4830
  +user: App\Entity\User {#4843 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1712568000 {#4825
    date: 2024-04-08 11:20:00.0 +02:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4831 …}
  +nested: Doctrine\ORM\PersistentCollection {#4833 …}
  +votes: Doctrine\ORM\PersistentCollection {#4835 …}
  +reports: Doctrine\ORM\PersistentCollection {#4837 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
  -id: 267419
  -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6974052"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704033563 {#4826
    date: 2023-12-31 15:39:23.0 +01:00
  }
}
"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
104 DENIED moderate
App\Entity\EntryComment {#4830
  +user: App\Entity\User {#4843 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1712568000 {#4825
    date: 2024-04-08 11:20:00.0 +02:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4831 …}
  +nested: Doctrine\ORM\PersistentCollection {#4833 …}
  +votes: Doctrine\ORM\PersistentCollection {#4835 …}
  +reports: Doctrine\ORM\PersistentCollection {#4837 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
  -id: 267419
  -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6974052"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704033563 {#4826
    date: 2023-12-31 15:39:23.0 +01:00
  }
}
"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
105 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
106 DENIED moderate
App\Entity\EntryComment {#5091
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4830
    +user: App\Entity\User {#4843 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712568000 {#4825
      date: 2024-04-08 11:20:00.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4831 …}
    +nested: Doctrine\ORM\PersistentCollection {#4833 …}
    +votes: Doctrine\ORM\PersistentCollection {#4835 …}
    +reports: Doctrine\ORM\PersistentCollection {#4837 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
    -id: 267419
    -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6974052"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704033563 {#4826
      date: 2023-12-31 15:39:23.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: "I don’t think you’ll do yourself any favours setting it up on Windows directly. How about docker+wsl2?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1704034764 {#5089
    date: 2023-12-31 15:59:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5092 …}
  +nested: Doctrine\ORM\PersistentCollection {#5094 …}
  +votes: Doctrine\ORM\PersistentCollection {#5096 …}
  +reports: Doctrine\ORM\PersistentCollection {#5098 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5100 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5102 …}
  -id: 267462
  -bodyTs: "'direct':16 'docker':19 'favour':10 'll':6 'set':11 'think':4 'window':15 'wsl2':20"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6030527"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704034764 {#5090
    date: 2023-12-31 15:59:24.0 +01:00
  }
}
"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
107 DENIED edit
App\Entity\EntryComment {#5091
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4830
    +user: App\Entity\User {#4843 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712568000 {#4825
      date: 2024-04-08 11:20:00.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4831 …}
    +nested: Doctrine\ORM\PersistentCollection {#4833 …}
    +votes: Doctrine\ORM\PersistentCollection {#4835 …}
    +reports: Doctrine\ORM\PersistentCollection {#4837 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
    -id: 267419
    -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6974052"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704033563 {#4826
      date: 2023-12-31 15:39:23.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: "I don’t think you’ll do yourself any favours setting it up on Windows directly. How about docker+wsl2?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1704034764 {#5089
    date: 2023-12-31 15:59:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5092 …}
  +nested: Doctrine\ORM\PersistentCollection {#5094 …}
  +votes: Doctrine\ORM\PersistentCollection {#5096 …}
  +reports: Doctrine\ORM\PersistentCollection {#5098 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5100 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5102 …}
  -id: 267462
  -bodyTs: "'direct':16 'docker':19 'favour':10 'll':6 'set':11 'think':4 'window':15 'wsl2':20"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6030527"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704034764 {#5090
    date: 2023-12-31 15:59:24.0 +01:00
  }
}
"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
108 DENIED moderate
App\Entity\EntryComment {#5091
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4830
    +user: App\Entity\User {#4843 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712568000 {#4825
      date: 2024-04-08 11:20:00.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4831 …}
    +nested: Doctrine\ORM\PersistentCollection {#4833 …}
    +votes: Doctrine\ORM\PersistentCollection {#4835 …}
    +reports: Doctrine\ORM\PersistentCollection {#4837 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
    -id: 267419
    -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6974052"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704033563 {#4826
      date: 2023-12-31 15:39:23.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: "I don’t think you’ll do yourself any favours setting it up on Windows directly. How about docker+wsl2?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1704034764 {#5089
    date: 2023-12-31 15:59:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5092 …}
  +nested: Doctrine\ORM\PersistentCollection {#5094 …}
  +votes: Doctrine\ORM\PersistentCollection {#5096 …}
  +reports: Doctrine\ORM\PersistentCollection {#5098 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5100 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5102 …}
  -id: 267462
  -bodyTs: "'direct':16 'docker':19 'favour':10 'll':6 'set':11 'think':4 'window':15 'wsl2':20"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6030527"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704034764 {#5090
    date: 2023-12-31 15:59:24.0 +01:00
  }
}
"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
109 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
110 DENIED moderate
App\Entity\EntryComment {#5235
  +user: App\Entity\User {#4843 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5091
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4830
      +user: App\Entity\User {#4843 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1712568000 {#4825
        date: 2024-04-08 11:20:00.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4831 …}
      +nested: Doctrine\ORM\PersistentCollection {#4833 …}
      +votes: Doctrine\ORM\PersistentCollection {#4835 …}
      +reports: Doctrine\ORM\PersistentCollection {#4837 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
      -id: 267419
      -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6974052"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704033563 {#4826
        date: 2023-12-31 15:39:23.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: "I don’t think you’ll do yourself any favours setting it up on Windows directly. How about docker+wsl2?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1704034764 {#5089
      date: 2023-12-31 15:59:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5092 …}
    +nested: Doctrine\ORM\PersistentCollection {#5094 …}
    +votes: Doctrine\ORM\PersistentCollection {#5096 …}
    +reports: Doctrine\ORM\PersistentCollection {#5098 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5100 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5102 …}
    -id: 267462
    -bodyTs: "'direct':16 'docker':19 'favour':10 'll':6 'set':11 'think':4 'window':15 'wsl2':20"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6030527"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704034764 {#5090
      date: 2023-12-31 15:59:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: "I have docker on the machine now and thought I’d try that type of install first. Sorry, I’m not familiar with the abbreviation “wsl2”"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704034997 {#5243
    date: 2023-12-31 16:03:17.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5234 …}
  +nested: Doctrine\ORM\PersistentCollection {#5232 …}
  +votes: Doctrine\ORM\PersistentCollection {#5230 …}
  +reports: Doctrine\ORM\PersistentCollection {#5245 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5247 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5249 …}
  -id: 267468
  -bodyTs: "'abbrevi':25 'd':11 'docker':3 'familiar':22 'first':17 'instal':16 'm':20 'machin':6 'sorri':18 'thought':9 'tri':12 'type':14 'wsl2':26"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6974329"
  +editedAt: DateTimeImmutable @1709944922 {#5240
    date: 2024-03-09 01:42:02.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704034997 {#5242
    date: 2023-12-31 16:03:17.0 +01:00
  }
}
"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
111 DENIED edit
App\Entity\EntryComment {#5235
  +user: App\Entity\User {#4843 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5091
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4830
      +user: App\Entity\User {#4843 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1712568000 {#4825
        date: 2024-04-08 11:20:00.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4831 …}
      +nested: Doctrine\ORM\PersistentCollection {#4833 …}
      +votes: Doctrine\ORM\PersistentCollection {#4835 …}
      +reports: Doctrine\ORM\PersistentCollection {#4837 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
      -id: 267419
      -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6974052"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704033563 {#4826
        date: 2023-12-31 15:39:23.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: "I don’t think you’ll do yourself any favours setting it up on Windows directly. How about docker+wsl2?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1704034764 {#5089
      date: 2023-12-31 15:59:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5092 …}
    +nested: Doctrine\ORM\PersistentCollection {#5094 …}
    +votes: Doctrine\ORM\PersistentCollection {#5096 …}
    +reports: Doctrine\ORM\PersistentCollection {#5098 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5100 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5102 …}
    -id: 267462
    -bodyTs: "'direct':16 'docker':19 'favour':10 'll':6 'set':11 'think':4 'window':15 'wsl2':20"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6030527"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704034764 {#5090
      date: 2023-12-31 15:59:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: "I have docker on the machine now and thought I’d try that type of install first. Sorry, I’m not familiar with the abbreviation “wsl2”"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704034997 {#5243
    date: 2023-12-31 16:03:17.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5234 …}
  +nested: Doctrine\ORM\PersistentCollection {#5232 …}
  +votes: Doctrine\ORM\PersistentCollection {#5230 …}
  +reports: Doctrine\ORM\PersistentCollection {#5245 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5247 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5249 …}
  -id: 267468
  -bodyTs: "'abbrevi':25 'd':11 'docker':3 'familiar':22 'first':17 'instal':16 'm':20 'machin':6 'sorri':18 'thought':9 'tri':12 'type':14 'wsl2':26"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6974329"
  +editedAt: DateTimeImmutable @1709944922 {#5240
    date: 2024-03-09 01:42:02.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704034997 {#5242
    date: 2023-12-31 16:03:17.0 +01:00
  }
}
"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
112 DENIED moderate
App\Entity\EntryComment {#5235
  +user: App\Entity\User {#4843 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5091
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4830
      +user: App\Entity\User {#4843 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1712568000 {#4825
        date: 2024-04-08 11:20:00.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4831 …}
      +nested: Doctrine\ORM\PersistentCollection {#4833 …}
      +votes: Doctrine\ORM\PersistentCollection {#4835 …}
      +reports: Doctrine\ORM\PersistentCollection {#4837 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
      -id: 267419
      -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6974052"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704033563 {#4826
        date: 2023-12-31 15:39:23.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: "I don’t think you’ll do yourself any favours setting it up on Windows directly. How about docker+wsl2?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1704034764 {#5089
      date: 2023-12-31 15:59:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5092 …}
    +nested: Doctrine\ORM\PersistentCollection {#5094 …}
    +votes: Doctrine\ORM\PersistentCollection {#5096 …}
    +reports: Doctrine\ORM\PersistentCollection {#5098 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5100 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5102 …}
    -id: 267462
    -bodyTs: "'direct':16 'docker':19 'favour':10 'll':6 'set':11 'think':4 'window':15 'wsl2':20"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://discuss.tchncs.de/comment/6030527"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704034764 {#5090
      date: 2023-12-31 15:59:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: "I have docker on the machine now and thought I’d try that type of install first. Sorry, I’m not familiar with the abbreviation “wsl2”"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704034997 {#5243
    date: 2023-12-31 16:03:17.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5234 …}
  +nested: Doctrine\ORM\PersistentCollection {#5232 …}
  +votes: Doctrine\ORM\PersistentCollection {#5230 …}
  +reports: Doctrine\ORM\PersistentCollection {#5245 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5247 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5249 …}
  -id: 267468
  -bodyTs: "'abbrevi':25 'd':11 'docker':3 'familiar':22 'first':17 'instal':16 'm':20 'machin':6 'sorri':18 'thought':9 'tri':12 'type':14 'wsl2':26"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6974329"
  +editedAt: DateTimeImmutable @1709944922 {#5240
    date: 2024-03-09 01:42:02.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704034997 {#5242
    date: 2023-12-31 16:03:17.0 +01:00
  }
}
"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
113 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
114 DENIED moderate
App\Entity\EntryComment {#5350
  +user: Proxies\__CG__\App\Entity\User {#5345 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5235
    +user: App\Entity\User {#4843 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5091
      +user: Proxies\__CG__\App\Entity\User {#1970 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4830
        +user: App\Entity\User {#4843 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 0
        +score: 0
        +lastActive: DateTime @1712568000 {#4825
          date: 2024-04-08 11:20:00.0 +02:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4831 …}
        +nested: Doctrine\ORM\PersistentCollection {#4833 …}
        +votes: Doctrine\ORM\PersistentCollection {#4835 …}
        +reports: Doctrine\ORM\PersistentCollection {#4837 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
        -id: 267419
        -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6974052"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704033563 {#4826
          date: 2023-12-31 15:39:23.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4830}
      +body: "I don’t think you’ll do yourself any favours setting it up on Windows directly. How about docker+wsl2?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 2
      +score: 0
      +lastActive: DateTime @1704034764 {#5089
        date: 2023-12-31 15:59:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5092 …}
      +nested: Doctrine\ORM\PersistentCollection {#5094 …}
      +votes: Doctrine\ORM\PersistentCollection {#5096 …}
      +reports: Doctrine\ORM\PersistentCollection {#5098 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5100 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5102 …}
      -id: 267462
      -bodyTs: "'direct':16 'docker':19 'favour':10 'll':6 'set':11 'think':4 'window':15 'wsl2':20"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/comment/6030527"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704034764 {#5090
        date: 2023-12-31 15:59:24.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: "I have docker on the machine now and thought I’d try that type of install first. Sorry, I’m not familiar with the abbreviation “wsl2”"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704034997 {#5243
      date: 2023-12-31 16:03:17.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5234 …}
    +nested: Doctrine\ORM\PersistentCollection {#5232 …}
    +votes: Doctrine\ORM\PersistentCollection {#5230 …}
    +reports: Doctrine\ORM\PersistentCollection {#5245 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5247 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5249 …}
    -id: 267468
    -bodyTs: "'abbrevi':25 'd':11 'docker':3 'familiar':22 'first':17 'instal':16 'm':20 'machin':6 'sorri':18 'thought':9 'tri':12 'type':14 'wsl2':26"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6974329"
    +editedAt: DateTimeImmutable @1709944922 {#5240
      date: 2024-03-09 01:42:02.0 +01:00
    }
    +createdAt: DateTimeImmutable @1704034997 {#5242
      date: 2023-12-31 16:03:17.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +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 {#5356
    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 {#5344 …}
  +nested: Doctrine\ORM\PersistentCollection {#5348 …}
  +votes: Doctrine\ORM\PersistentCollection {#5359 …}
  +reports: Doctrine\ORM\PersistentCollection {#5361 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5363 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5365 …}
  -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 {#5353
    date: 2024-03-08 22:55:43.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704036973 {#5355
    date: 2023-12-31 16:36:13.0 +01:00
  }
}
"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
115 DENIED edit
App\Entity\EntryComment {#5350
  +user: Proxies\__CG__\App\Entity\User {#5345 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5235
    +user: App\Entity\User {#4843 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5091
      +user: Proxies\__CG__\App\Entity\User {#1970 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4830
        +user: App\Entity\User {#4843 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 0
        +score: 0
        +lastActive: DateTime @1712568000 {#4825
          date: 2024-04-08 11:20:00.0 +02:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4831 …}
        +nested: Doctrine\ORM\PersistentCollection {#4833 …}
        +votes: Doctrine\ORM\PersistentCollection {#4835 …}
        +reports: Doctrine\ORM\PersistentCollection {#4837 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
        -id: 267419
        -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6974052"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704033563 {#4826
          date: 2023-12-31 15:39:23.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4830}
      +body: "I don’t think you’ll do yourself any favours setting it up on Windows directly. How about docker+wsl2?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 2
      +score: 0
      +lastActive: DateTime @1704034764 {#5089
        date: 2023-12-31 15:59:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5092 …}
      +nested: Doctrine\ORM\PersistentCollection {#5094 …}
      +votes: Doctrine\ORM\PersistentCollection {#5096 …}
      +reports: Doctrine\ORM\PersistentCollection {#5098 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5100 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5102 …}
      -id: 267462
      -bodyTs: "'direct':16 'docker':19 'favour':10 'll':6 'set':11 'think':4 'window':15 'wsl2':20"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/comment/6030527"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704034764 {#5090
        date: 2023-12-31 15:59:24.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: "I have docker on the machine now and thought I’d try that type of install first. Sorry, I’m not familiar with the abbreviation “wsl2”"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704034997 {#5243
      date: 2023-12-31 16:03:17.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5234 …}
    +nested: Doctrine\ORM\PersistentCollection {#5232 …}
    +votes: Doctrine\ORM\PersistentCollection {#5230 …}
    +reports: Doctrine\ORM\PersistentCollection {#5245 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5247 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5249 …}
    -id: 267468
    -bodyTs: "'abbrevi':25 'd':11 'docker':3 'familiar':22 'first':17 'instal':16 'm':20 'machin':6 'sorri':18 'thought':9 'tri':12 'type':14 'wsl2':26"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6974329"
    +editedAt: DateTimeImmutable @1709944922 {#5240
      date: 2024-03-09 01:42:02.0 +01:00
    }
    +createdAt: DateTimeImmutable @1704034997 {#5242
      date: 2023-12-31 16:03:17.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +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 {#5356
    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 {#5344 …}
  +nested: Doctrine\ORM\PersistentCollection {#5348 …}
  +votes: Doctrine\ORM\PersistentCollection {#5359 …}
  +reports: Doctrine\ORM\PersistentCollection {#5361 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5363 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5365 …}
  -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 {#5353
    date: 2024-03-08 22:55:43.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704036973 {#5355
    date: 2023-12-31 16:36:13.0 +01:00
  }
}
"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
116 DENIED moderate
App\Entity\EntryComment {#5350
  +user: Proxies\__CG__\App\Entity\User {#5345 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5235
    +user: App\Entity\User {#4843 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5091
      +user: Proxies\__CG__\App\Entity\User {#1970 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4830
        +user: App\Entity\User {#4843 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 0
        +score: 0
        +lastActive: DateTime @1712568000 {#4825
          date: 2024-04-08 11:20:00.0 +02:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4831 …}
        +nested: Doctrine\ORM\PersistentCollection {#4833 …}
        +votes: Doctrine\ORM\PersistentCollection {#4835 …}
        +reports: Doctrine\ORM\PersistentCollection {#4837 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
        -id: 267419
        -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6974052"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704033563 {#4826
          date: 2023-12-31 15:39:23.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4830}
      +body: "I don’t think you’ll do yourself any favours setting it up on Windows directly. How about docker+wsl2?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 2
      +score: 0
      +lastActive: DateTime @1704034764 {#5089
        date: 2023-12-31 15:59:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5092 …}
      +nested: Doctrine\ORM\PersistentCollection {#5094 …}
      +votes: Doctrine\ORM\PersistentCollection {#5096 …}
      +reports: Doctrine\ORM\PersistentCollection {#5098 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5100 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5102 …}
      -id: 267462
      -bodyTs: "'direct':16 'docker':19 'favour':10 'll':6 'set':11 'think':4 'window':15 'wsl2':20"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://discuss.tchncs.de/comment/6030527"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704034764 {#5090
        date: 2023-12-31 15:59:24.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: "I have docker on the machine now and thought I’d try that type of install first. Sorry, I’m not familiar with the abbreviation “wsl2”"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704034997 {#5243
      date: 2023-12-31 16:03:17.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5234 …}
    +nested: Doctrine\ORM\PersistentCollection {#5232 …}
    +votes: Doctrine\ORM\PersistentCollection {#5230 …}
    +reports: Doctrine\ORM\PersistentCollection {#5245 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5247 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5249 …}
    -id: 267468
    -bodyTs: "'abbrevi':25 'd':11 'docker':3 'familiar':22 'first':17 'instal':16 'm':20 'machin':6 'sorri':18 'thought':9 'tri':12 'type':14 'wsl2':26"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6974329"
    +editedAt: DateTimeImmutable @1709944922 {#5240
      date: 2024-03-09 01:42:02.0 +01:00
    }
    +createdAt: DateTimeImmutable @1704034997 {#5242
      date: 2023-12-31 16:03:17.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +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 {#5356
    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 {#5344 …}
  +nested: Doctrine\ORM\PersistentCollection {#5348 …}
  +votes: Doctrine\ORM\PersistentCollection {#5359 …}
  +reports: Doctrine\ORM\PersistentCollection {#5361 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5363 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5365 …}
  -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 {#5353
    date: 2024-03-08 22:55:43.0 +01:00
  }
  +createdAt: DateTimeImmutable @1704036973 {#5355
    date: 2023-12-31 16:36:13.0 +01:00
  }
}
"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
117 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
118 DENIED moderate
App\Entity\EntryComment {#5106
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4830
    +user: App\Entity\User {#4843 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712568000 {#4825
      date: 2024-04-08 11:20:00.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4831 …}
    +nested: Doctrine\ORM\PersistentCollection {#4833 …}
    +votes: Doctrine\ORM\PersistentCollection {#4835 …}
    +reports: Doctrine\ORM\PersistentCollection {#4837 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
    -id: 267419
    -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6974052"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704033563 {#4826
      date: 2023-12-31 15:39:23.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: """
    100% agree with tofubi, Docker on Windows is a form of self-abuse, like cutting yourself. It’s a train wreck for anything other than a little bit of testing for development work. You will come away with a bad taste in your mouth about Docker, I avoided containers for years because I started with them on Windows docker.\n
    \n
    I’ve run a lot of different scenarios with docker, what I’ve come down to as the cleanest and easiest to maintain is Debian 12 with the [Docker convenience script](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script). It’s fast, hassle free, and doesn’t have a bunch of layers of weirdness like using Ubuntu Server with a docker snap that makes troubleshooting a nightmare.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704070486 {#5104
    date: 2024-01-01 01:54:46.0 +01:00
  }
  +ip: null
  +tags: [
    "install"
  ]
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5107 …}
  +nested: Doctrine\ORM\PersistentCollection {#5109 …}
  +votes: Doctrine\ORM\PersistentCollection {#5111 …}
  +reports: Doctrine\ORM\PersistentCollection {#5113 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5115 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5117 …}
  -id: 268818
  -bodyTs: "'/engine/install/debian/#install-using-the-convenience-script).':94 '100':1 '12':86 'abus':14 'agre':2 'anyth':24 'avoid':49 'away':38 'bad':41 'bit':29 'bunch':105 'cleanest':79 'come':37,74 'contain':50 'conveni':90 'cut':16 'debian':85 'develop':33 'differ':67 'docker':5,47,60,70,89,116 'docs.docker.com':93 'docs.docker.com/engine/install/debian/#install-using-the-convenience-script).':92 'doesn':101 'easiest':81 'fast':97 'form':10 'free':99 'hassl':98 'layer':107 'like':15,110 'littl':28 'lot':65 'maintain':83 'make':119 'mouth':45 'nightmar':122 'run':63 'scenario':68 'script':91 'self':13 'self-abus':12 'server':113 'snap':117 'start':55 'tast':42 'test':31 'tofubi':4 'train':21 'troubleshoot':120 'ubuntu':112 'use':111 've':62,73 'weird':109 'window':7,59 'work':34 'wreck':22 'year':52"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6326516"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704070486 {#5105
    date: 2024-01-01 01:54:46.0 +01:00
  }
}
"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
119 DENIED edit
App\Entity\EntryComment {#5106
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4830
    +user: App\Entity\User {#4843 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712568000 {#4825
      date: 2024-04-08 11:20:00.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4831 …}
    +nested: Doctrine\ORM\PersistentCollection {#4833 …}
    +votes: Doctrine\ORM\PersistentCollection {#4835 …}
    +reports: Doctrine\ORM\PersistentCollection {#4837 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
    -id: 267419
    -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6974052"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704033563 {#4826
      date: 2023-12-31 15:39:23.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: """
    100% agree with tofubi, Docker on Windows is a form of self-abuse, like cutting yourself. It’s a train wreck for anything other than a little bit of testing for development work. You will come away with a bad taste in your mouth about Docker, I avoided containers for years because I started with them on Windows docker.\n
    \n
    I’ve run a lot of different scenarios with docker, what I’ve come down to as the cleanest and easiest to maintain is Debian 12 with the [Docker convenience script](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script). It’s fast, hassle free, and doesn’t have a bunch of layers of weirdness like using Ubuntu Server with a docker snap that makes troubleshooting a nightmare.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704070486 {#5104
    date: 2024-01-01 01:54:46.0 +01:00
  }
  +ip: null
  +tags: [
    "install"
  ]
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5107 …}
  +nested: Doctrine\ORM\PersistentCollection {#5109 …}
  +votes: Doctrine\ORM\PersistentCollection {#5111 …}
  +reports: Doctrine\ORM\PersistentCollection {#5113 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5115 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5117 …}
  -id: 268818
  -bodyTs: "'/engine/install/debian/#install-using-the-convenience-script).':94 '100':1 '12':86 'abus':14 'agre':2 'anyth':24 'avoid':49 'away':38 'bad':41 'bit':29 'bunch':105 'cleanest':79 'come':37,74 'contain':50 'conveni':90 'cut':16 'debian':85 'develop':33 'differ':67 'docker':5,47,60,70,89,116 'docs.docker.com':93 'docs.docker.com/engine/install/debian/#install-using-the-convenience-script).':92 'doesn':101 'easiest':81 'fast':97 'form':10 'free':99 'hassl':98 'layer':107 'like':15,110 'littl':28 'lot':65 'maintain':83 'make':119 'mouth':45 'nightmar':122 'run':63 'scenario':68 'script':91 'self':13 'self-abus':12 'server':113 'snap':117 'start':55 'tast':42 'test':31 'tofubi':4 'train':21 'troubleshoot':120 'ubuntu':112 'use':111 've':62,73 'weird':109 'window':7,59 'work':34 'wreck':22 'year':52"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6326516"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704070486 {#5105
    date: 2024-01-01 01:54:46.0 +01:00
  }
}
"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
120 DENIED moderate
App\Entity\EntryComment {#5106
  +user: App\Entity\User {#4404 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4830
    +user: App\Entity\User {#4843 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1712568000 {#4825
      date: 2024-04-08 11:20:00.0 +02:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4831 …}
    +nested: Doctrine\ORM\PersistentCollection {#4833 …}
    +votes: Doctrine\ORM\PersistentCollection {#4835 …}
    +reports: Doctrine\ORM\PersistentCollection {#4837 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
    -id: 267419
    -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6974052"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704033563 {#4826
      date: 2023-12-31 15:39:23.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: """
    100% agree with tofubi, Docker on Windows is a form of self-abuse, like cutting yourself. It’s a train wreck for anything other than a little bit of testing for development work. You will come away with a bad taste in your mouth about Docker, I avoided containers for years because I started with them on Windows docker.\n
    \n
    I’ve run a lot of different scenarios with docker, what I’ve come down to as the cleanest and easiest to maintain is Debian 12 with the [Docker convenience script](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script). It’s fast, hassle free, and doesn’t have a bunch of layers of weirdness like using Ubuntu Server with a docker snap that makes troubleshooting a nightmare.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704070486 {#5104
    date: 2024-01-01 01:54:46.0 +01:00
  }
  +ip: null
  +tags: [
    "install"
  ]
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5107 …}
  +nested: Doctrine\ORM\PersistentCollection {#5109 …}
  +votes: Doctrine\ORM\PersistentCollection {#5111 …}
  +reports: Doctrine\ORM\PersistentCollection {#5113 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5115 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5117 …}
  -id: 268818
  -bodyTs: "'/engine/install/debian/#install-using-the-convenience-script).':94 '100':1 '12':86 'abus':14 'agre':2 'anyth':24 'avoid':49 'away':38 'bad':41 'bit':29 'bunch':105 'cleanest':79 'come':37,74 'contain':50 'conveni':90 'cut':16 'debian':85 'develop':33 'differ':67 'docker':5,47,60,70,89,116 'docs.docker.com':93 'docs.docker.com/engine/install/debian/#install-using-the-convenience-script).':92 'doesn':101 'easiest':81 'fast':97 'form':10 'free':99 'hassl':98 'layer':107 'like':15,110 'littl':28 'lot':65 'maintain':83 'make':119 'mouth':45 'nightmar':122 'run':63 'scenario':68 'script':91 'self':13 'self-abus':12 'server':113 'snap':117 'start':55 'tast':42 'test':31 'tofubi':4 'train':21 'troubleshoot':120 'ubuntu':112 'use':111 've':62,73 'weird':109 'window':7,59 'work':34 'wreck':22 'year':52"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6326516"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704070486 {#5105
    date: 2024-01-01 01:54:46.0 +01:00
  }
}
"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
121 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
122 DENIED moderate
App\Entity\EntryComment {#5314
  +user: App\Entity\User {#4330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5106
    +user: App\Entity\User {#4404 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4830
      +user: App\Entity\User {#4843 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1712568000 {#4825
        date: 2024-04-08 11:20:00.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4831 …}
      +nested: Doctrine\ORM\PersistentCollection {#4833 …}
      +votes: Doctrine\ORM\PersistentCollection {#4835 …}
      +reports: Doctrine\ORM\PersistentCollection {#4837 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
      -id: 267419
      -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6974052"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704033563 {#4826
        date: 2023-12-31 15:39:23.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: """
      100% agree with tofubi, Docker on Windows is a form of self-abuse, like cutting yourself. It’s a train wreck for anything other than a little bit of testing for development work. You will come away with a bad taste in your mouth about Docker, I avoided containers for years because I started with them on Windows docker.\n
      \n
      I’ve run a lot of different scenarios with docker, what I’ve come down to as the cleanest and easiest to maintain is Debian 12 with the [Docker convenience script](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script). It’s fast, hassle free, and doesn’t have a bunch of layers of weirdness like using Ubuntu Server with a docker snap that makes troubleshooting a nightmare.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704070486 {#5104
      date: 2024-01-01 01:54:46.0 +01:00
    }
    +ip: null
    +tags: [
      "install"
    ]
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5107 …}
    +nested: Doctrine\ORM\PersistentCollection {#5109 …}
    +votes: Doctrine\ORM\PersistentCollection {#5111 …}
    +reports: Doctrine\ORM\PersistentCollection {#5113 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5115 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5117 …}
    -id: 268818
    -bodyTs: "'/engine/install/debian/#install-using-the-convenience-script).':94 '100':1 '12':86 'abus':14 'agre':2 'anyth':24 'avoid':49 'away':38 'bad':41 'bit':29 'bunch':105 'cleanest':79 'come':37,74 'contain':50 'conveni':90 'cut':16 'debian':85 'develop':33 'differ':67 'docker':5,47,60,70,89,116 'docs.docker.com':93 'docs.docker.com/engine/install/debian/#install-using-the-convenience-script).':92 'doesn':101 'easiest':81 'fast':97 'form':10 'free':99 'hassl':98 'layer':107 'like':15,110 'littl':28 'lot':65 'maintain':83 'make':119 'mouth':45 'nightmar':122 'run':63 'scenario':68 'script':91 'self':13 'self-abus':12 'server':113 'snap':117 'start':55 'tast':42 'test':31 'tofubi':4 'train':21 'troubleshoot':120 'ubuntu':112 'use':111 've':62,73 'weird':109 'window':7,59 'work':34 'wreck':22 'year':52"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6326516"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704070486 {#5105
      date: 2024-01-01 01:54:46.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: """
    > for anything other than a little bit of testing for development work.\n
    \n
    It’s really awesome for development work, though. Visual Studio has built-in Docker support, so I can run my app and its unit tests on both Windows and Linux (via Docker) at the same time on the same system during development.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704071312 {#5312
    date: 2024-01-01 02:08:32.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@ikidd@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5315 …}
  +nested: Doctrine\ORM\PersistentCollection {#5317 …}
  +votes: Doctrine\ORM\PersistentCollection {#5319 …}
  +reports: Doctrine\ORM\PersistentCollection {#5321 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5323 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5325 …}
  -id: 268841
  -bodyTs: "'anyth':2 'app':34 'awesom':16 'bit':7 'built':25 'built-in':24 'develop':11,18,55 'docker':27,45 'linux':43 'littl':6 'realli':15 'run':32 'studio':22 'support':28 'system':53 'test':9,38 'though':20 'time':49 'unit':37 'via':44 'visual':21 'window':41 'work':12,19"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://upvote.au/comment/592547"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704071312 {#5313
    date: 2024-01-01 02:08:32.0 +01:00
  }
}
"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
123 DENIED edit
App\Entity\EntryComment {#5314
  +user: App\Entity\User {#4330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5106
    +user: App\Entity\User {#4404 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4830
      +user: App\Entity\User {#4843 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1712568000 {#4825
        date: 2024-04-08 11:20:00.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4831 …}
      +nested: Doctrine\ORM\PersistentCollection {#4833 …}
      +votes: Doctrine\ORM\PersistentCollection {#4835 …}
      +reports: Doctrine\ORM\PersistentCollection {#4837 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
      -id: 267419
      -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6974052"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704033563 {#4826
        date: 2023-12-31 15:39:23.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: """
      100% agree with tofubi, Docker on Windows is a form of self-abuse, like cutting yourself. It’s a train wreck for anything other than a little bit of testing for development work. You will come away with a bad taste in your mouth about Docker, I avoided containers for years because I started with them on Windows docker.\n
      \n
      I’ve run a lot of different scenarios with docker, what I’ve come down to as the cleanest and easiest to maintain is Debian 12 with the [Docker convenience script](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script). It’s fast, hassle free, and doesn’t have a bunch of layers of weirdness like using Ubuntu Server with a docker snap that makes troubleshooting a nightmare.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704070486 {#5104
      date: 2024-01-01 01:54:46.0 +01:00
    }
    +ip: null
    +tags: [
      "install"
    ]
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5107 …}
    +nested: Doctrine\ORM\PersistentCollection {#5109 …}
    +votes: Doctrine\ORM\PersistentCollection {#5111 …}
    +reports: Doctrine\ORM\PersistentCollection {#5113 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5115 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5117 …}
    -id: 268818
    -bodyTs: "'/engine/install/debian/#install-using-the-convenience-script).':94 '100':1 '12':86 'abus':14 'agre':2 'anyth':24 'avoid':49 'away':38 'bad':41 'bit':29 'bunch':105 'cleanest':79 'come':37,74 'contain':50 'conveni':90 'cut':16 'debian':85 'develop':33 'differ':67 'docker':5,47,60,70,89,116 'docs.docker.com':93 'docs.docker.com/engine/install/debian/#install-using-the-convenience-script).':92 'doesn':101 'easiest':81 'fast':97 'form':10 'free':99 'hassl':98 'layer':107 'like':15,110 'littl':28 'lot':65 'maintain':83 'make':119 'mouth':45 'nightmar':122 'run':63 'scenario':68 'script':91 'self':13 'self-abus':12 'server':113 'snap':117 'start':55 'tast':42 'test':31 'tofubi':4 'train':21 'troubleshoot':120 'ubuntu':112 'use':111 've':62,73 'weird':109 'window':7,59 'work':34 'wreck':22 'year':52"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6326516"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704070486 {#5105
      date: 2024-01-01 01:54:46.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: """
    > for anything other than a little bit of testing for development work.\n
    \n
    It’s really awesome for development work, though. Visual Studio has built-in Docker support, so I can run my app and its unit tests on both Windows and Linux (via Docker) at the same time on the same system during development.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704071312 {#5312
    date: 2024-01-01 02:08:32.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@ikidd@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5315 …}
  +nested: Doctrine\ORM\PersistentCollection {#5317 …}
  +votes: Doctrine\ORM\PersistentCollection {#5319 …}
  +reports: Doctrine\ORM\PersistentCollection {#5321 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5323 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5325 …}
  -id: 268841
  -bodyTs: "'anyth':2 'app':34 'awesom':16 'bit':7 'built':25 'built-in':24 'develop':11,18,55 'docker':27,45 'linux':43 'littl':6 'realli':15 'run':32 'studio':22 'support':28 'system':53 'test':9,38 'though':20 'time':49 'unit':37 'via':44 'visual':21 'window':41 'work':12,19"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://upvote.au/comment/592547"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704071312 {#5313
    date: 2024-01-01 02:08:32.0 +01:00
  }
}
"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
124 DENIED moderate
App\Entity\EntryComment {#5314
  +user: App\Entity\User {#4330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5106
    +user: App\Entity\User {#4404 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4830
      +user: App\Entity\User {#4843 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1712568000 {#4825
        date: 2024-04-08 11:20:00.0 +02:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@tofubl@discuss.tchncs.de"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4831 …}
      +nested: Doctrine\ORM\PersistentCollection {#4833 …}
      +votes: Doctrine\ORM\PersistentCollection {#4835 …}
      +reports: Doctrine\ORM\PersistentCollection {#4837 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
      -id: 267419
      -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6974052"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704033563 {#4826
        date: 2023-12-31 15:39:23.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: """
      100% agree with tofubi, Docker on Windows is a form of self-abuse, like cutting yourself. It’s a train wreck for anything other than a little bit of testing for development work. You will come away with a bad taste in your mouth about Docker, I avoided containers for years because I started with them on Windows docker.\n
      \n
      I’ve run a lot of different scenarios with docker, what I’ve come down to as the cleanest and easiest to maintain is Debian 12 with the [Docker convenience script](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script). It’s fast, hassle free, and doesn’t have a bunch of layers of weirdness like using Ubuntu Server with a docker snap that makes troubleshooting a nightmare.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1704070486 {#5104
      date: 2024-01-01 01:54:46.0 +01:00
    }
    +ip: null
    +tags: [
      "install"
    ]
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5107 …}
    +nested: Doctrine\ORM\PersistentCollection {#5109 …}
    +votes: Doctrine\ORM\PersistentCollection {#5111 …}
    +reports: Doctrine\ORM\PersistentCollection {#5113 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5115 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5117 …}
    -id: 268818
    -bodyTs: "'/engine/install/debian/#install-using-the-convenience-script).':94 '100':1 '12':86 'abus':14 'agre':2 'anyth':24 'avoid':49 'away':38 'bad':41 'bit':29 'bunch':105 'cleanest':79 'come':37,74 'contain':50 'conveni':90 'cut':16 'debian':85 'develop':33 'differ':67 'docker':5,47,60,70,89,116 'docs.docker.com':93 'docs.docker.com/engine/install/debian/#install-using-the-convenience-script).':92 'doesn':101 'easiest':81 'fast':97 'form':10 'free':99 'hassl':98 'layer':107 'like':15,110 'littl':28 'lot':65 'maintain':83 'make':119 'mouth':45 'nightmar':122 'run':63 'scenario':68 'script':91 'self':13 'self-abus':12 'server':113 'snap':117 'start':55 'tast':42 'test':31 'tofubi':4 'train':21 'troubleshoot':120 'ubuntu':112 'use':111 've':62,73 'weird':109 'window':7,59 'work':34 'wreck':22 'year':52"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6326516"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704070486 {#5105
      date: 2024-01-01 01:54:46.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: """
    > for anything other than a little bit of testing for development work.\n
    \n
    It’s really awesome for development work, though. Visual Studio has built-in Docker support, so I can run my app and its unit tests on both Windows and Linux (via Docker) at the same time on the same system during development.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704071312 {#5312
    date: 2024-01-01 02:08:32.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@ikidd@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5315 …}
  +nested: Doctrine\ORM\PersistentCollection {#5317 …}
  +votes: Doctrine\ORM\PersistentCollection {#5319 …}
  +reports: Doctrine\ORM\PersistentCollection {#5321 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5323 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5325 …}
  -id: 268841
  -bodyTs: "'anyth':2 'app':34 'awesom':16 'bit':7 'built':25 'built-in':24 'develop':11,18,55 'docker':27,45 'linux':43 'littl':6 'realli':15 'run':32 'studio':22 'support':28 'system':53 'test':9,38 'though':20 'time':49 'unit':37 'via':44 'visual':21 'window':41 'work':12,19"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://upvote.au/comment/592547"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704071312 {#5313
    date: 2024-01-01 02:08:32.0 +01:00
  }
}
"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
125 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
126 DENIED moderate
App\Entity\EntryComment {#5369
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5314
    +user: App\Entity\User {#4330 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5106
      +user: App\Entity\User {#4404 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4830
        +user: App\Entity\User {#4843 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 0
        +score: 0
        +lastActive: DateTime @1712568000 {#4825
          date: 2024-04-08 11:20:00.0 +02:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4831 …}
        +nested: Doctrine\ORM\PersistentCollection {#4833 …}
        +votes: Doctrine\ORM\PersistentCollection {#4835 …}
        +reports: Doctrine\ORM\PersistentCollection {#4837 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
        -id: 267419
        -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6974052"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704033563 {#4826
          date: 2023-12-31 15:39:23.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4830}
      +body: """
        100% agree with tofubi, Docker on Windows is a form of self-abuse, like cutting yourself. It’s a train wreck for anything other than a little bit of testing for development work. You will come away with a bad taste in your mouth about Docker, I avoided containers for years because I started with them on Windows docker.\n
        \n
        I’ve run a lot of different scenarios with docker, what I’ve come down to as the cleanest and easiest to maintain is Debian 12 with the [Docker convenience script](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script). It’s fast, hassle free, and doesn’t have a bunch of layers of weirdness like using Ubuntu Server with a docker snap that makes troubleshooting a nightmare.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704070486 {#5104
        date: 2024-01-01 01:54:46.0 +01:00
      }
      +ip: null
      +tags: [
        "install"
      ]
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5107 …}
      +nested: Doctrine\ORM\PersistentCollection {#5109 …}
      +votes: Doctrine\ORM\PersistentCollection {#5111 …}
      +reports: Doctrine\ORM\PersistentCollection {#5113 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5115 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5117 …}
      -id: 268818
      -bodyTs: "'/engine/install/debian/#install-using-the-convenience-script).':94 '100':1 '12':86 'abus':14 'agre':2 'anyth':24 'avoid':49 'away':38 'bad':41 'bit':29 'bunch':105 'cleanest':79 'come':37,74 'contain':50 'conveni':90 'cut':16 'debian':85 'develop':33 'differ':67 'docker':5,47,60,70,89,116 'docs.docker.com':93 'docs.docker.com/engine/install/debian/#install-using-the-convenience-script).':92 'doesn':101 'easiest':81 'fast':97 'form':10 'free':99 'hassl':98 'layer':107 'like':15,110 'littl':28 'lot':65 'maintain':83 'make':119 'mouth':45 'nightmar':122 'run':63 'scenario':68 'script':91 'self':13 'self-abus':12 'server':113 'snap':117 'start':55 'tast':42 'test':31 'tofubi':4 'train':21 'troubleshoot':120 'ubuntu':112 'use':111 've':62,73 'weird':109 'window':7,59 'work':34 'wreck':22 'year':52"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6326516"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704070486 {#5105
        date: 2024-01-01 01:54:46.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: """
      > for anything other than a little bit of testing for development work.\n
      \n
      It’s really awesome for development work, though. Visual Studio has built-in Docker support, so I can run my app and its unit tests on both Windows and Linux (via Docker) at the same time on the same system during development.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1704071312 {#5312
      date: 2024-01-01 02:08:32.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
      "@ikidd@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5315 …}
    +nested: Doctrine\ORM\PersistentCollection {#5317 …}
    +votes: Doctrine\ORM\PersistentCollection {#5319 …}
    +reports: Doctrine\ORM\PersistentCollection {#5321 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5323 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5325 …}
    -id: 268841
    -bodyTs: "'anyth':2 'app':34 'awesom':16 'bit':7 'built':25 'built-in':24 'develop':11,18,55 'docker':27,45 'linux':43 'littl':6 'realli':15 'run':32 'studio':22 'support':28 'system':53 'test':9,38 'though':20 'time':49 'unit':37 'via':44 'visual':21 'window':41 'work':12,19"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://upvote.au/comment/592547"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704071312 {#5313
      date: 2024-01-01 02:08:32.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: """
    This sounds interesting.\n
    \n
    I use docker in vscode for latex. It saves me the trouble of having to install texlive on my system. I have a task defined that mounts my sources in and runs the compilation in the container.\n
    \n
    Would love to hear about your work flow.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704099723 {#5367
    date: 2024-01-01 10:02:03.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@ikidd@lemmy.world"
    "@dan@upvote.au"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5370 …}
  +nested: Doctrine\ORM\PersistentCollection {#5372 …}
  +votes: Doctrine\ORM\PersistentCollection {#5374 …}
  +reports: Doctrine\ORM\PersistentCollection {#5376 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5378 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5380 …}
  -id: 287086
  -bodyTs: "'compil':37 'contain':40 'defin':28 'docker':6 'flow':48 'hear':44 'instal':19 'interest':3 'latex':10 'love':42 'mount':30 'run':35 'save':12 'sound':2 'sourc':32 'system':23 'task':27 'texliv':20 'troubl':15 'use':5 'vscode':8 'work':47 'would':41"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6043971"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704099723 {#5368
    date: 2024-01-01 10:02:03.0 +01:00
  }
}
"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
127 DENIED edit
App\Entity\EntryComment {#5369
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5314
    +user: App\Entity\User {#4330 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5106
      +user: App\Entity\User {#4404 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4830
        +user: App\Entity\User {#4843 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 0
        +score: 0
        +lastActive: DateTime @1712568000 {#4825
          date: 2024-04-08 11:20:00.0 +02:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4831 …}
        +nested: Doctrine\ORM\PersistentCollection {#4833 …}
        +votes: Doctrine\ORM\PersistentCollection {#4835 …}
        +reports: Doctrine\ORM\PersistentCollection {#4837 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
        -id: 267419
        -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6974052"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704033563 {#4826
          date: 2023-12-31 15:39:23.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4830}
      +body: """
        100% agree with tofubi, Docker on Windows is a form of self-abuse, like cutting yourself. It’s a train wreck for anything other than a little bit of testing for development work. You will come away with a bad taste in your mouth about Docker, I avoided containers for years because I started with them on Windows docker.\n
        \n
        I’ve run a lot of different scenarios with docker, what I’ve come down to as the cleanest and easiest to maintain is Debian 12 with the [Docker convenience script](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script). It’s fast, hassle free, and doesn’t have a bunch of layers of weirdness like using Ubuntu Server with a docker snap that makes troubleshooting a nightmare.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704070486 {#5104
        date: 2024-01-01 01:54:46.0 +01:00
      }
      +ip: null
      +tags: [
        "install"
      ]
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5107 …}
      +nested: Doctrine\ORM\PersistentCollection {#5109 …}
      +votes: Doctrine\ORM\PersistentCollection {#5111 …}
      +reports: Doctrine\ORM\PersistentCollection {#5113 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5115 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5117 …}
      -id: 268818
      -bodyTs: "'/engine/install/debian/#install-using-the-convenience-script).':94 '100':1 '12':86 'abus':14 'agre':2 'anyth':24 'avoid':49 'away':38 'bad':41 'bit':29 'bunch':105 'cleanest':79 'come':37,74 'contain':50 'conveni':90 'cut':16 'debian':85 'develop':33 'differ':67 'docker':5,47,60,70,89,116 'docs.docker.com':93 'docs.docker.com/engine/install/debian/#install-using-the-convenience-script).':92 'doesn':101 'easiest':81 'fast':97 'form':10 'free':99 'hassl':98 'layer':107 'like':15,110 'littl':28 'lot':65 'maintain':83 'make':119 'mouth':45 'nightmar':122 'run':63 'scenario':68 'script':91 'self':13 'self-abus':12 'server':113 'snap':117 'start':55 'tast':42 'test':31 'tofubi':4 'train':21 'troubleshoot':120 'ubuntu':112 'use':111 've':62,73 'weird':109 'window':7,59 'work':34 'wreck':22 'year':52"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6326516"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704070486 {#5105
        date: 2024-01-01 01:54:46.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: """
      > for anything other than a little bit of testing for development work.\n
      \n
      It’s really awesome for development work, though. Visual Studio has built-in Docker support, so I can run my app and its unit tests on both Windows and Linux (via Docker) at the same time on the same system during development.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1704071312 {#5312
      date: 2024-01-01 02:08:32.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
      "@ikidd@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5315 …}
    +nested: Doctrine\ORM\PersistentCollection {#5317 …}
    +votes: Doctrine\ORM\PersistentCollection {#5319 …}
    +reports: Doctrine\ORM\PersistentCollection {#5321 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5323 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5325 …}
    -id: 268841
    -bodyTs: "'anyth':2 'app':34 'awesom':16 'bit':7 'built':25 'built-in':24 'develop':11,18,55 'docker':27,45 'linux':43 'littl':6 'realli':15 'run':32 'studio':22 'support':28 'system':53 'test':9,38 'though':20 'time':49 'unit':37 'via':44 'visual':21 'window':41 'work':12,19"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://upvote.au/comment/592547"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704071312 {#5313
      date: 2024-01-01 02:08:32.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: """
    This sounds interesting.\n
    \n
    I use docker in vscode for latex. It saves me the trouble of having to install texlive on my system. I have a task defined that mounts my sources in and runs the compilation in the container.\n
    \n
    Would love to hear about your work flow.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704099723 {#5367
    date: 2024-01-01 10:02:03.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@ikidd@lemmy.world"
    "@dan@upvote.au"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5370 …}
  +nested: Doctrine\ORM\PersistentCollection {#5372 …}
  +votes: Doctrine\ORM\PersistentCollection {#5374 …}
  +reports: Doctrine\ORM\PersistentCollection {#5376 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5378 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5380 …}
  -id: 287086
  -bodyTs: "'compil':37 'contain':40 'defin':28 'docker':6 'flow':48 'hear':44 'instal':19 'interest':3 'latex':10 'love':42 'mount':30 'run':35 'save':12 'sound':2 'sourc':32 'system':23 'task':27 'texliv':20 'troubl':15 'use':5 'vscode':8 'work':47 'would':41"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6043971"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704099723 {#5368
    date: 2024-01-01 10:02:03.0 +01:00
  }
}
"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
128 DENIED moderate
App\Entity\EntryComment {#5369
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5314
    +user: App\Entity\User {#4330 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5106
      +user: App\Entity\User {#4404 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4830
        +user: App\Entity\User {#4843 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "I had been running Nextcloud on an old laptop using Ubuntu, but that machine died. I have a Windows PC originally built for gaming that I am considering using for Nextcloud. Anyone have any experience with NC and Windows? Thought on the DB switch on Windows?"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 0
        +score: 0
        +lastActive: DateTime @1712568000 {#4825
          date: 2024-04-08 11:20:00.0 +02:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@tofubl@discuss.tchncs.de"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4831 …}
        +nested: Doctrine\ORM\PersistentCollection {#4833 …}
        +votes: Doctrine\ORM\PersistentCollection {#4835 …}
        +reports: Doctrine\ORM\PersistentCollection {#4837 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4839 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4841 …}
        -id: 267419
        -bodyTs: "'anyon':32 'built':22 'consid':28 'db':43 'die':15 'experi':35 'game':24 'laptop':9 'machin':14 'nc':37 'nextcloud':5,31 'old':8 'origin':21 'pc':20 'run':4 'switch':44 'thought':40 'ubuntu':11 'use':10,29 'window':19,39,46"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6974052"
        +editedAt: null
        +createdAt: DateTimeImmutable @1704033563 {#4826
          date: 2023-12-31 15:39:23.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4830}
      +body: """
        100% agree with tofubi, Docker on Windows is a form of self-abuse, like cutting yourself. It’s a train wreck for anything other than a little bit of testing for development work. You will come away with a bad taste in your mouth about Docker, I avoided containers for years because I started with them on Windows docker.\n
        \n
        I’ve run a lot of different scenarios with docker, what I’ve come down to as the cleanest and easiest to maintain is Debian 12 with the [Docker convenience script](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script). It’s fast, hassle free, and doesn’t have a bunch of layers of weirdness like using Ubuntu Server with a docker snap that makes troubleshooting a nightmare.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1704070486 {#5104
        date: 2024-01-01 01:54:46.0 +01:00
      }
      +ip: null
      +tags: [
        "install"
      ]
      +mentions: [
        "@tofubl@discuss.tchncs.de"
        "@SecurityPro@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5107 …}
      +nested: Doctrine\ORM\PersistentCollection {#5109 …}
      +votes: Doctrine\ORM\PersistentCollection {#5111 …}
      +reports: Doctrine\ORM\PersistentCollection {#5113 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5115 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5117 …}
      -id: 268818
      -bodyTs: "'/engine/install/debian/#install-using-the-convenience-script).':94 '100':1 '12':86 'abus':14 'agre':2 'anyth':24 'avoid':49 'away':38 'bad':41 'bit':29 'bunch':105 'cleanest':79 'come':37,74 'contain':50 'conveni':90 'cut':16 'debian':85 'develop':33 'differ':67 'docker':5,47,60,70,89,116 'docs.docker.com':93 'docs.docker.com/engine/install/debian/#install-using-the-convenience-script).':92 'doesn':101 'easiest':81 'fast':97 'form':10 'free':99 'hassl':98 'layer':107 'like':15,110 'littl':28 'lot':65 'maintain':83 'make':119 'mouth':45 'nightmar':122 'run':63 'scenario':68 'script':91 'self':13 'self-abus':12 'server':113 'snap':117 'start':55 'tast':42 'test':31 'tofubi':4 'train':21 'troubleshoot':120 'ubuntu':112 'use':111 've':62,73 'weird':109 'window':7,59 'work':34 'wreck':22 'year':52"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6326516"
      +editedAt: null
      +createdAt: DateTimeImmutable @1704070486 {#5105
        date: 2024-01-01 01:54:46.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4830}
    +body: """
      > for anything other than a little bit of testing for development work.\n
      \n
      It’s really awesome for development work, though. Visual Studio has built-in Docker support, so I can run my app and its unit tests on both Windows and Linux (via Docker) at the same time on the same system during development.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1704071312 {#5312
      date: 2024-01-01 02:08:32.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
      "@SecurityPro@lemmy.ml"
      "@ikidd@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5315 …}
    +nested: Doctrine\ORM\PersistentCollection {#5317 …}
    +votes: Doctrine\ORM\PersistentCollection {#5319 …}
    +reports: Doctrine\ORM\PersistentCollection {#5321 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5323 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5325 …}
    -id: 268841
    -bodyTs: "'anyth':2 'app':34 'awesom':16 'bit':7 'built':25 'built-in':24 'develop':11,18,55 'docker':27,45 'linux':43 'littl':6 'realli':15 'run':32 'studio':22 'support':28 'system':53 'test':9,38 'though':20 'time':49 'unit':37 'via':44 'visual':21 'window':41 'work':12,19"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://upvote.au/comment/592547"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704071312 {#5313
      date: 2024-01-01 02:08:32.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4830}
  +body: """
    This sounds interesting.\n
    \n
    I use docker in vscode for latex. It saves me the trouble of having to install texlive on my system. I have a task defined that mounts my sources in and runs the compilation in the container.\n
    \n
    Would love to hear about your work flow.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704099723 {#5367
    date: 2024-01-01 10:02:03.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@SecurityPro@lemmy.ml"
    "@ikidd@lemmy.world"
    "@dan@upvote.au"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5370 …}
  +nested: Doctrine\ORM\PersistentCollection {#5372 …}
  +votes: Doctrine\ORM\PersistentCollection {#5374 …}
  +reports: Doctrine\ORM\PersistentCollection {#5376 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5378 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5380 …}
  -id: 287086
  -bodyTs: "'compil':37 'contain':40 'defin':28 'docker':6 'flow':48 'hear':44 'instal':19 'interest':3 'latex':10 'love':42 'mount':30 'run':35 'save':12 'sound':2 'sourc':32 'system':23 'task':27 'texliv':20 'troubl':15 'use':5 'vscode':8 'work':47 'would':41"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6043971"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704099723 {#5368
    date: 2024-01-01 10:02:03.0 +01:00
  }
}
"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
129 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
130 DENIED moderate
App\Entity\EntryComment {#4904
  +user: App\Entity\User {#4917 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I’m going to try this next week. My nextcloud instance is getting a bit sluggish lately."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704032757 {#4899
    date: 2023-12-31 15:25:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4905 …}
  +nested: Doctrine\ORM\PersistentCollection {#4907 …}
  +votes: Doctrine\ORM\PersistentCollection {#4909 …}
  +reports: Doctrine\ORM\PersistentCollection {#4911 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4913 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4915 …}
  -id: 267400
  -bodyTs: "'bit':15 'get':13 'go':3 'instanc':11 'late':17 'm':2 'next':7 'nextcloud':10 'sluggish':16 'tri':5 'week':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.institute/comment/1885420"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704032757 {#4900
    date: 2023-12-31 15:25:57.0 +01:00
  }
}
"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
131 DENIED edit
App\Entity\EntryComment {#4904
  +user: App\Entity\User {#4917 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I’m going to try this next week. My nextcloud instance is getting a bit sluggish lately."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704032757 {#4899
    date: 2023-12-31 15:25:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4905 …}
  +nested: Doctrine\ORM\PersistentCollection {#4907 …}
  +votes: Doctrine\ORM\PersistentCollection {#4909 …}
  +reports: Doctrine\ORM\PersistentCollection {#4911 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4913 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4915 …}
  -id: 267400
  -bodyTs: "'bit':15 'get':13 'go':3 'instanc':11 'late':17 'm':2 'next':7 'nextcloud':10 'sluggish':16 'tri':5 'week':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.institute/comment/1885420"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704032757 {#4900
    date: 2023-12-31 15:25:57.0 +01:00
  }
}
"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
132 DENIED moderate
App\Entity\EntryComment {#4904
  +user: App\Entity\User {#4917 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I’m going to try this next week. My nextcloud instance is getting a bit sluggish lately."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1704032757 {#4899
    date: 2023-12-31 15:25:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4905 …}
  +nested: Doctrine\ORM\PersistentCollection {#4907 …}
  +votes: Doctrine\ORM\PersistentCollection {#4909 …}
  +reports: Doctrine\ORM\PersistentCollection {#4911 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4913 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4915 …}
  -id: 267400
  -bodyTs: "'bit':15 'get':13 'go':3 'instanc':11 'late':17 'm':2 'next':7 'nextcloud':10 'sluggish':16 'tri':5 'week':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.institute/comment/1885420"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704032757 {#4900
    date: 2023-12-31 15:25:57.0 +01:00
  }
}
"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
133 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
134 DENIED moderate
App\Entity\EntryComment {#4977
  +user: App\Entity\User {#4990 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Heads up, you can also get postgress to use a socket and mount that through for another speedup if you haven’t already"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1710108054 {#4972
    date: 2024-03-10 23:00:54.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4978 …}
  +nested: Doctrine\ORM\PersistentCollection {#4980 …}
  +votes: Doctrine\ORM\PersistentCollection {#4982 …}
  +reports: Doctrine\ORM\PersistentCollection {#4984 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4986 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4988 …}
  -id: 267385
  -bodyTs: "'alreadi':23 'also':5 'anoth':17 'get':6 'haven':21 'head':1 'mount':13 'postgress':7 'socket':11 'speedup':18 'use':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6318622"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704032414 {#4973
    date: 2023-12-31 15:20:14.0 +01:00
  }
}
"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
135 DENIED edit
App\Entity\EntryComment {#4977
  +user: App\Entity\User {#4990 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Heads up, you can also get postgress to use a socket and mount that through for another speedup if you haven’t already"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1710108054 {#4972
    date: 2024-03-10 23:00:54.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4978 …}
  +nested: Doctrine\ORM\PersistentCollection {#4980 …}
  +votes: Doctrine\ORM\PersistentCollection {#4982 …}
  +reports: Doctrine\ORM\PersistentCollection {#4984 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4986 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4988 …}
  -id: 267385
  -bodyTs: "'alreadi':23 'also':5 'anoth':17 'get':6 'haven':21 'head':1 'mount':13 'postgress':7 'socket':11 'speedup':18 'use':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6318622"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704032414 {#4973
    date: 2023-12-31 15:20:14.0 +01:00
  }
}
"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
136 DENIED moderate
App\Entity\EntryComment {#4977
  +user: App\Entity\User {#4990 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Heads up, you can also get postgress to use a socket and mount that through for another speedup if you haven’t already"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1710108054 {#4972
    date: 2024-03-10 23:00:54.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4978 …}
  +nested: Doctrine\ORM\PersistentCollection {#4980 …}
  +votes: Doctrine\ORM\PersistentCollection {#4982 …}
  +reports: Doctrine\ORM\PersistentCollection {#4984 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4986 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4988 …}
  -id: 267385
  -bodyTs: "'alreadi':23 'also':5 'anoth':17 'get':6 'haven':21 'head':1 'mount':13 'postgress':7 'socket':11 'speedup':18 'use':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6318622"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704032414 {#4973
    date: 2023-12-31 15:20:14.0 +01:00
  }
}
"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
137 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
138 DENIED moderate
App\Entity\EntryComment {#5054
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4977
    +user: App\Entity\User {#4990 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Heads up, you can also get postgress to use a socket and mount that through for another speedup if you haven’t already"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1710108054 {#4972
      date: 2024-03-10 23:00:54.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4978 …}
    +nested: Doctrine\ORM\PersistentCollection {#4980 …}
    +votes: Doctrine\ORM\PersistentCollection {#4982 …}
    +reports: Doctrine\ORM\PersistentCollection {#4984 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4986 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4988 …}
    -id: 267385
    -bodyTs: "'alreadi':23 'also':5 'anoth':17 'get':6 'haven':21 'head':1 'mount':13 'postgress':7 'socket':11 'speedup':18 'use':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6318622"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704032414 {#4973
      date: 2023-12-31 15:20:14.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4977}
  +body: "Yeah, I saw that but wanted to take it step by step as not to break everything all at once. 😉"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1704034566 {#5053
    date: 2023-12-31 15:56:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Static_Rocket@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5061 …}
  +nested: Doctrine\ORM\PersistentCollection {#5064 …}
  +votes: Doctrine\ORM\PersistentCollection {#5066 …}
  +reports: Doctrine\ORM\PersistentCollection {#5068 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5070 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5072 …}
  -id: 267453
  -bodyTs: "'break':16 'everyth':17 'saw':3 'step':10,12 'take':8 'want':6 'yeah':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6030489"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704034566 {#5056
    date: 2023-12-31 15:56:06.0 +01:00
  }
}
"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
139 DENIED edit
App\Entity\EntryComment {#5054
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4977
    +user: App\Entity\User {#4990 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Heads up, you can also get postgress to use a socket and mount that through for another speedup if you haven’t already"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1710108054 {#4972
      date: 2024-03-10 23:00:54.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4978 …}
    +nested: Doctrine\ORM\PersistentCollection {#4980 …}
    +votes: Doctrine\ORM\PersistentCollection {#4982 …}
    +reports: Doctrine\ORM\PersistentCollection {#4984 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4986 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4988 …}
    -id: 267385
    -bodyTs: "'alreadi':23 'also':5 'anoth':17 'get':6 'haven':21 'head':1 'mount':13 'postgress':7 'socket':11 'speedup':18 'use':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6318622"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704032414 {#4973
      date: 2023-12-31 15:20:14.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4977}
  +body: "Yeah, I saw that but wanted to take it step by step as not to break everything all at once. 😉"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1704034566 {#5053
    date: 2023-12-31 15:56:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Static_Rocket@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5061 …}
  +nested: Doctrine\ORM\PersistentCollection {#5064 …}
  +votes: Doctrine\ORM\PersistentCollection {#5066 …}
  +reports: Doctrine\ORM\PersistentCollection {#5068 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5070 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5072 …}
  -id: 267453
  -bodyTs: "'break':16 'everyth':17 'saw':3 'step':10,12 'take':8 'want':6 'yeah':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6030489"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704034566 {#5056
    date: 2023-12-31 15:56:06.0 +01:00
  }
}
"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
140 DENIED moderate
App\Entity\EntryComment {#5054
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4977
    +user: App\Entity\User {#4990 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Heads up, you can also get postgress to use a socket and mount that through for another speedup if you haven’t already"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1710108054 {#4972
      date: 2024-03-10 23:00:54.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4978 …}
    +nested: Doctrine\ORM\PersistentCollection {#4980 …}
    +votes: Doctrine\ORM\PersistentCollection {#4982 …}
    +reports: Doctrine\ORM\PersistentCollection {#4984 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4986 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4988 …}
    -id: 267385
    -bodyTs: "'alreadi':23 'also':5 'anoth':17 'get':6 'haven':21 'head':1 'mount':13 'postgress':7 'socket':11 'speedup':18 'use':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6318622"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704032414 {#4973
      date: 2023-12-31 15:20:14.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4977}
  +body: "Yeah, I saw that but wanted to take it step by step as not to break everything all at once. 😉"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1704034566 {#5053
    date: 2023-12-31 15:56:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Static_Rocket@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5061 …}
  +nested: Doctrine\ORM\PersistentCollection {#5064 …}
  +votes: Doctrine\ORM\PersistentCollection {#5066 …}
  +reports: Doctrine\ORM\PersistentCollection {#5068 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5070 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5072 …}
  -id: 267453
  -bodyTs: "'break':16 'everyth':17 'saw':3 'step':10,12 'take':8 'want':6 'yeah':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://discuss.tchncs.de/comment/6030489"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704034566 {#5056
    date: 2023-12-31 15:56:06.0 +01:00
  }
}
"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
141 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
142 DENIED moderate
App\Entity\EntryComment {#5076
  +user: App\Entity\User {#4330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4977
    +user: App\Entity\User {#4990 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Heads up, you can also get postgress to use a socket and mount that through for another speedup if you haven’t already"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1710108054 {#4972
      date: 2024-03-10 23:00:54.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4978 …}
    +nested: Doctrine\ORM\PersistentCollection {#4980 …}
    +votes: Doctrine\ORM\PersistentCollection {#4982 …}
    +reports: Doctrine\ORM\PersistentCollection {#4984 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4986 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4988 …}
    -id: 267385
    -bodyTs: "'alreadi':23 'also':5 'anoth':17 'get':6 'haven':21 'head':1 'mount':13 'postgress':7 'socket':11 'speedup':18 'use':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6318622"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704032414 {#4973
      date: 2023-12-31 15:20:14.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4977}
  +body: "You can use UNIX sockets with MySQL or MariaDB too."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704071136 {#5074
    date: 2024-01-01 02:05:36.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Static_Rocket@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5077 …}
  +nested: Doctrine\ORM\PersistentCollection {#5079 …}
  +votes: Doctrine\ORM\PersistentCollection {#5081 …}
  +reports: Doctrine\ORM\PersistentCollection {#5083 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5085 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5087 …}
  -id: 268830
  -bodyTs: "'mariadb':9 'mysql':7 'socket':5 'unix':4 'use':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://upvote.au/comment/592543"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704071136 {#5075
    date: 2024-01-01 02:05:36.0 +01:00
  }
}
"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
143 DENIED edit
App\Entity\EntryComment {#5076
  +user: App\Entity\User {#4330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4977
    +user: App\Entity\User {#4990 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Heads up, you can also get postgress to use a socket and mount that through for another speedup if you haven’t already"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1710108054 {#4972
      date: 2024-03-10 23:00:54.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4978 …}
    +nested: Doctrine\ORM\PersistentCollection {#4980 …}
    +votes: Doctrine\ORM\PersistentCollection {#4982 …}
    +reports: Doctrine\ORM\PersistentCollection {#4984 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4986 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4988 …}
    -id: 267385
    -bodyTs: "'alreadi':23 'also':5 'anoth':17 'get':6 'haven':21 'head':1 'mount':13 'postgress':7 'socket':11 'speedup':18 'use':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6318622"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704032414 {#4973
      date: 2023-12-31 15:20:14.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4977}
  +body: "You can use UNIX sockets with MySQL or MariaDB too."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704071136 {#5074
    date: 2024-01-01 02:05:36.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Static_Rocket@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5077 …}
  +nested: Doctrine\ORM\PersistentCollection {#5079 …}
  +votes: Doctrine\ORM\PersistentCollection {#5081 …}
  +reports: Doctrine\ORM\PersistentCollection {#5083 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5085 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5087 …}
  -id: 268830
  -bodyTs: "'mariadb':9 'mysql':7 'socket':5 'unix':4 'use':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://upvote.au/comment/592543"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704071136 {#5075
    date: 2024-01-01 02:05:36.0 +01:00
  }
}
"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
144 DENIED moderate
App\Entity\EntryComment {#5076
  +user: App\Entity\User {#4330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "selfhosted@lemmy.world"
      +title: "selfhosted"
      +description: """
        A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
        \n
        Rules:\n
        \n
        - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
        - No spam posting.\n
        - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
        - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
        - No trolling.\n
        \n
        Resources:\n
        \n
        - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
        - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
        - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
        \n
        &gt; Any issues on the community? Report it using the report flag.\n
        \n
        &gt; Questions? DM the mods!
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 222
      +entryCommentCount: 3916
      +postCount: 0
      +postCommentCount: 0
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729582735 {#276
        date: 2024-10-22 09:38:55.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 120
      +apId: "selfhosted@lemmy.world"
      +apProfileId: "https://lemmy.world/c/selfhosted"
      +apPublicUrl: "https://lemmy.world/c/selfhosted"
      +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
      +apInboxUrl: "https://lemmy.world/inbox"
      +apDomain: "lemmy.world"
      +apPreferredUsername: "selfhosted"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1703473826 {#270
        date: 2023-12-25 04:10:26.0 +01:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1703473826 {#272
        date: 2023-12-25 04:10:26.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +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 {#2410
      date: 2024-04-08 18:49:09.0 +02:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -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 {#1850
      date: 2024-07-06 20:55:46.0 +02:00
    }
    +createdAt: DateTimeImmutable @1704031666 {#2420
      date: 2023-12-31 15:07:46.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4977
    +user: App\Entity\User {#4990 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Heads up, you can also get postgress to use a socket and mount that through for another speedup if you haven’t already"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1710108054 {#4972
      date: 2024-03-10 23:00:54.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@tofubl@discuss.tchncs.de"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4978 …}
    +nested: Doctrine\ORM\PersistentCollection {#4980 …}
    +votes: Doctrine\ORM\PersistentCollection {#4982 …}
    +reports: Doctrine\ORM\PersistentCollection {#4984 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4986 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4988 …}
    -id: 267385
    -bodyTs: "'alreadi':23 'also':5 'anoth':17 'get':6 'haven':21 'head':1 'mount':13 'postgress':7 'socket':11 'speedup':18 'use':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6318622"
    +editedAt: null
    +createdAt: DateTimeImmutable @1704032414 {#4973
      date: 2023-12-31 15:20:14.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4977}
  +body: "You can use UNIX sockets with MySQL or MariaDB too."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1704071136 {#5074
    date: 2024-01-01 02:05:36.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@tofubl@discuss.tchncs.de"
    "@Static_Rocket@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5077 …}
  +nested: Doctrine\ORM\PersistentCollection {#5079 …}
  +votes: Doctrine\ORM\PersistentCollection {#5081 …}
  +reports: Doctrine\ORM\PersistentCollection {#5083 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5085 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5087 …}
  -id: 268830
  -bodyTs: "'mariadb':9 'mysql':7 'socket':5 'unix':4 'use':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://upvote.au/comment/592543"
  +editedAt: null
  +createdAt: DateTimeImmutable @1704071136 {#5075
    date: 2024-01-01 02:05:36.0 +01:00
  }
}
"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
145 DENIED edit
App\Entity\Magazine {#266
  +icon: Proxies\__CG__\App\Entity\Image {#247 …}
  +name: "selfhosted@lemmy.world"
  +title: "selfhosted"
  +description: """
    A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.\n
    \n
    Rules:\n
    \n
    - Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.\n
    - No spam posting.\n
    - Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.\n
    - Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).\n
    - No trolling.\n
    \n
    Resources:\n
    \n
    - [awesome-selfhosted software](https://github.com/awesome-selfhosted/awesome-selfhosted)\n
    - [awesome-sysadmin](https://github.com/awesome-foss/awesome-sysadmin) resources\n
    - [Self-Hosted Podcast from Jupiter Broadcasting](https://selfhosted.show)\n
    \n
    &gt; Any issues on the community? Report it using the report flag.\n
    \n
    &gt; Questions? DM the mods!
    """
  +rules: null
  +subscriptionsCount: 1
  +entryCount: 222
  +entryCommentCount: 3916
  +postCount: 0
  +postCommentCount: 0
  +isAdult: false
  +customCss: null
  +lastActive: DateTime @1729582735 {#276
    date: 2024-10-22 09:38:55.0 +02:00
  }
  +markedForDeletionAt: null
  +tags: null
  +moderators: Doctrine\ORM\PersistentCollection {#238 …}
  +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
  +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
  +entries: Doctrine\ORM\PersistentCollection {#181 …}
  +posts: Doctrine\ORM\PersistentCollection {#139 …}
  +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
  +bans: Doctrine\ORM\PersistentCollection {#118 …}
  +reports: Doctrine\ORM\PersistentCollection {#104 …}
  +badges: Doctrine\ORM\PersistentCollection {#82 …}
  +logs: Doctrine\ORM\PersistentCollection {#72 …}
  +awards: Doctrine\ORM\PersistentCollection {#61 …}
  +categories: Doctrine\ORM\PersistentCollection {#1820 …}
  -id: 120
  +apId: "selfhosted@lemmy.world"
  +apProfileId: "https://lemmy.world/c/selfhosted"
  +apPublicUrl: "https://lemmy.world/c/selfhosted"
  +apFollowersUrl: "https://lemmy.world/c/selfhosted/followers"
  +apInboxUrl: "https://lemmy.world/inbox"
  +apDomain: "lemmy.world"
  +apPreferredUsername: "selfhosted"
  +apDiscoverable: true
  +apManuallyApprovesFollowers: null
  +privateKey: null
  +publicKey: null
  +apFetchedAt: DateTime @1703473826 {#270
    date: 2023-12-25 04:10:26.0 +01:00
  }
  +apDeletedAt: null
  +apTimeoutAt: null
  +visibility: "visible             "
  +createdAt: DateTimeImmutable @1703473826 {#272
    date: 2023-12-25 04:10:26.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS DENIED
"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