this post was submitted on 10 Sep 2023
88 points (90.0% liked)

Selfhosted

39997 readers
875 users here now

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.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

So far my experience with Nextcloud has been that it is a pain in the arse to install, and once it's installed is slow as anything. Literally couldn't run it on my pi 3b, now got it up and running pretty nicely on a NUC but it's still not great. Have caching set up.

I have the notes app installed on my android phone and I can never used rich text editing because it gives timeout error.

This shouldn't be this complicated. All I want is to de-Google my documents and notes, and self-host my kanban. I don't really need the rest though it's nice to have the options.

Do people use alternatives? Am I doing something completely wrong? I set it up using nginx which I know is not supported, but the alternative using Docker AIO didn't allow me to use custom port easily.

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 28 points 1 year ago (1 children)

I seriously suggest you give Nextcloud another go, this time under Docker. Very simple to do.

Save the following in a new folder as docker-compose.yml

version: '3'

volumes:
  db:

services:

  nextcloud-app:
    image: nextcloud
    container_name: nextcloud-app
    restart: always
    volumes:
      - ./data:/var/www/html
    environment:
      - MYSQL_PASSWORD=changeme
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=nextcloud-db
    ports:
      - "80:80"
    links:
      - nextcloud-db

  nextcloud-db:
    image: mariadb
    container_name: nextcloud-db
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=changeme
      - MYSQL_PASSWORD=changeme
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

run this command in the folder -

docker-compose up -d

open http://localhost

[–] [email protected] 2 points 1 year ago (2 children)

Is the mariadb a default part of nextcloud? I've seen posts saying to use a separate db so things can be backed up easier, so I was wondering if that's how you have it set up above.

[–] [email protected] 8 points 1 year ago

In this setup the DB is not part of Nextcloud. Both are running in separate services aka containers, which can be administrated independently from each other.

[–] [email protected] 4 points 1 year ago

No you can use other databases. It is separate here

[–] [email protected] 18 points 1 year ago (1 children)

I suspect nextcloud having performance issues with slow Disk IO. With rootless containers I had a much worse performance than rootfull. Also using MySQL Backend instead of SQLite did speedup the performance.

Nevertheless I have the same problems with nextcloud as you stated. Pretty much not as usable as I thought.

[–] [email protected] 5 points 1 year ago (3 children)

It's on a SATA drive, albeit hard drive not ssd and I'm using mariadb. Everybody seems to suggest I need a beefier server but as a developer myself, the functionality of the software doesn't seem to warrant anything more powerful.

[–] TechAdmin 12 points 1 year ago* (last edited 1 year ago)

Software config optimizations help a little bit but my biggest improvement was moving the DB to SSD. Spinning disks are great for capacity but not for DB performance. Random I/O is a big factor for them and those drives drop in performance so fast for that type of I/O due to physically spinning media.

I started out using Owncloud and later switched to Nextcloud once that fork was stable. For all my uses it has always needed beefy hardware to run well but I definitely have way more junk files in synced folders than I should & rarely clean things up.

[–] [email protected] 4 points 1 year ago

Try moving the database at least on a SSD, and enable Redis caching.

[–] [email protected] 1 points 1 year ago (5 children)

How much memory? I think nextcloud wants around 8gb to run happily (ymmv). I've tried it with smaller sizes and ran into issues.

[–] [email protected] 3 points 1 year ago (1 children)

Yes I have 8gb of ram, but it seems insane that it needs that much considering what it is doing.

load more comments (1 replies)
load more comments (4 replies)
[–] [email protected] 15 points 1 year ago (5 children)

Just want to say that I've been there. There was a time my Nextcloud install was incredibly slow. Fortunately (or unfortunately?), it is featureful enough and widely supported that once you figure this issue out, it is a nice service to keep running.

For me, adding Redis was essential. It doesn't really make sense to me why (nothing I do on Nextcloud is intensive or data heavy) but it has greatly improved the performance of my app.

