NextCloud 11 ready Raspbian image with extras

FYI, I just did an ncp-update ( at 16:00UTC) and was told 0.13 was the latest. Not that it matters to me as NCP is working perfectly.

Edit to add: Yes, I think itā€™s valuable to have an external disk format option.

Yeah, I am sorry, I made a mistake. v0.14.0 is on the devel branch, so that is why v0.13.0 is the last one available.

The one where the wifi fix took place was v0.10.1. link

It is true that it is a bit hard to see the versions on github if you donā€™t know where they are.

You can look in the Release section for a listing of the versions. If you click the three dot icon [ā€¦] you can see the notes for that version.

Then, you can also see all the notes together at the Commits section, but there they donā€™t come associated to the version. That would be an improvement.

Iā€™ll retest the wifi issue, but it worked for me last time.

@Mattias @Jeffery_Frederick thx, I will probably implement that soon

So,

I read your recommendations and tried some tweaks, but it seems like I canā€™t get the ports on my network forwarded. I do everything right, as explained in the routerā€™s manual, but when I check them I get connection timed out. It happens to when I try to enable letsencrypt tooā€¦

It looks like itā€™s a problem Iā€™ll have to solve with my ISP, so I decided to just use it on my local network. After the first install, which was slow, Iā€™ve reinstalled it twice and now I canā€™t connect to it. I enter the local IP then I get connection not secure, I create an exception rule in my browser, but when I get to the NextCloud screen it says the domain is untrusted and if I click to add as trusted domain, bam: Unable to connect.

I really donā€™t know where to go from here. I canā€™t find the config file it says I should edit. Could someone please help?

Thanks a lot.

EDIT: removed unnecessary info and gave some more detail.

You need to be able to forward ports, in order to access from outside. Also for letā€™s encrypt, or you will have to add a permanent exception.

If your trusted domain stopped working, that means that you have changed your IP at some point since booting, or your ethernet cable was not connected when you turned the RPi on. Any details on this?

Did you do any network setup in your Raspberry Pi? NextCloudPi tries to configure your trusted domain for you.

Can you paste the output of

ip address

and

ip route

You can try two things in order to configure the trusted domain

  • sudo systemctl start nextcloud-domain should work for you, if it doesnā€™t,
  • write down the Raspberry Pi local IP, imagine it is 192.168.1.15 and type

cd /var/www/nextcloud sudo -u www-data php occ config:system:set trusted_domains 1 --value=192.168.1.15

Apparently port forwarding is not working. I called my ISP and the guy did something there and asked me to wait half an hour, but it didnā€™t work, so Iā€™ll have to phone them again.

EDIT
Some further info: Now my ISP says if I want to open ports Iā€™ll have to pay for an enterprise plan, BUT, I just tried to configure a p2p application that needs opened ports to work properly and does a test during install to see how it goes. The same port forwarding procedure worked for the specific port where this application is listening, but not for the ones NCPi needs, which makes me think about two possibilities:
1- thereā€™s nothing listening on ports 80 and 443 on my NextcloudPi install, and so I get closed ports when testing;
2- my ISP blocks these two ports (80 and 443 - I tried opening 8080 too, no luck).

Regarding 1, is there a test I can do to make sure this isn't the issue?
Regarding 2, can I - and if yes how - do I change the ports NCPi uses?

END OF EDIT

Yes, it changed, but I reconfigured accordingly. It wasnā€™t working before anyway. The only thing I got working was my very first install, and still it was slow and not accessible from outside (my first post here in this thread). I donā€™t know what I had done then that it worked, because all my following installs donā€™t even work in this ā€œslow and local-onlyā€ state.

Iā€™m sorry. Iā€™m not sure what you mean here. I did some configurations on nextcloudpi-config and raspi-config. Letsencrypt doesnā€™t work, but I set up no-ip and dns masking (as suggested by you) there.

Here you go

ip address:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:83:88:c9 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.12/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 2804:14d:5c35:abd7::7/128 scope global deprecated noprefixroute dynamic
valid_lft 13446sec preferred_lft 0sec
inet6 2804:14d:5c35:abd7:7f40:eb60:edc1:c0e3/64 scope global noprefixroute dynamic
valid_lft 86382sec preferred_lft 71982sec
inet6 fe80::47d0:fcb2:d784:bd78/64 scope link
valid_lft forever preferred_lft forever

and ip route:
default via 192.168.0.1 dev eth0 metric 202
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.12 metric 202

