Docker-compose environment variables

Hello,
I’m using nextcloud with a docker-compose.yaml file and I would like to setup additional anvironment variables like ServerAlias.
Is there a list of all possible ENV variables ?

Here part of my file :

  app:
    image: xxxxx/nextcloud_custom:v1
    container_name: nextcloud-app

    networks:
      - nextcloud_network
    depends_on:
      - letsencrypt
      - proxy
      - db
    logging:
      options:
         max-size: 50m
    volumes:
      - /cloud/nextcloud:/var/www/html
      - /cloud/nextcloud/config:/var/www/html/config
      - /cloud/nextcloud/custom_apps:/var/www/html/custom_apps
      - /cloud/nextcloud/data:/var/www/html/data
      - /cloud/nextcloud/themes:/var/www/html/themes
      ###### - /cloud/nextcloud/php/php.ini:/usr/local/etc/php/php.ini-production
      - /etc/localtime:/etc/localtime:ro
    environment:
      - VIRTUAL_HOST=xxxx.ddns.net
      - LETSENCRYPT_HOST=xxxx.ddns.net
      - LETSENCRYPT_EMAIL=xxx@gmail.com
      - PHP_MEMORY_LIMIT=1024M
    restart: unless-stopped
volumes:
  nextcloud:
  db:

Thanks

hi @mcanto welcome to the forum :handshake:
looking at the docs always helps: GitHub - nextcloud/docker: ⛴ Docker image of Nextcloud as not all variables can be used all the time you might want to look at Inventory and clarify how each auto-config value is handled [WIP] · Issue #2224 · nextcloud/docker · GitHub for an overview which variables apply at which system state.

1 Like

Hello,
I already had a look to those documents.

I would like to know how to configure , with docker-compose, ServerName and ServerAlias (I read that if I put here my local IP address I could be able to access it from my local network).
In the docker-compose I use this for ServerName but no idea how to configure the ServerAlias
VIRTUAL_HOST=xxxx.ddns.net

this is why I asked if there is a why to get all possible environment variables

Thanks

All of the supported environment variables for the Nextcloud image are listed on the previously noted link.

I read that if I put here my local IP address I could be able to access it from my local network

The VIRTUAL_HOST (and LETSENCRYPT*) variables actually aren’t Nextcloud image variables. They’re part of nginx-proxy so you may find their[1] docs helpful.

[1] nginx-proxy/docs at main · nginx-proxy/nginx-proxy · GitHub

hello,
thanks for the reply and I will have a look.I’m struggling to find a way to access my nextcloud using the local IP together with the internet address xxxx.ddns.net that works by default.
Do you have any suggestion ?

Best regards

don’t do this. for various reasons it’s recommended to use your public domain name all the time. I you want to avoid traffic loop through the internet inform yourself about “split brain dns” splitbraindns and topics tagged local_network in this forum.