My entire setup is a containerized Nextcloud, Nextcloud Cron, MariaDB (if I knew Postgres was an option, I would've chosen that), and Redis:

version: '2'
services:
  nextcloud:
    container_name: nextcloud
    image: nextcloud:27-apache
    restart: unless-stopped
    environment:
      - MYSQL_PASSWORD=nextcloud
      - MYSQL_HOST=db
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
    labels:
      - 'public-service=true'
      - 'traefik.enable=true'
      - 'traefik.http.routers.cloud.rule=Host(`nextcloud.some.domain`)'
      - 'traefik.http.routers.cloud.tls=true'
      - 'traefik.http.services.cloud.loadbalancer.server.port=80'
    volumes:
      - /some/data/dir/nextcloud/data:/var/www/html
      - /some/external/dir:/wew:ro

  nextcloud-cron:
    image: nextcloud:27-apache
    restart: unless-stopped
    command: [/cron.sh]
    environment:
      - MYSQL_HOST=db
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=nextcloud
    volumes:
      - /some/data/dir/nextcloud/data:/var/www/html
      - /some/external/dir/:/wew:ro

  db:
    image: mariadb:10.4
    restart: unless-stopped
    environment:
      MYSQL_DATABASE: nextcloud
      MYSQL_USER: nextcloud
      MYSQL_ROOT_PASSWORD: nextcloud
    volumes:
      - /some/data/dir/nextcloud/db:/var/lib/mysql

  mysqldump:
    image: mariadb:10.4
    depends_on: [db]
    # restart: never # cronjob
    labels:
      - 'cron.schedule=0 0 8 * * ?'
    entrypoint: [mysqldump, -h, db, -u, nextcloud, -pnextcloud, --all-databases, -r, /out/nextcloud.sql]
    user: root
    volumes:
      - /some/data/dir/nextcloud/db-dump:/out

  redis:
    image: redis
    restart: unless-stopped
[–] [email protected] 6 points 1 year ago (1 children)

For what it's worth you can convert the database to postgres if you want. I tried it out a few weeks ago and went flawlessly.

https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/db_conversion.html

load more comments (1 replies)
[–] [email protected] 4 points 1 year ago (1 children)

Yes, redis should be part of the standard install. Not doing it is just setting yourself up for disappointment.

Also I believe postgress has better performance than mariadb so no reason not to use that if you are setting it up from scratch.

[–] icedterminal 3 points 1 year ago

Pg has significantly better performance in a smaller self hosted environment. Notably because you're doing a balance of reading and writing, or mostly writing since data changes regularly. For large scale operations where reading data is the primary use, MariaDB/MySQL is faster.

[–] [email protected] 3 points 1 year ago (1 children)

How is NC using redis? I can't see any links from the NC container

[–] [email protected] 4 points 1 year ago (1 children)

I configured it in config.php directly, probably following https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html#id2

  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'redis',
    'port' => 6379,
  ),
load more comments (1 replies)
load more comments (2 replies)
[–] [email protected] 14 points 1 year ago

Nextcloud is not easy to setup, that´s right, but it is not this complicated. Use Postgres as database, it is faster than MySQL. Install Redis as Cache and configure PHP Cache too. This will speedup the most. I use nextcloud installed directly on the host, no docker. Another small guide is here for Postgres and Apache

[–] [email protected] 7 points 1 year ago (1 children)

For speed Seafile absolutely smokes Nextcloud.

If you create an account they'll give a pro license (limited to 3 users) for free. Or you can stick with the always free community edition which works great too.

[–] [email protected] 4 points 1 year ago

I use Syncthing for my files, I don't need a Web ui so it's great and handles huge directories easily.

[–] [email protected] 6 points 1 year ago (1 children)

I'm my experience, nextcloud is quite I/O bound. The performance of your storage device will greatly affect nextcloud performance. But if you're already using SSD and the performance still bad, maybe there are other issues with your setup.

[–] [email protected] 2 points 1 year ago (1 children)

For me, speed isn't the only issue. Everything about nc seems to be cobbled together in the most inconvenient way possible. Updates have always been hit or miss for me - and if you choose to use dockerized versions, you might as well shoot yourself, everything is very slow, even as the only use having it running on a quite capable machine it feels sluggish (not slow, but uncomfortably delayed).

It's a glorified Dropbox clone, why do I need anything more than a rpi1 for that?

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (4 children)

It's a PHP app inherited from owncloud so at some point you'll just have to accept it won't be as performant as apps written in compiled languages (and it also inherit owncloud's quirks and other annoyance related to its php-based deployment). But this weakness is actually a strength too, being a php app makes extending its functionality very easy, resulting in a lot of community-developed plugins. Basically a trade-off between performance and features + community plugins availability. If you value performance more and don't need anything beyond file sharing feature, there are plenty of other options right now.

load more comments (4 replies)
[–] [email protected] 6 points 1 year ago

I have nextcloud running on docker on a Raspberry Pi 4 and I'd say the performance is comparable to Onedrive web interface. If you're getting timeouts then something must be wrong with the setup, not the machine it's running on. Using Postgres instead of MySQL or using an SSD instead of HDD is not going to help your issue.

[–] [email protected] 5 points 1 year ago (1 children)

I have had issues with nextcloud breaking randomly every time ive tried it. The thing I wanted the most was the caldav/webdav to integrate with Gnome and Davx5 (and finally kill google calender), and to get that I tried Owncloud instead. The UI leaves a lot to be desired but if you only use the *dav functionality it works like a charm. It also has a mobile app for syncing and several extensions but I havent delved into them.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

If you only need cardav/caldav functionality, Radicale provides just that. Can be deployed as a container and works flawlessly with DAVx5.

[–] [email protected] 5 points 1 year ago (1 children)

