Posts by Nick0

    OK, sorry for the delayed reply, life took over.


    First of all, thanks for your help - if I fill in 192.168.1.xxx:3306, or OMVhostname:3306 then I can access the Piwigo database and change my password, so all is good and this is resolved.


    Sorry for being so tedious but I learn a little bit more with every problem that people like you help me fix, plus i watch all the threads that have helped me and then refer back to them again and again. Very helpful.


    Thanks,

    Nick.

    Oh, okay - sorry, I don't know where to find the hostname. MariaDB was created by the stack, as I used this tutorial. Thanks.

    Why do you want phpMyAdmin? Just connect to the container "docker exec -it <container-name> /bin/bash" and run mysqlclient? Ods are your MariaDB still will need configuring to accept requests from outside the container, although I have no idea what image you are using and downloaded.

    Also, dan-e-levy, I had a tinker around with this idea just to learn something new. I didn't realise that you could get at the database this way as well, so that's good to know and thanks for pointing it out. Re-reading my last reply to you, I think I came accross as a bit short, I didn't mean that. Still I would rather a graphical interface like phpMyAdmin for now, but your method is one that I'll be tinkering with in the future.


    Thanks to you both,

    Nick.

    OK, thank you for helping me.


    So, Piwigo is installed through Docker (as is MariaDB) on 192.168.1.xxx. I am guessing that the databas is here: /srv/dev-disk-by-uuid-a02e5633-efc0-42a0-8098-3d413a5bc0b0/mariadb-photo/databases/piwigo


    I hope that's what you need.


    Thanks,

    Nick.

    Perhaps a simpler solution would be Keepass. It's free to install, just don't forget your "master" password, and you'll be fine. If you mount a Google Drive, Dropbox, etc. folder on your PC, it will always be backed up to the cloud. I prefer keepass2 as it has a better GUI, but 1 & 2 seem to be actively maintained.


    I've used it for years and paid for the Android app so I'd have it on my phone (this allows you to access a database on Google Drive, Dropbox, etc.)

    Thanks, I usually use Firefox Lockwise, or whatever its called, been very reliable for me - maybe I didn't save the password or something. I'll check out Keepass though just to take a look. Thanks for the tip!

    If you use the docker-compose from the official phpmyadmin page I linked to, it uses an internal mariadb database (required by phpmyadmin). Then you can connect to any external mysql/mariadb database to admin it. You won't be able to use the mariadb database spun up by the compose for anything but you shouldn't need to. Just spin up another mysql/mariadb container.

    OK, many thanks for your help here. Seems like I've somehow managed to get it set up.


    I ran docker pull phpmyadmin and waited for that to finish. Then I headed over to Portainer and added this stack:


    If I now head over to 192.168.1.xxx:8080, I get to the login page, where I leave the server address empty, the user: root; password: password. That gets me in but I don't see my Piwigo database, so what am I doing wrong, please?

    Why do you want phpMyAdmin? Just connect to the container "docker exec -it <container-name> /bin/bash" and run mysqlclient? Ods are your MariaDB still will need configuring to accept requests from outside the container, although I have no idea what image you are using and downloaded.

    Thanks, I rather do some things using a GUI.


    Thank you, all,

    Nick.

    Yes, thanks but, like I said, I am more looking to set it up with Docker. Most of the guides out there set it up alongside something else so I'm just looking to set it up with what I've already got and without breaking everything


    Thanks,

    Nick.

    Hi there,


    Can anyone tell me, or point me to a beginner's how-to, to install phpMyAdmin on OMV5? I have Docker running MariaDB and Piwigo and I have lost my password to Piwigo after setting it all up again last night. I thought my browser had saved it but seems not! I'd like to perhaps reset the password in the database using phpMyAdmin.


    There are lots of guides out there but most are tailored to setting up MariaBD and phpMyAdmin at the same time using Docker. I don't want to try this in case I mess things up!


    Thanks,

    Nick.

    OK, so just to follow up on the IP issue. To stop the IP change losing your connection, you can use the docker container name in the database.inc file, instead of the IP address.


    The guys over at the Piwigo forum helped me with this, here.


    So, you do this:


    For anybody else that would find this useful, navigate to:

    /config/www/gallery/local/config

    then

    nano database.inc.php

    OK, so I have realised my mistake, or rather it was pointed out to me by somebody on the Nextcloud forum. I missed out a ':' between 192.168.1.37 and /srv/dev-disk-by-uuid


    So, instead of :

    rsync -av /sharedfolders/dolly/ root@192.168.1.37/srv/dev-disk-by-uuid-234ddefe-df8d-4d5e-91f9-8b0375a0d13f/appdata/nextcloud/data/hannah/files/Documents/


    It should have been:


    rsync -av /sharedfolders/dolly/ root@192.168.1.37:/srv/dev-disk-by-uuid-234ddefe-df8d-4d5e-91f9-8b0375a0d13f/appdata/nextcloud/data/hannah/files/Documents/


    For a while I wondered if Nextcloud was denying me permission to write to the directory as a privacy measure for that user, but I doubted it.

    Hello all,


    I am quite new to the command line and whilst I have set up rsync jobs before (and they worked - yay!), I have a quick question.


    I have an installation of OMV 4 on an old desktop with several shared folders for family members and a new installation of OMV5 on a Dell server. The Dell server has Nextcloud installed through Docker as per macom 's excellent [How-To] Nextcloud with Letsencrypt using OMV and docker-compose.


    I access Nextcloud through https://domain.duckdns.org/nextcloud, and it works really well.


    So, I'd like to transfer some data from the shared folders on the old OMV machine to peoples new "Documents" directories on Nextcloud.


    This is what I'm putting in (via a terminal connected to the OMV4 machine using ssh), but, to be blunt, it doesn't work. I've either messed up the command or its a privileges thing. I think.


    rsync -av /sharedfolders/dolly/ root@192.168.1.37/srv/dev-disk-by-uuid-234ddefe-df8d-4d5e-91f9-8b0375a0d13f/appdata/nextcloud/data/hannah/files/Documents/


    I'd like to put the directory "dolly", complete with contents into "Documents" of the same user on the Nextcloud machine.


    Here's the ugly and shameful output:


    root@openmediavault:/# rsync -av /sharedfolders/dolly/ root@192.168.1.37/srv/dev-disk-by-uuid-234ddefe-df8d-4d5e-91f9-8b0375a0d13f/appdata/nextcloud/data/hannah/files/Documents/

    sending incremental file list

    rsync: mkdir "/root@192.168.1.37/srv/dev-disk-by-uuid-234ddefe-df8d-4d5e-91f9-8b0375a0d13f/appdata/nextcloud/data/hannah/files/Documents" failed: No such file or directory (2)

    rsync error: error in file IO (code 11) at main.c(675) [Receiver=3.1.2]


    Hopefully I won't realise what a glaringly stupid mistake I've made while I'm out walking the dog.


    Thank you.

    Nick.

    Hi there, me again.


    Well, docker exec -it nextcloud occ db:add-missing-indices worked like a charm - thank you. I am now all up-to-date with a nice green tick!



    I don't see any extra information regarding the ___Host-Prefix error, but I don't care - I've got an A for security at the moment so there's plenty of time for me to look into fixing that to give me an A+


    I want to say thank you again. The past weeks you have been so very patient with me, as has Agricola and others too on here. I have learned so much from our exchanges and I really do want to learn more. I would never have learned so much, so fast without your help so I want you to know that I do truly appreciate it.


    People like you are a credit to this forum, you are helpful and non-judgemental and this makes people like me feel welcomed and unafraid to ask stupid questions.


    Keep doing what you do.


    All the best,

    Nick.

    OK, all done - thank you again, i really can't thank you enough. Its great to have my cloud back and I have put quite a lot of work into it lately.


    Just to torture you a little more though, I now have this on the overview screen.


    It's important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.


    There are some errors regarding your setup.


    • Last background job execution ran 1 hour ago. Something seems wrong. Check the background job settings
    • The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
      • Missing index "cards_abiduri" in table "oc_cards".

    Please double check the installation guides ↗, and check for any errors or warnings in the log.


    The log says this quite a lot:


    Info: Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used


    at 2021-02-07T16:20:08+00:00


    The database problem has been there from the start, so I should address that now. Is this just a case of running occ db:add-missing-indices from the terminal?


    The bit in red about the background job popped up after the update, but I've just been back to nextcloud, messed about, gone back to the overview page and the message has vanished. No need to worry about that anymore then. ;):thumbup:


    I have also run a security scan and I am getting an 'A'<3


    The only thing it has a warning about is:


    ___Host-Prefix

    The __Host prefix mitigates cookie injection vulnerabilities within potential third-party software sharing the same second level domain. It is an additional hardening on top of 'normal' same-site cookies.


    Can I fix that?


    Lastly, and so that I never have to bother you about upgrading again, what do you think I should do? I am thinking we gui upgrade and if that fails, do it by the command line as you have shown me today? Safe, do you think?

    A gazillion thankyous,

    Nick.

    Its looking good.


    I looked at the upgrade docs to see what that last question meant, then I noticed that the docker exec -it nextcloud updater.phar command should be issued:


    Quote

    ... by going into the updater/ directory in the Nextcloud directory and executing the updater.phar as the web server user. (i.e. sudo -u www-data php /var/www/nextcloud/updater/updater.phar)

    You'll see that I just ran the command from the root@omvpeR310:/# prompt.


    So, is this okay for me to continue?


    Thank you,

    Nick.

    EDIT: Sorry, need to confirm what i did for anyone reading this! I navigated to /home/docker1/nextcloud and ran the command: docker-compose up -d in the terminal. That recreated the container and everything was working again.


    YIPPEE YIPPEE YIPPEE., you have done it again, macom!!!


    Thank you so much. <3<3<3<3 If I could hug you, I would.


    So, what do you think happened there and how should I go about upgrading?


    Thank you again!

    Nick.

    OK, thanks - so any other ideas here? Would it work for me to just reverse the source/destination disks in the rsync command for my scheduled jobsin OMV?


    So, instead of:

    rsync -av --delete --exclude 'aquota.group' --exclude 'aquota.user' /srv/dev-disk-by-uuid-234ddefe-df8d-4d5e-91f9-8b0375a0d13f/ /srv/dev-disk-by-uuid-10ea8d36-b524-4e24-b461-6f04f4cd4581/


    I try:

    rsync -av --delete --exclude 'aquota.group' --exclude 'aquota.user' /srv/dev-disk-by-uuid-10ea8d36-b524-4e24-b461-6f04f4cd4581/ /srv/dev-disk-by-uuid-234ddefe-df8d-4d5e-91f9-8b0375a0d13f/


    Since I ran the rsync job just before the botched upgrade, I should have a copy of it on disk uuid-10ea8d36... so if I copy all of that disk to my original nextcloud disk, shouldn't that fix everything?


    The only problem I can see here is that rsync might skip some of the files that I need overwritten, but I'm guessing there's an option that I can add to force overwiting?


    What do you think?


    Thanks,

    Nick.

    OK, good - I was still working out how to do it, I think I would have needed chmod g=s nextcloud.


    Anway, reading back up the thread and looking at my notes, it was actually the config.php file that was copied over, not the directory. So i think the file permissions are the ones we need to check.

    Code
    root@omvpeR310:/srv/dev-disk-by-uuid-234ddefe-df8d-4d5e-91f9-8b0375a0d13f/appdata/nextcloud/config/www/nextcloud/config# ls -al
    total 76
    drwxrwxr-x 2 docker1 users 4096 Feb 6 01:29 .
    drwxrwxr-x 13 docker1 users 4096 Jan 18 00:59 ..
    -rw-rw---- 1 docker1 users 1255 Feb 6 01:29 config.php
    -rw-rw-r-- 1 docker1 users 57442 Jan 14 09:35 config.sample.php
    -rw-rw-r-- 1 docker1 users 495 Jan 14 09:35 .htaccess

    So, I'm not sure what permissions this file needs, but I do note that they are different to config.sample.php.