Nextcloud Snap users, please list the issues you're facing

Actually, I am not really aware of the limitations. Regarding to the official guide, there seem to be none. How does the snap compare to the official VM? Would the VM be more flexible? Thanks, by the way.

The VM is much more flexible and comes with more apps. The snap puts Nextcloud on a read-only partition and cant be integrated with some tools like Collabora Online or Nextant.

1 Like

Snap on Ubuntu Server installs in, wellā€¦ , a snap! Iā€™ve had no issues getting it up and running.

Iā€™m still tinkering with a manual install on a NC Box.

It installs easily, no doubt. Question was more about how does it run once installed. Seems to have a lot of limitations.

I have Nextcloud Snap running on my Pi3 with Ubuntu Core. Everything works fine on my local network, but Iā€™d like to set up dynamic DNS so I can access my Nextcloud over the internet. The curl command is not installed in Ubuntu Core by default, so cron jobs that use curl donā€™t work. Iā€™ve installed the consul snap and healthcheck-tool-box example snap, which has the curl command, but I havenā€™t figured out how to get the snaps to talk to one another.

So just for my understanding againā€¦ when using the Snap, we are unable to install any plugins because the snap directories are not writable from ā€œthe outsideā€?

Is there a complete list of all limitations/restrictions of the Snap?

No, you can install apps from the app store, but these canā€™t used external services such as Spreed, Solr or Collabora Online.
The main limitations are:

  • No tuning of Apache, PHP or MYSQL configurations
  • Rolling releases
  • No advanced features such as SMB or LDAP

i donā€™t know how to troubleshoot my problem with my nextcloud box. since a couple of days it just stopped working - iā€™m unable to access it through browser, caldav sync (thunderbird) or nextcloud sync client (linux desktop and mobile). davdroid on android says ā€œ500 internal server errorā€. however, i can still ssh into the box, and have updated repositories and upgraded the available packages.

i started a thread, hopefully in the right subsection?

Hi. I have installed nextcloud as snap and it is very easy. It only took me a few minutes with ssl configured. You need the ports 80 and 443 free before, so you should have configured your ports in apache if you run another services.

The files of user are in /var/snap/nextcloud/common/nextcloud/data/. But I need to configure the files in other partition. If I can not to modify the apache configuration, how can I do this?

Okā€¦ so my box crashed. Donā€™t ask me why I was not there. However taking the SD card out and fscking it on another machine seemed to do the trick but left me with loads of nextcloud errors. So I left it while I had other things to do. I login today and wowā€¦ Nextcloud was updated automatically and no more errors! Neat. That is the advantaged of snaps I guess.

However, I am still a little perturbed I cannot install tinc via snaps in fact there seem to be no real progress on snap development at all for things like duplicity or anything else to sync backups with,

Is it just me or has development on the nextcloud box stalled? I still donā€™t see an official RPi3 image and wondering what the hell is taking the time. I mean I explained how I installed it on a RPi3 so you cannot tell me it cannot be done. So why is everyone dragging their feet?

I am having mixed feelings about the nextcloud box now. I was under the impression it was under active development. Now it is feeling a bit more like an after thought.

Themes and Email Templates. The only theme listed is ā€œexampleā€ and I can edit the HTML but get an error when trying to save it. - ā€œCould Not Create Directoryā€ (thatā€™s because it is a read only file system)

Also, how do you back up the Nextcloud Snap?
Canā€™t rsync the read only file system.

Is anyone working on Nextcloud Snap specific documentation
(things do work a bit differently when installed as a snap)

Moving an existing Letā€™s Encrypt Certificate

My Nextcloud is running fine using the snap. A Letā€™s Encrypts Certificate was easily obtained with help of the nextcloud.enable-https script.

Itā€™s for the moment a theoretical question, but I am curious nonetheless.

How to move and reuse an existing Letā€™s Encrypt Certificate from a snap to a new fresh nextcloud snap environment?

  • Use somehow the custom option of the nextcloud.enable-https script ?
  • Simply copy the certficiate data from var/snap/nextcloud/current/certs/certbot/config to the same folder at the new snap environment and run the nextcloud.enable-https script with the lets-encrypt option ?
  • Something else ?

snap.nextcloud.apache.service failed to start any idea how to fix tried the following:

reboot
disabled and re-enabled snap.nextcloud.apache.service
restarted snap.nextcloud.apache.service
stopped and started snap.nextcloud.apache.service just encase reboot and restart was too fast.

Hi,
I get this error when entering sudo snap install nextcloud :

error: cannot communicate with server: Post http://localhost/v2/snaps/nextcloud: dial unix /run/snapd.socket: connect: no such file or directory

