Nextcloud with Letsencrypt using OMV and docker-compose - Q&A

  • Soma  Morlan

    As Soma I already enabled 4-Byte support in the past. For the restore of the database I used the "original" script, i.e. not the enhanced command.

    Emojis are still fine in nextcloud->mail: Subject and content with emojis are represented correctly. A text file containing emojis looks correct but not in the sidebar but i'm not sure whether this effect is a consequence of the former restore command.


    Another topic:

    linuxserver/docker-mariadb is migrating away from mariabionic (with 10.1.47) to alpine-10.5.8 (see https://github.com/linuxserver/docker-mariadb/releases).

    OMV 5.6.4 Usul | omvextrasorg 5.6| Kernel Linux 5.10.21-mvebu | Armbian Buster 21.02.3 | Hardware Helios 4

  • Updated to the lastest bionic and the log show's this:

    Code
    * This image will soon be rebased *
    * from ubuntu to alpine. *
    * Please be aware, this may cause issues *
    * It is strongly recommended to make backups *
    * of your config and databases before *
    * updating your image to the alpine base. *

    But it seems that there are still some issues on RPi4 (armhf):


    Code
    docker-mariadb/issues/76
    Notice that fresh container, without any databases and connections, consumes 100% of CPU.
    This behavior seems to affect only the new alpine image, previous image was working perfectly fine.

    I think it happens only with latest release and NOT with the first ALPINE release but I'll wait for a solution/solved release, :)

  • According to the official database backup documentation you only need to change the restore command.

    Try it out. When you stick by the guide your original database stays untouched and can be restored.

    I decided to take the plunge and did the change to webhippie, mainly because of your instructions, :)


    Although, it went well, there were some hiccups along the way. But after a crash-course on MySQL, I managed to clear all errors (not before having to redo everything twice)

    Before I went the 2nd round, I restored to the previous linuxserver\mariadb and checked all users, hosts on the nextcloud table and their privileges.


    ex: Select User,Host FROM mysql.user;

    ex: SHOW GRANTS FOR 'oc_admin'@'%';


    Saved the information and then tried again:


    1: The syntax of one of the commands that FredK already mencioned:

    • GRANT ALL PRIVILEGES ON nextcloud.* TO oc_admin@%; --->> GRANT ALL PRIVILEGES ON nextcloud.* TO 'oc_admin'@'%';

    2: When trying to restore the backup, the DB was spitting errors:

    ERROR 2006 (HY000) at line 648: MySQL server has gone away ->> SOLUTION FOUND


    Ended editing the docker-compose with some env. equal to old DB "custom.cnf" to help solve it on start:



    After that, the "occ maintenance:mode --off" came out clean and all was working.


    I then went to the logs on Nextcloud and there were some DBAL errors, but looking at the time stamps, it happened while the backup was beeing restore, so some tables didn't existed yet.


    In all, feel really happy of all the work, yeahhh.


    Now, I'm still trying to clean/wrap some things in the server and will, surely, need help from here.


    Thank you ALL

  • [user = '5793'] openmedianer [/ user] işte buyrun:

    Hello to everyone,

    This will be my first post here, sorry for such novice question.

    English is not my native language and I translate using google translater. I might have misunderstood some things, I may be telling some things wrong. I'm sorry about that too.

    I have been using Linux for a few years and I still have a lot to learn. I'm very, very rookie about Nas and Cloud. I'm like in the dark. I know it will be very difficult to help me, I have so many handicaps.


    I've been dealing with this for a week (I slept very little), watched a lot of videos (don't understand what was said) and read a lot of topics (this is more understandable to me)

    I tried all kinds of methods but failed.

    I am using Odroid-HC4.

    Minimal-installed OMV5 on Debian10.

    Docker is installed on OMV5 and Portainer is installed.

    I run the config code through Portainer.

    My build code is very similar to the code you shared. I don't know where I am doing it wrong but I feel like I'm spinning like a Ferris wheel due to a very small mistake.


    My Configuration Code:

    nextcloud.xyxyx.duckdns.org

  • Hi. Can someone give me ready docker-compose file to run Nextcloud on portainer? I don't know if I have to redirect ports on router and how to configure swag to use duckdns. Please help, I'm new in this and i don't know many things

  • The best way is to get your hands dirty with the Guide connected to this Q & A and if/when you run into stags come back to this thread and search through it. If your answer is not listed, create a post here.

    Simple and sure backup and restore: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Hardware: Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, & Heimdall - NanoPi M4 (v.1), backup - Odroid XU4, Pi-Hole (DietPi) - Testing/Playing: hc2, xu4, Pi 3B+, Odroid H2. Mac user trying to convert to Linux on a HP dx2400, Debian 10 XFCE.

  • I wanted to rebuild everything.

    Fully in keeping with what was told, without adding too much.

    I have no knowledge of networking.

    I hope you can help.


    I received an External Static-IP from my ISP provider.

    I got the domain name from freenom (free, .tk) (eg: alpay.tk)


    I processed as URL Forwarding.


    URL Forwarding: http://895.744.53.636

    Forward mode: Redirect (HTTP 301 forwarding)


    Other Forward mode option:

    This is -> Frame (cloaking) (default), But this is I didn't choose this option. is it a mistake?


    docker logs -f swag, test result:

    I've added images for forward ports and freenom.

  • Hello again.

    I am trying to understand.

    - Could this be a closed topic?

    - Or am I in the wrong subject?

    - Or I have an improper style.

    - Or I'm asking stupid questions that cannot be answered.

    This is a Forum, and I know forum manners. I have to wait, I have to be patient, those who support the subject do this job as a hobby.

    But I did not get any interaction in my previous message, naturally these questions arose in my mind.

    I do not want to disturb anyone, I would like to get information and give information.

    I hope I didn't get it wrong, sorry for that.

  • My problem is, that all of this does not make sense to me.


    Where did you do the port forwarding? The method I know is to do it on the router.


    Maybe this helps:

    https://blog.linuxserver.io/20…t-mapping-and-forwarding/



    environment:
    - PUID=997
    - PGID=100

    Not related to your (current) issue, but why do you use PUID 997?

    You should use a user that is created from the GUI of OMV. The ID of those users is 1000, 1001, 1002, ...

  • ports:
    - 444:443
    - 81:80

    According to this you would have to forward in your router


    port 80 from wan to port 81 in lan (this port forwarding is needed to get the certificate from etsencrypt)

    port 443 from wan to port 444 in lan (this port forwarding is needed to reach nextcloud via https)


    with wan being the internet and lan your network in your house

  • I am grateful for your reply.


    For PUID-PGID:

    Code
    debian @ root: ~ # id yönetici
    uid = 997 (admin) gid = 100 (kullanıcı) grup = 100 (kullanıcı), 996 (openmediavault-admin)

    I did Port Forwarding over the modem provided by my internet provider (ISP).

    I've attached pictures.


    I set up DNS in Azure for Domain I got from Freenom. I've added nameservers to Freenom.

    This is my first time doing these. Maybe I'm doing too many things I shouldn't be doing, maybe I'm not doing the things I shouldn't be doing.


    https://blog.linuxserver.io/20…-mapping-and-forwarding/:

    I will examine this link and try to understand.

    Thanks again.


    Edit:

    The pictures I shared are the change images I made on the router.


    Edit2:

    When I edited the post, Google Translate translated the entire text into Turkish. I tried to fix it again as best I could, but many articles were broken. I apologize for that.

    I'm trying to learn the system of your form, I'll be more careful.




    When I edited the post, Google Translate translated the entire text into Turkish. I tried to fix it again as best I could, but many articles were broken. I apologize for that.

    I'm trying to learn the system of your form, I'll be more careful.

  • As explained by macom


    The port forwarding MUST be:


    From external IP 443 (WAN Internet)

    To Internal IP 444


    From External IP 80 (WAN Internet)

    To Internal IP 81


    You need to change the 2x top 444 to 443

    You need to change the 2x top 81 to 80



    Can you post the full screen of the router configuration?


    Or the brand and model?

  • That look's right.


    Is it working now?

  • Usually on OMV every user which is being created in the GUI is member of the group "users" with the GID 100


    Following this guide, I use a user "docker1" for all my docker


    Code
    11:05:07 root@hawk:~# id docker1
    uid=1002(docker1) gid=100(users) groups=100(users),995(docker)

    I am not saying, that it cannot be done differently, but using a user created in the GUI of the OMV with "standard" memberships helps to troubleshoot issues.

  • I just made a test through Portainer.

    This time I used duckdns.



    I think I've made progress. :)

    http: //alpay.duckdns.org: Redirects me to my router's page.


    http: //alpay.duckdns.org/nextcloud:

    Error: HTTP ERROR 404


    http: //nextcloud/alpay.duckdns.org:

    Error: DNS_PROBE_FINISHED_NXDOMAIN


    Swag Logs:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!