systemctl gave no output, which Iā€™m assuming itā€™s ok, but sudo -u www-data etc. says occ doesnā€™t exist. However I did manage to edit the config file indicated on the ā€œadd trusted domainā€ NC screen and added my RPi local IP to trusted domains . Now instead of not being able to load, what I get is a totally blank page on my browserā€¦

P.S.1: If I could just get it to work locally, no external access, it would be already very handy for me, but not even that is working.

P.S.2: I donā€™t know if this is intentional, but it seems that some things in the nextcloudpi-config application get broken if you change your Piā€™s (host) name. If you want more info on this, let me know and Iā€™ll do another check to give you the precise points where it fails.

Wow, run away from that ISP if it does not let you open ports.

You can try changing the port in

/etc/apache2/sites-enabled/nextcloud.conf

See the line

<VirtualHost _default_:443>

This is the HTTPS port. You probably will also have to tweak other files, such as the redirection from port 80. If you get stuck, I suggest you google for ā€œapache virtual hosts portā€

I think I know what is happening. Are you trying to access by IP? or by hostname? did you setup dnsmasq? Try accessing by IP and see if it works. https://192.168.0.12 should work for you.

The blank page problem usually means that you have moved the database to a USB drive that goes to standby mode. Try reading this thread

Run pgrep mysql and read the post. If it still does not work, write there so we can follow each thing separatedly

Very interested. Please, report anything you find here

Thanks for the feedback

1 Like

I had some personal stuff going on these days and couldnā€™t work on it. I plan to do it on the weekend, but before I go further, some clarifications:

It seems the ports are opened for the other p2p application. It is working fine. Any ideas if this can be something related specifically to ports 80 and 443 or if this is an application-dependent situation?

I did set up dnsmasq, but actually Iā€™m always using the local IP address. Anyway, I get the same results either way.

Unfortunately thatā€™s not the case. While I couldnā€™t get it to work minimally, I havenā€™t tried anything else, like moving the database etc. Currently everything is on the SD cardā€¦

Well, that is strange.

Now NCP is able to open your router ports for you provided you have UPnP activated in your router. You might wanna try that to be sure. Update first ( sudo ncp-update ) and then try from nextcloudpi-config

If your ISP blocks port 443, then just use another one, such as 4433.

Try the pgrep command to see if your database is running. Read the github link from last post also.

Before everything else: did you know that ownyourbits.com is down? It has been down another night this last week too.

So, regarding NextCloudPi, here is where Iā€™m at now:

  • Did a new install (I promise when I finish this Iā€™ll do an install on a spare RPi just to check those things that get broken when you change default user info)
  • disabled Force https before even trying to connect to NextCloud - now I can connect inside my network (and my browser with HTTPS everywhere installed complains about it, but ok)
  • enabled DNS mask with a No-IP domain - it works, so I can connect both through this domain and the local IP
  • used the port-forwarding tool provided in nextcloudpi-config - I had already manually forwarded port 443 (and also 4433), but it isnā€™t seen as open by online test tools
  • tried to enable letā€™s encrypt: as always, I got stuck. Hereā€™s the output:

