OMV5, Portainer, MariaDB, Nextcloud, Let's encrypt - how do I make it work?

  • I got all parts - but can't put it together.


    I managed so far:
    OMV5 - up and running on a small HP proliant Server Gen 1 (!) - 1,2GHZ and 8 GB Ram - 2x250mb HDD and 2x1TB HDD - as Raid
    Installed:
    Portainer
    MariaDB
    Nextcloud
    Let's engcrypt
    A dyndns domain is working too


    But - I watched nearly every part of Techno Dad - I see all videos - but nothing matches and I don't understand everything to the last piece.
    Of course an video from scratch would be "my" solution - but now I need your help.


    How do I make the right connection to get letsencrypt worked in that way, that my dyndns url is called properly on https (green lock in browser) and forwards to my nextcloud docker installation?

  • Agreed. For mariadb, you can map ports: 3306:3306. Letsencrypt is the web server ported outside and should own 443 and 80. For me, I would map something like 2443:443 and 2080:80. Have your router route ports 443:2443 and 80:2080 respectively. That way, you can still use your OMV port server at port 80.


    For nextcloud, you can map something like 3443:443 and 3080:443.

  • Hello,


    i use follow setup: Portainer > MariaDB > Nextcloud > traefik
    HowTo:
    Basics:
    - My home network has IP 192.168.178.1, Server on 192.168.178.191
    - Need a DynDNS Service and a own Domain. I use selfhost.de with my domain and FRITZ!Box.
    - Needs a port forwarding in your Router (for me: FRITZ!Box). Map Port 80 and 443 from Router to the server (on FRITZ!Box change the port for "FRITZ!Box https" to 444 or what you want).
    - Data store in this example on /home/user
    - You need a console (ssh or direct)
    - a lot of coffee :)


    First: MariaDB
    - on console go to home directory


    - create the directory you need


    - create config files for traefik


    - copy this in traefik.yml


    change the mail address on line 18
    - bring docker to swarm mode


    - create the networks


    - go to portainer and click on the left side on "Secrets"
    - create a new secret:


    - go to "Stacks"
    - create a new Stack. Name: MariaDB. Copy the following code in Web Editor field:

    under "Actions" click on "Deploy the stack"


    After a few minutes MariaDB is ready. Test it in your browser. Go to 192.168.178.191:9001.


    Second: traefik
    - go to console
    - install apache2-utils


    - use this command to creat credentials for traeffic


    - go to portainer > Stacks > Add Stack
    - Name: traefik, this code

    - change the domain on line 22 and 27. Change line 23, copy the credentials from console on USER:PASSWORD. Those credentials must be in htpasswd format.
    - "Deploy the stack"
    - visit traefik.domain.tld, you see the traefik dashboard

  • Third: nextcloud
    - on console create a database for nextcloud

    Code
    docker exec -it $(docker ps -f name=MariaDB_db -q) mysql -u root -p
    ### use your root password for MariaDB "db_root_password" ###
    CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
    CREATE USER nextcloud@'%' IDENTIFIED BY 'your-password'; # use the db_dba_password
    GRANT ALL PRIVILEGES ON nextcloud.* to nextcloud@'%' IDENTIFIED BY 'your-password'; # use the db_dba_password
    FLUSH PRIVILEGES;
    exit;


    - copy this to /home/<your_user>/traefik/nextcloud_conf_files/nginx.conf


  • - portainer > Stacks > Add Stack
    - Name: nextcloud, this code

    - change domain on line 62 and 66. You can use a subdomain like sub.domain.tld or domain.tld. Password on line 25.
    - "Deploy the stack"
    - Go to your domain and hope it works


    Traefik manages the certficates from letsencrypt. You must noting do. The setup writes every 24h a backup of the database in folder backup. Use OMV to make a backup from this folder.


    On this setup you can add many other things:
    - emby
    - Bitwarden
    - FreshRSS
    - Heimdall
    .....


    Hope this help.

  • Post by Tabletche ().

    This post was deleted by the author themselves ().
  • Docker-compose files newer than version 2.x are not directly supported by Portainer for use in Stacks.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • Post by Tabletche ().

    This post was deleted by the author themselves ().
  • - go to portainer > Stacks > Add Stack
    - Name: traefik, this code

    - change the domain on line 22 and 27. Change line 23, copy the credentials from console on USER:PASSWORD. Those credentials must be in htpasswd format.
    - "Deploy the stack"
    - visit traefik.domain.tld, you see the traefik dashboard

    i manage to do the first one, now can someone tell me what i have to change at line 22 and 27 do i have to fill all domain name and which one have to be,

    and what to change in 23. Sorry for those questions, but i just starting with this. Thanks in advance!

Participate now!

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