Nextcloud is hard to install in manual way (even sometimes with Docker). As far I know, both Snap and Yunohost versions of Nextcloud are solid. I used Snap version on the cheapest Linode VPS, and it worked fine, especially when I doubled the SWAP to 1 GB. Now I use Yunohost version and I have only good time with it. It is super stable, fast and reliable. I used Nextcloud_ynh on HP 800 Mini G3 with i5-6500t and now on Asrock Mini PC with Ryzen 7 5700g. It is working just great.

If you don't want to use Nextcloud, you ca install Vikunja for kanban and tasks. For notes Hedgedoc can be great.

[–] [email protected] 2 points 1 year ago

+1 for Yunohost. I've never yet been able to figure out docker. Yunohost has kept me happy for years.

[–] [email protected] 4 points 1 year ago (2 children)

I run Nextcloud, its responsive and has all my stuff in it. Notes, Calendar, Contacts, Kanboard, Photos, RSS reader, others. You do need look at the setup, how many PHP processes are you running, how much memory does MySQL use.

My current setup is a a PHP vm, 6 cores and 8GB of memory and a MySQL vm that is 2 cores and 8GB memory. But I work for a SaaS provider and thats now we carve up our systems, a vm/instance for 1 job.

load more comments (2 replies)
[–] [email protected] 4 points 1 year ago (2 children)

Nginx is supported and a good choice. What database are you using? I’d recommend MariaDB.

[–] [email protected] 5 points 1 year ago

Nginx alone will not speed up Nextcloud. Use Postgres instead of MySQL and configure Redis and PHP Cache. This will speed up most. And Nginx is not officially support, see here

[–] [email protected] 1 points 1 year ago (1 children)

The documentation says nginx is not officially supported: https://docs.nextcloud.com/server/19/admin_manual/installation/nginx.html

I am using mariadb

[–] [email protected] 1 points 1 year ago

Ah right, sorry; the company doesn’t support it directly but the docs provide an example. To me as tinkerer that was solid enough 😂😅

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
AP WiFi Access Point
HTTP Hypertext Transfer Protocol, the Web
NUC Next Unit of Computing brand of Intel small computers
RPi Raspberry Pi brand of SBC
SATA Serial AT Attachment interface for mass storage
SBC Single-Board Computer
SSD Solid State Drive mass storage
VPS Virtual Private Server (opposed to shared hosting)
nginx Popular HTTP server

7 acronyms in this thread; the most compressed thread commented on today has 6 acronyms.

[Thread #125 for this sub, first seen 10th Sep 2023, 09:45] [FAQ] [Full list] [Contact] [Source code]

[–] [email protected] 4 points 1 year ago (1 children)

Pydio and Seafile are alternatives I've tried. Pydio was pretty fast too. I agree with you on Nextcloud, I want to like it but I inevitably start having issues and it's slow even after tuning. It just tries to do too much and shouldn't be that complex to spin up a file server.

[–] [email protected] 3 points 1 year ago

To be honest I'm not interested in the file sharing side of nextcloud as I use Syncthing, I'm more interested in the utilities (eg notes, kanban) and the office capabilities. I want to replace gsuite

[–] NeoNachtwaechter 3 points 1 year ago (1 children)

I guess you are doing something very wrong if you have such performance trouble all the time.

The Pi (up to 4) is known for bad disk I/O. Look into this area first.

I am running my nc on a weak old low power deskop CPU (and with real SATA harddisks) and only when I ask for long running jobs (like, create the previews and icons for 200 new photos) I can watch any slow responses at all.

[–] [email protected] 2 points 1 year ago (1 children)

I'm not using a Pi, I'm using a j4125 based mini computer, which has made a big difference but the performance just still is not good enough.

load more comments (1 replies)
[–] [email protected] 3 points 1 year ago

I've also had nothing but troubles with NC. I tried the AIO option and while it was easier to setup, it was still slow on both a VPS and my local unRAID server. I find that if you're simply using it as a sync point for apps instead of regularly using the web portal, it's ok. Seafile is insanely fast. But it stores the data in chunks on the server which some do not like as it can complicate backups. I work around that by just backing up from one of my always on clients since the seadrive client mounts the chunks into usable format. That works great.

Then again, NC is way more app than I need.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

Go for the AllinOne (AIO) Installation! Had huge performance issues first (Nextcloudpi Docker & normal Nextcloud Docker) and none with the current install.

You get a self servicing (updates/installation/etc.) docker install with backups and administration portal.

[–] [email protected] 1 points 1 year ago (1 children)

From the instructions it looked like anything other than the default ports is not supported in AIO. I want to host other sites on this server without much complication.

[–] [email protected] 3 points 1 year ago (1 children)

So use a reverse proxy like Nginx Proxy Manager

load more comments (1 replies)
[–] vegetaaaaaaa 2 points 1 year ago
[–] [email protected] 1 points 1 year ago

cryptpad si quite good

[–] [email protected] 1 points 1 year ago

For Kanban I use wekan, because it has more features. Nextcloud I host using snap, which I cannot 100% recommend because it sometimes has troubles upgrading to the latest version. Still, for me it causes less trouble than a manual install.

load more comments
view more: next ›