File encryption

Hi there ! Iā€™ve tried to encrypt my files as I would do in a non-snap install but I discovered that,although no I have no error messages, the files are not encrypted (nor on external storage, nor on home directory (when activated).
I guess, itā€™s probably due to the fact that the snap installation changes the location of the datas.
Has someone else experienced this ?

EDIT : 24/10 : Everything is actually working for the files uploaded after the enabling of encryption as written in the fine manual

@Oddyza enabling encryption in the Nextcloud snap works for me. Iā€™m confused by your mentioning the ā€œhome directoryā€ though. Why would the snap be putting anything there? Are you talking about syncing?

Note that once you enable encryption, it only matters for files you upload afterward-- it does nothing with the files that are already there.

@kyrofa you are right : everything is working. Confusion came from the fact that encryption was enabled after the server was loaded with user files. My mistake.
(home directory was a bad and unhappy shortcut to refer to files on the nextcloud server and not external)

The nextcloud snap renders its own update impossible, because the MySQL database fills all available disk space.
Recently, I wondered, why my nextcloud snap does not update to the recent version. It turned out that snapd tried to do the update but failed. Investigation of the problem showed, that snapd always keeps the last three versions of the snap on disk (including the data below /var/snap/ā€¦). During update of the snap the contents of the current directory get copied (I saw the ā€œcpā€ command running in top).
The mysql database of my nextcloud snap is 19GB. It turned out that on my root partition there was only 2,2 GB of empty space.
The solution seemed clear: extend root partition to have at least 19GB of free space, so that the snap could be copied during update. Thatā€™s what I did. I shrank ā€œ/homeā€ and increased ā€œ/ā€ to have about 30GB of free space. The snap successfully upgraded to the last version after that.

All well? Well, not. After the update I saw ā€œmysqldā€ running wild on my disk. The process ran for about two days, then stopped and guess what now? Thereā€™s again only 2,2 GB of free space on my root partition. The database filled up all of the disk space I added! Since thereā€™s now only 2,2 GB of space, the next update of the nextcloud snap will inevitably fail again, and thereā€™s nothing I can do. I canā€™t add disk space with each update.

This seems like a serious problem with the nextcloud snap.
How can I change the MySQL config to not eat up all disk space??

Yikes, how much data do you have? My Nextcloud snap instance is managing over 1TB of data and my entire MySQL directory is 312MB.

Youā€™re right that snapd keeps three backups for rollback capability. However, if you feel comfortable only having the current one and the one before, you can ask snapd to remove specific revisions (e.g. the oldest one you have) like this:

$ sudo snap remove nextcloud --revision <revision>

Hi Kyle,
thanks for your answer ā€“ thatā€™s important information for me. I donā€™t have a second nextcloud instance to compare to, so itā€™s important to know that 19 GB database size (20 GB as of today) is wrong. I have tried to investigate the cause of the problem and highly appreciate help & ideas. Hereā€™s what I found:

  • My nextcloud used to manage roughly 1TB of data, most of them located on external storage (external disks attached to my server).

  • External storage was included through nextcloudā€™s ā€œexternal storageā€ app as ā€œLocalā€.

  • The mysql database is located on my root device below /var/snap/nextcloud/current/ā€¦

  • I have found that almost all of the 20GB is located in a single table, the file cache:

    root@helge:~# ls -lh /var/snap/nextcloud/current/mysql/nextcloud/oc_filecache.*
    -rw-r----- 1 root root 21K Jan 8 2017 /var/snap/nextcloud/current/mysql/nextcloud/oc_filecache.frm
    -rw-r----- 1 root root 19G Nov 27 15:17 /var/snap/nextcloud/current/mysql/nextcloud/oc_filecache.ibd

  • This file seems to grow and grow, but never shrinks.

  • I have since removed all external storage from my nextcloud instance:

    root@helge:~# nextcloud.occ files_external:list --all
    No mounts configured

  • The data managed by my nextcloud instance is now only 4,3 GB (compared to 1 TB before). Surely this should reduce the file cache?

  • I have called ā€œfiles:scanā€ and ā€œfiles:cleanupā€, but to no effect:

    root@helge:~# nextcloud.occ files:cleanup
    0 orphaned file cache entries deleted

Hereā€™s something I donā€™t understand: there should be thousands of orphaned entries now that most of the data is gone!

=> I suspect that my file cache table is somehow broken, but I donā€™t know how to fix it. I believe I should clear the table and reproduce it, but I do not know how to do that. I am not well versed with databases. Can you assist me with that?

Help & comments appreciated,
cheers, RĆ¼diger