Nextcloud: combine internal and macvlan for use with Cloudfare Zerotrust

  • Hi, I am trying to figure out how to get a static IP on my Nextcloud container in combination with a Zero trust tunnel from Cloudfare, attached to a subdomain.

    Goal is to have nextcloud working locally (instead of external subdomain) by a DNS-rewrite in Adguard. Adguard only allows static 'normal' IP-numbers like 192.168.188.9 (without portnumbers). My Nextcloud container runs on OMV port 8080 but is automatically redirected to my subdomain. Inside my config.php for Nextcloud are the lines:

    Code
    'overwrite.cli.url' => 'https://sub.example.nl',
    'overwritehost' => 'sub.example.nl',
    'overwriteprotocol' => 'https',

    Typing my OMV-ip (like 192.168.188.11:8080) results in a redirect to sub.example.nl, that is logically but actually not wanted (keep data locally and faster).


    My Nextcloud yml:


    I have already created a macvlan in OMV which is operational for i.e. Adguard-container. "Subnet": "192.168.188.0/24", "IPRange": "192.168.188.6/32", "Gateway": "192.168.188.1". Is it possible to use this already created macvlan for Nextcloud? If yes - howto attach or combine?


    I am doing something wrong (puzzling :/ ) - how to combine networks under 'services'. Underneath works for another container:

    Code
    services:
        networks:
          lokaal: 
            ipv4_address: 192.168.188.6
    
    networks:
      lokaal:
        external: true

    It seems that you cannot simply combine lines starting with - networkname and networkname: under networks-services.


    I hope I made myself clear and maybe somebody can point me to the right direction. Thx!

    Asus P42 Intel N100 | OMV 8 latest

  • Found it! Thx to this recent post RE: Adguardhome + Unbound YAML


    Redefine services/networks like this:


    Code
        networks:
          redisnet:
          dbnet:
          lokaal:
            ipv4_address: 192.168.188.9

    and networks:


    Code
    networks:
      lokaal:
        external: true
      dbnet:
        name: dbnet
      redisnet:
        name: redisnet

    Still not sure if this is properly configured but it works now with a static ip.

    Asus P42 Intel N100 | OMV 8 latest

  • ruudm

    Added the Label resolved

Participate now!

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