Please log a bug against the snap and we can troubleshoot over there.
I have an issue with using Apache to proxy to the Nextcloud Snap. As far as I know, when setting up the proxy via virtualhosts I need to know the documentroot for the Nextcloud Snap which I cannot seem to find. Any advice or sample proxy setup config? Canât seem to find any info on the nets with using a proxy to a snap.
Hi,
Fresh install of Nextcloud snap (13.0.2) on Ubuntu 18.04. I have a Dev server and a production server. On the Dev server, I enabled server-side encryption and clicked to encrypt the local storage. Logged in with a user, created a txt file and confirmed on the FreeNAS backend that the file content is encrypted. Because encryption is only for new / modified files, that would not fit for the production server.
I followed the procedure to get the module to encrypt all files with the occ command. The procedure says to put server in maintenance mode before running the encryption.
1-I needed a fix to put the Nextcloud in maintenance mode
The occ command is not enough and a restart of php-fpm is required for entering / leaving maintenance mode.
2-Once in maintenance, the command failed
It complained that, because of the maintenance mode, no module was loaded. That included the encryption module that was not loaded. Indeed, an occ command to list all encryption modules returned an empty list.
3-Did work out of maintenance mode
Put back the Dev server out of maintenance mode and re-run the encrypt-all command. It worked and retro-actively encrypted all existing files (very few because it is test only).
I can not do that on the production server. Encrypt-all must work while in maintenance modeâŚ
Commands involved :
nextcould.occ maintenance:mode --on
snap restart nextcloud.php-fpm
nextcloud.occ encryption:encrypt-all
nextcloud.occ encryption:list-modules
Sorry if this is misplaced, I canât track down my SSL certs. Iâve googled and looked where theyâre saying they are and canât find them. I need to copy (probably symlink) to them for my bitwarden server on the same domain. I installed it using the sudo nextcloud.enable-https lets-encrypt
option.
No tuning of Apache, PHP or MYSQL configurations
For example PicoCMS canât work with a snap install as it requires Apache config changes
Hi,
I recently started experimenting with Nextcloud. Iâm running Nextcloud 13.0.6snap1 on ubuntu 18.04 base, with MYSQL database and S3 Object storage
Iâve noticed that using a snap I see the following things
-
Occasional apache user errors,
[unixd:alert] [pid 26374:tid 140264660563840] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
-
PHP errors
Stack trace:
#0 /snap/nextcloud/8971/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
#1 /snap/nextcloud/8971/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /snap/nextcloud/8971/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /snap/nextcloud/8971/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /snap/nextcloud/8971/htdocs/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /snap/nextcloud/8971/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct( in /snap/nextcloud/8971/htdocs/lib/private/DB/Connection.php on line 64
[26-Sep-2018 13:53:43 UTC] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused in /snap/nextcloud/8971/htdocs/lib/private/DB/Connection.php:64
- Adding multiple tags on files that were opened recently causes the the a long CPU spike in mysqld and php-fm processes, reproducibility 80%
Iâm getting the following error message on Nextcloud Box v13.0.7.
ResourceLocator can not find a web root (root: /var/snap/nextcloud/9570/nextcloud/extra-apps/calendar, file: index.php/css/calendar/e34c-ec1a-app.min.css, webRoot: , throw: true)
and also calendar sync stopped working on one phone (SailfishOS) but not the other (Android). First I thought the issue was with SailfishOS, but now Iâm not so sure, since a delete & re-add of the calender did not make any difference. And when I saw the above mentioned error message I also noted that the Nextcloud version is 13.0.7 and started wondering, could an update have caused the failed calendar sync?
Iâm on a raspberry pi b3
itâs running raspian (I think itâs debian stretch or something like that)
Everything was going just fine until i was prompted by webpage updater to update to 13.07.
After updating (by clicking âupdateâ in web updater) all access to NC died, including access by client on desktop
I can access the box no problem via ssh, however, the rest is dead.
I have tried:
- purging snapd
- removing/reinstalling nextcloud snap many times, using different channels like --edge
- I did sudo rpi-update
- I also did sudo apt update in main OS
I have this issue too:
So I did this:
- changed from this in root.ini
socket=/tmp/sockets/mysql.sock
and changing to this:
socket=/var/snap/nextcloud/current/mysql/mysql.sock
(didnât fix that issue either).
Iâm totally lost. I have white screen of death if I try to access box from .local or via web.
One very interesting thing to me is that I cannot do the nextcloud.occ commands at all
I really wanted to try this one:
If I start typing them and press tab, the system knows they are there and autofills. But even if I use SUDO or even sudo -s to try to execute the command it returns a âcommand not foundâ message. This is very strange to me.
Iâm willing to try whatever at this point.
My only next step is a complete re-install but i didnât back up files of user stuff so the pain of this will be large. Iâm willing thoughâŚ
Thanks very much folks.
Itâs great that LDAP is supported in the SNAP install, but a huge oversight that it is not possible to specify a private root certificate.
Word to the wise: I committed a serious error in snap, and hereâs what I did to come back from it.
I originally installed Nextcloud 14 from the 14/candidate channel with the command:
snap install --channel=candidate/14 nextcloud
Then I wanted to see if any security updates could be had by trying to refresh the snap manually, not understanding that these updates (called âAuto-Refreshesâ) happen automatically! With snap, there is no such equivalent to âapt-get update && apt-get upgradeâ.
So I stupidly ran the command:
snap refresh --stable nextcloud
âŚwhich effectively downgraded my Nextcloud 14 to 13 (and the snap command doesnât tell you what the before-and-after versions of Nextcloud are, it just successfully completes the command, with rather poor verbosity)! I was not warned that I was effectively about to do something stupid, namely the downgrade from 14 to 13 (and I would have appreciated a suggestion that I might want to cancel that idea before continuing on). Then Nextcloud was left totally unusable. So next I ran the command:
snap revert nextcloud
âŚwhich reverted back to 14. Then Nextcloud worked again as before. Whew! But I was not out of the woods yet. Then snapdâs âAuto-Refreshâ feature âhelpfullyâ âupgradedâ me back to 13, not long after (as the âchannelâ was still set to âstableâ)! So Nextcloud magically stopped working again. I wanted to strangle Mark Shuttleworth very badly at that time!
So I ran the command:
snap install --channel=candidate/14 nextcloud
âŚagain, to try to set the channel back to 14/candidate. Sorry, no can do, as itâs already installed!
Here is the magical command which fixed it all. After doing another âsnap revert nextcloudâ (to get back to 14) you have to run:
snap switch --channel=14/candidate nextcloud
Also helpful were the commands:
snap changes
âŚwhich revealed that the âAuto-Refreshesâ were happening (which kept automatically downgrading my Nextcloud to 13, behind my back), as well as:
snap list --all
âŚwhich showed me how I had both Nextcloud 14 and 13 installed at once (and 14 got âdisabledâ, and could be potentially be reverted to, after a downgrade to 13). It was here where I eventually realized I needed to get the âTrackingâ column to be set back to â14/candidateâ, not âstableâ, for the ânextcloudâ line.
I also removed the disabled Nextcloud 13 snap (as a final cleanup step) with the command:
snap remove --revision=9868 nextcloud
How did I know that Rev 9868 needed to be removed? Because that was the âRevâ listed for Nextcloud 13 in the âsnap list --allâ command.
I see the following error message in my logging app (in the setting) several times a day:
ResourceLocator can not find a web root (root: /var/snap/nextcloud/9868/nextcloud/extra-apps/spreed, file: index.php/css/spreed/73df-4cab-autocomplete.css, webRoot: , throw: true)
I have the following snaps installed on my server
$ snap list
Name Version Rev Tracking Publisher Notes
core 16-2.36.1 5897 stable canonicalâ core
nextcloud 13.0.7snap2 9868 stable nextcloudâ -
spreedme 0.29.5snap1 22 stable nextcloudâ -
What if we want to use Nextcloud Talk within a Nextcloud snap, complete with a coturn TURN server?
I have questions about using a turnserver (coturn) with the Nextcloud snap, on the same server (this is to try to get Nextcloud Talk working the best). Has anyone done this before? If the Nextcloud snap were to talk to the coturn server, wouldnât that need some special port âplumbingâ added to the snap, to enable the intercommunication between the two?
Furthermore, if one wants to use SSL with the coturn server, then one will want to use the certbot SSL certificate files (cert.pem and privkey.pem) that got generated within the snap, but the pathname leading into the snap is not necessarily a constant thing (or is it?), as itâs got an integer that might change, as the snap periodically upgrades itself. For example, my nextcloud lives within:
/snap/nextcloud/[5_digit_integer_here]
Itâs kind of sounding like the coturn server needs to be on a different server than the Nextcloud snap, and have itâs own ssl certificate. Or maybe coturn itself eventually could be bundled into the snap, in case users want to use Nextcloud Talk with their snap.
Snap or not should not make a difference.
Note that Nextcloud Talk and the TURN server do not talk âdirectlyâ each other. The users WebRTC clients (e.g. browser, Android app) use the TURN server information from Nextcloud Talk settings to connect remotely to coturn. So as long as both are reachable from the web, itâs fine.
Of course if you have coturn within snap, it needs to be reachable via chosen/configured port. Since I never used snap, you know better than me how to make it listen to/forward a certain port.
A non-snap coturn accessing SSL cert within snap sounds wrong to me. You already mentioned the issue with non-constant path. I suggest you either find a coturn snap then, or create cert files outside of snap.
Fairly recently certbot has gained the ability to do wildcard SSL certs (thereby allowing two SSL certs for the same Nextcloud server, the coturn server using a domain name like âturn.yournextcloudserver.comâ), however this doesnât seem to be packaged nicely for Debian 9 yet. A second SSL cert for the coturn server could perhaps be generated using this obscure howto (but Iâve never tried it).
You can as well simply duplicate the certs from certbot. Just needs to be redone, when they are renewed.
AFAIK, self-signed certificates work as well. But not 100% sure if all browsers and such connect well then without complaining about the non-trusted cert.
Iâm in Gallery Slideshow/Preview Generator app trouble on my Nextcloud 14/stable server. Please see here for more info.
In summary, I canât figure out how to properly run the âPreview Generatorâ appâs â/snap/bin/nextcloud.occ preview:generate-allâ on the command lineâŚ
Edit: I merely rebooted the server, and it all seems to work OK now.
Request: when Letâs Encrypt generates SSL certificates within the snap, could the actual privkey.pem and cert.pem files be stored outside the snap (say, under /etc/certbot or something like that), in case any other services installed on the same Nextcloud server might also want to use SSL encryption?
Two possible examples of this:
- Running a TURN server (for use in conjunction with Nextcloud Talk)
- Running a mail server (where you want SSL on your IMAP, and SMTP submission ports), say from a docker container like this one.
I installed NC via SNAP/Ubuntu 18.04 yesterday and everything was working as expected. Today my site is throwing an HTTP 500 ERROR, and I cannot figure out why. I did not make any changes, but did upload some files via the mobile app this morning (which I see exist in the data directory).
When I look in the logs and elsewhere by running OCC commands (which arnt working) I see messages like the below. My newb brain thinks it looks like a problem with the database. Running php -m I cannot find mysql or other modules Iâm would expect were included in the SNAP package. Nor sure how it would have worked before without these. Any advice on this matter would be appreciated.
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /snap/nextcloud/10791/htdocs/lib/private/DB/Connection.php:64
Files stopped syncing. When checked the web page, it turns out it is a forced update to version 15.0.2 as seen in the ss.
When clicked on to âstart updateâ, it results in error. The last repair step is to âextract the vcard uid and store it in the dbâ.
Then it puts itself into maintenance mode until I restart the snap, in which case it starts over from the âstart updateâ page. How to troubleshoot?
What I could find is that the line in the logs below that repair step is about memory limits.
{âreqIdâ:âXshGdYhMa5PsodOS2q3pâ,âlevelâ:1,âtimeâ:â2019-02-11T08:59:39+00:00â,âremoteAddrâ:ââ,âuserâ:âââ,âappâ:âupdaterâ,âmethodâ:ââ,âurlâ:âââ,âmessageâ:â\OC\Repair::step: Repair step: Extract the vcard uid and store it in the dbâ,âuserAgentâ:âââ,âversionâ:â14.0.6.0â}
{âreqIdâ:âXshGdYhMa5PsodOS2q3pâ,âlevelâ:3,âtimeâ:â2019-02-11T08:59:41+00:00â,âremoteAddrâ:ââ,âuserâ:âââ,âappâ:âPHPâ,âmethodâ:ââ,âurlâ:âââ,âmessageâ:âAllowed memory size of 134217728 bytes exhausted (tried to allocate 217088 bytes) at /snap/nextcloud/11343/htdocs/3rdparty/sabre/vobject/lib/Parser/MimeDir.php#319â,âuserAgentâ:âââ,âversionâ:â14.0.6.0â}
Also, it says âneedsDbUpgrade:trueâ in the nextcloud status. So maybe it is relevant.
A little bit of a ânoobâ here. Have installed nextcloud snap (15 edge currently but have been working on stable version as well) on an old macbook air (1,1) with Ubuntu server (18.04) with an external disk which I have working (although itâs a little moody) and I have figured out how to add files and folders directly (ie. an hour or two) rather than uploading them (days) via the nextcloud client (which anyway seems to have its own issues) but I am having problems working out how to get nextcloud to acknowledge that theyâre there and make them available for clients. I have tried various incarnations of;
sudo -u www-data nextcloud.occ files:scan --all
but it seems to run into folder permission issues - âcannot create user data directory ⌠permission deniedâ.
Reading up a little on this page it would seem that this might be an issue with the snap and to get this working Iâd have to reinstall without using the snap. Is that correct or is there a way around this?