Launching letsencrypt
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for [MY.DOMAIN]
Waiting for verificationā€¦
Cleaning up challenges
Failed authorization procedure. [MY.DOMAIN] (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Timeout

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: [MY.DOMAIN]
    Type: connection
    Detail: Timeout

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If youā€™re using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

  • Your account credentials have been saved in your Certbot
    configuration directory at /etc/letsencrypt. You should make a
    secure backup of this folder now. This configuration directory will
    also contain certificates and private keys obtained by Certbot so
    making regular backups of this folder is ideal.
    System config value trusted_domains => 4 set to string [MY.DOMAIN]

Hi,

I know! The hosting company was bought this week by another company and the migration has beenā€¦ troublesome. I am sorry about that

You can see if the port forwarding tool worked for you by accessing from outside your house on that port ( for instance, disable wifi on your phone and access from there ).

Regarding letā€™s encryptā€¦ you will have to investigate the DNS challenge. The method used by nextcloudpi only works for port 443, so if you are using another port for HTTPS you will have to do it manually.

See https://github.com/nextcloud/nextcloudpi/issues/43

Thank you!

By the way, the site is up again. Iā€™m checking these suggestions of you.

I just found this comment on your post about Letā€™s Encrypt. I suspect this may be my case too. Iā€™ll try to figure out how to do what you told the guy to do:

grphx says:
May 6, 2017 at 12:01 am

Apparently my ISP blocks port 80 and 443, which is understandable for a residential internet provider. I can just port forward external port 9000 to internal port 443 and then go to website.com:9000 but I cannot enter website.com:9000 when trying to configure letsencrypt.

Is there a better way to enable https so I donā€™t get the ā€œuntrusted domainā€ error message?

nachoparker says:	
May 6, 2017 at 1:55 pm

You will have to manually run letsencrypt and investigate how to specify the port. Sorry I am on vacation on my phone, but I am sure there has to be a parameter

Run ./letsencrypt --help in the /etc/letsencrypt folder and look for the option to specify port, or google your problem.

Weā€™re up again!! xD

Well, in my opinion, it is not understandable to block certain ports. It goes against internet neutrality. Also you pay for internet access, so whatever you do with X download bandwith and Y download bandwidth is solely your business. You pay for bandwidth, you donā€™t have to justify to your ISP how you use your bytes.

My advice isā€¦ run away from that provider.

I certainly was not able to investigate the message that you quote when I was away, but as of today I can tell you that letā€™s encrypt is not going to work for you on any port other than 443 unless you do it manually though the DNS challenge mechanism, according to what I have read.

Please, check the following issue for all the information

Yes, itā€™s not that simple to switch providers, but I surely want to do it. It was the guy who wrote the comment that said it was understandable. I donā€™t think this is correct eitherā€¦

Iā€™m checking the link you posted. Thanks!

If Iā€™m able to run this NC instance locally for now, it will be already very useful to me. Itā€™s a bit slow now - Iā€™ve already switched the power supply and it still is slow. Iā€™ll wait a bit to see if itā€™s just a matter of caching some things when running it for the first time.

lol I read that wrong

anyhow, that is how I feel about these things.

The first time it is slower, but only the first time. It does not get very fast anywayā€¦ thatā€™s something that will hopefully get better wit each release

In the meantime, the only thing that we can do is to get a more powerful ARM board

1 Like

Well well, here I am again and here is the state things are for me. Iā€™m starting to feel bad about bothering so much, but it seems like NCPi simply wonā€™t work for me, while we know it works for other people just fineā€¦

The installation is working locally and I had to disable ForceHTTPS to achieve it.

I used port 449 instead of 443 and it works from the outside if I enter ā€œmyPublicIPā€:449. Still, I have a dynamic IP so l need but canā€™t get to use No-IP and I donā€™t understand why. I followed everything thatā€™s on your site, dnsmasq and all, and it simply doesnā€™t load the page.

But I wouldnā€™t worry much about it now, as I am facing another far more critical issue. I have a 32GB SD card and, as I said earlier, I wasnā€™t using external drives yet to avoid complexifying matters before I got the bread and butter right, but I started getting warnings of no space available on my SD when doing some configs on NCP-config, so I plugged an external hard drive to my RPi and used the functions to transfer the data and the database.

And then Iā€™m getting the following message:
Launching nc-datadir
INFO: moving data dir to another place in the same SD card
If you want to use an external mount, make sure it is properly set up
System config value datadirectory set to string /media/NCDrv/ncdata
Done. Press any keyā€¦

Any idea?

Haha, donā€™t worry. If somebody else struggles with this you will help them by asking first

letā€™s encrypt wonā€™t work for you if you do that. see

Post a question, and we can see what is going on here

Thatā€™s bad. Log in through SSH (or maybe web interface) and delete something ASAP. Then

  • mount your USB drive, either manually or with nc-automount
  • transfer your data directory ( you get the warning because you have not mounted it in that folder )
  • through SSH delete the old data. It doesnā€™t delete it by default. Check that the dir change went fine first

We can use this forum for general chatting, but it is preferred that you ask on github for specifc technical questions, like that warning that you get.

Hope that helps

1 Like

Hello,

I have the same problem like above. I moved the database to my usb-hdd and now I can only lock in with my admin-account and not with the other accounts I created.
It says

Blockquote
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Can someone help my? This would be nice.
Shall I move the database back? Which would be the right location?

The databaseā€™s original location is /var/lib/mysql.

In any case, please use github for things like this, and read if there is a similar case before opening a new one.

It doesnā€™t make much sense that one user works and the other doesnā€™tā€¦ either the server/database is in an error state or not, but letā€™s follow up on github

I answered above

Thanks a lot! You were correct, it was no problem of the database location. I deleted the users with problems, an now everything seems fine!