Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Question about docker installation

Featured Replies

Guys, I have a docker stack but I don't know how to configure it in unraid.

I don't want to install it as docker compose, I want to set the stack values in a .env file and place it inside the folder (appdata/n8n).

I don't know how to do this because there are other variables to set. Example: hostname: "{{.Service.Name}}.{{.Task.Slot}}", command: start

version: "3.7"
services:
 n8n_editor:
 image: n8nio/n8n:latest
 hostname: "{{.Service.Name}}.{{.Task.Slot}}"
 command:start
 networks:
 - bdrtec
 environment:
 - N8N_ENCRYPTION_KEY
 - NODE_ENV=production
deploy:
 mode: replicated
 replicas: 1
 placement:
 constraints:
 - node.role == manager
 # - node.hostname == worker1
 # - node.labels.app == http # label name: app, label value: http
 resources:
 limits:
 CPU: "1"
 memory: 1024M
 update_config:
 parallelism: 1
 delay: 30s
 order: start-first
failure_action: rollback

Where do I put this information? Is it in the docker settings in the UI?

image.thumb.png.d3de5930c75f11c43e680aab42c7a6cf.png

  • Replies 63
  • Views 26.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Braulio Dias Ribeiro
    Braulio Dias Ribeiro

    Great information... I used https://www.decomposerize.com/ to generate a docker run.   I didn't quite understand it because it didn't generate the command: command: worker --concurrency=10

  • Braulio Dias Ribeiro
    Braulio Dias Ribeiro

    Wow... awesome, a lesson on Unraid and Linux. I'm going to understand all of this better and try to apply it... thanks for the information and your time.

  • @Braulio Dias Ribeiro actually you don't need the SWAP plugin and you can ignore this Warning since it's just a warning. Unraid has no SWAP and therefore this message is put out, nothing to worry abou

Posted Images

unraid templeate esentail builds the docker run command...

Unraid has a plugin to run docker compose files.
image.png.1affcef2ca67fdc0be9cd70a9153c07a.png

you can use
https://www.composerize.com/
to help make a compose file with the docker run

building a compose file

 

or you can use

https://www.decomposerize.com/

to help convert a compose file to a docker run command.
*later make tempalte edits to make a unraid teampalte...

To help explaing:
The extra parm is part of the docekr run command options to pass adition commands.
Plex in example as my plex I want to add a hostname and pass nvidia for my plex image:
image.png.dea378de84a42f48aa44b42db6805a44.png

so in the docker run xyz --hostname xyz plex
and thus thoese options are passed...
 


Post arguments run after the docker run and sometimes run commands within the docker...

example is TQ clamav docker:

image.png.baa0c5cc514ce54e484f3fbca80944bd.png

 

as calling clamscan options -i is scan for infectred files...


review:
https://docs.unraid.net/unraid-os/manual/docker-management/

Edited by bmartino1
Data

  • Author
9 hours ago, bmartino1 said:

unraid templeate esentail builds the docker run command...

Unraid has a plugin to run docker compose files.
image.png.1affcef2ca67fdc0be9cd70a9153c07a.png

you can use
https://www.composerize.com/
to help make a compose file with the docker run

building a compose file

 

or you can use

https://www.decomposerize.com/

to help convert a compose file to a docker run command.
*later make tempalte edits to make a unraid teampalte...

To help explaing:
The extra parm is part of the docekr run command options to pass adition commands.
Plex in example as my plex I want to add a hostname and pass nvidia for my plex image:
image.png.dea378de84a42f48aa44b42db6805a44.png

so in the docker run xyz --hostname xyz plex
and thus thoese options are passed...
 


Post arguments run after the docker run and sometimes run commands within the docker...

example is TQ clamav docker:

image.png.baa0c5cc514ce54e484f3fbca80944bd.png

 

as calling clamscan options -i is scan for infectred files...


review:
https://docs.unraid.net/unraid-os/manual/docker-management/


Great information... I used https://www.decomposerize.com/ to generate a docker run.
 

I didn't quite understand it because it didn't generate the command:

command: worker --concurrency=10

 

It generated something like this:

-e GENERIC_TIMEZONE=America/Sao_Paulo --cpus 1
-m 1024M n8nio/n8n:latest worker --concurrency=10

 

As environment: I'm going to put it in a .env file (from what I understand that's what it is).
I put the command "--cpus 1 -m 1024M" in Extra Parameters:
 

The command: "worker --concurrency=10" wasn't generated on the website and I don't know how to specify it in unraid.

Below is a picture of how I did it:

image.thumb.png.b1226d4b7bf4cca35fdfcd9acf75481b.png

image.png.94aa87f38bd15d65661b14759a6be236.png

4 hours ago, Braulio Dias Ribeiro said:


Great information... I used https://www.decomposerize.com/ to generate a docker run.
 

I didn't quite understand it because it didn't generate the command:

command: worker --concurrency=10

 

It generated something like this:

-e GENERIC_TIMEZONE=America/Sao_Paulo --cpus 1
-m 1024M n8nio/n8n:latest worker --concurrency=10

 

As environment: I'm going to put it in a .env file (from what I understand that's what it is).
I put the command "--cpus 1 -m 1024M" in Extra Parameters:
 

The command: "worker --concurrency=10" wasn't generated on the website and I don't know how to specify it in unraid.

Below is a picture of how I did it:

image.thumb.png.b1226d4b7bf4cca35fdfcd9acf75481b.png

image.png.94aa87f38bd15d65661b14759a6be236.png


Regarding you "--cpus 1 -m 1024M"
Yes the memory limit and cpu would go in the extra parm box, However you could remove the cpu option and use

CPU Pining to select which processor core to run it.

 

The post argument is hard to explain...

As the argument "command :worker --concurrency=10" I believe that would be dependant on the docker itself and how it handles that... So I can't help you there... Only that yes, that looks right for the post argument, but you would need to verify it... I believe that is correct. If its working for you great!

 

the website decomposerize is meant to make copy paste command that with one line to execute the docker via a docker run comannd... To bring that command into a unraid template as you explain above, and have done is what you would have to look for... More info can be found on docker docs: https://docs.docker.com/reference/cli/docker/container/run/

IF ITS WORK DON"T TOUCH IT!
but I believe you don't need to specify command... and the post arguments on needs: worker --concurrency=10

 

otherwise with the image up one could run a user script to excuse the command in the docker... a separate sh script that could be ran...

docker exec -it n8n n8n worker --concurrency=10

But the command above would run else where separately... (User script plugin)


Not sure what n8n is...

as based on your picture with docker run:
https://docs.n8n.io/hosting/scaling/queue-mode/#:~:text=--concurrency%3D5-,Concurrency and scaling recommendations,to processing delays and failures.

 

Depending on the docker image. in theory a docker variable may exist:
https://docs.n8n.io/hosting/scaling/concurrency-control/
N8N_CONCURRENCY_PRODUCTION_LIMIT

Per your warning at the bottom of apply about cgroup and swap. As unraid is a mutable OS that gets loaded into ram(the entire root sytem and host is in ram!), there is no disk or swap file made. That can be ignored, but if you wat a fix for that....


Otherwise you will need a btrfs formatted disk and use the swap plugin.

image.png.2701dabeb584376120c30f5ea1c32fda.png

 

THgis occurs, As some ubuntu/debain based docker images need a place to temp put files inside the dockers images as they do their services. And this is a warning that unraid using cgroup2 memory doesn't have a swap file for its operations.

On a side note(IF YOU HAVE THE EXTRA RAM!), you can also look into zram / ramdisk of turning some available ram into a ramdisk and then into swap...
as example:
image.png.4470f5dc1b0993a1543769303be6aae7.png

 

More info on zram can be found at the bottom of some workaround scripting:

as zram is more known, usualy as you would see on zfs only pool disk setups and the need to use physical ram as a disk and to place the swap file there in memory...
 

Quote

 

Optimize ZFS Memory Usage

Reduce ZFS ARC (Adaptive Replacement Cache) size to free up more RAM for other processes:

echo "arc_max=4G" >> /etc/modprobe.d/zfs.conf

Use a Compressed RAM Disk (zram) for Swap

Instead of relying on disk-based swap, you can configure a compressed RAM disk for swap (via zram). This is faster and avoids disk I/O entirely

modprobe zram echo lz4 > /sys/block/zram0/comp_algorithm echo $((2*1024*1024*1024)) > /sys/block/zram0/disksize # Set to 2GB mkswap /dev/zram0 swapon /dev/zram0

*would pull ram and make a ram disk in memory / disk cache...

 


This can be used to help fix the warning as you may need to have a swap file.

Edited by bmartino1
typo - Data

  • Author
On 2/8/2025 at 2:38 PM, bmartino1 said:


Regarding you "--cpus 1 -m 1024M"
Yes the memory limit and cpu would go in the extra parm box, However you could remove the cpu option and use

CPU Pining to select which processor core to run it.

 

The post argument is hard to explain...

As the argument "command :worker --concurrency=10" I believe that would be dependant on the docker itself and how it handles that... So I can't help you there... Only that yes, that looks right for the post argument, but you would need to verify it... I believe that is correct. If its working for you great!

 

the website decomposerize is meant to make copy paste command that with one line to execute the docker via a docker run comannd... To bring that command into a unraid template as you explain above, and have done is what you would have to look for... More info can be found on docker docs: https://docs.docker.com/reference/cli/docker/container/run/

IF ITS WORK DON"T TOUCH IT!
but I believe you don't need to specify command... and the post arguments on needs: worker --concurrency=10

 

otherwise with the image up one could run a user script to excuse the command in the docker... a separate sh script that could be ran...

docker exec -it n8n n8n worker --concurrency=10

But the command above would run else where separately... (User script plugin)


Not sure what n8n is...

as based on your picture with docker run:
https://docs.n8n.io/hosting/scaling/queue-mode/#:~:text=--concurrency%3D5-,Concurrency and scaling recommendations,to processing delays and failures.

 

Depending on the docker image. in theory a docker variable may exist:
https://docs.n8n.io/hosting/scaling/concurrency-control/
N8N_CONCURRENCY_PRODUCTION_LIMIT

Per your warning at the bottom of apply about cgroup and swap. As unraid is a mutable OS that gets loaded into ram(the entire root sytem and host is in ram!), there is no disk or swap file made. That can be ignored, but if you wat a fix for that....


Otherwise you will need a btrfs formatted disk and use the swap plugin.

image.png.2701dabeb584376120c30f5ea1c32fda.png

 

THgis occurs, As some ubuntu/debain based docker images need a place to temp put files inside the dockers images as they do their services. And this is a warning that unraid using cgroup2 memory doesn't have a swap file for its operations.

On a side note(IF YOU HAVE THE EXTRA RAM!), you can also look into zram / ramdisk of turning some available ram into a ramdisk and then into swap...
as example:
image.png.4470f5dc1b0993a1543769303be6aae7.png

 

More info on zram can be found at the bottom of some workaround scripting:

as zram is more known, usualy as you would see on zfs only pool disk setups and the need to use physical ram as a disk and to place the swap file there in memory...
 


This can be used to help fix the warning as you may need to have a swap file.

Wow... awesome, a lesson on Unraid and Linux.

I'm going to understand all of this better and try to apply it... thanks for the information and your time.

@Braulio Dias Ribeiro actually you don't need the SWAP plugin and you can ignore this Warning since it's just a warning. Unraid has no SWAP and therefore this message is put out, nothing to worry about since you also have "--restart=unless-stopped" in the "Extra Parameters:" this basically means even if the container exceeds the memory limit from 1GB it will restart anyways.

BTW the message only appears when you limit the memory (which you do with "-m" in Extra Parameters).

 

You just have to do it like that:

grafik.png.40c950ebca1cc94b3821c732a9f927f8.png

 

"command:" is basically the "Post Arguments:" section.

  • Author
16 hours ago, Braulio Dias Ribeiro said:

Wow... awesome, a lesson on Unraid and Linux.

I'm going to understand all of this better and try to apply it... thanks for the information and your time.

 

15 hours ago, ich777 said:

@Braulio Dias Ribeiro actually you don't need the SWAP plugin and you can ignore this Warning since it's just a warning. Unraid has no SWAP and therefore this message is put out, nothing to worry about since you also have "--restart=unless-stopped" in the "Extra Parameters:" this basically means even if the container exceeds the memory limit from 1GB it will restart anyways.

BTW the message only appears when you limit the memory (which you do with "-m" in Extra Parameters).

 

You just have to do it like that:

grafik.png.40c950ebca1cc94b3821c732a9f927f8.png

 

"command:" is basically the "Post Arguments:" section.

In addition to these settings we are talking about, I need to create a file with the variables in the appdata/n8n folder.

 

In this case, do I just need to create a .env file and set the variables?

 

 

IMG_3750.jpeg

1 hour ago, Braulio Dias Ribeiro said:

In addition to these settings we are talking about, I need to create a file with the variables in the appdata/n8n folder.

Are you now using the compose plugin, if not that's not necessary because the .env file is basically the variables in the container template, click on "Add another Path, Port, Varaible, Label at the bottom, select Variable from the drop down as key enter whatever is before the = in your .env file and and as Value everything that is after the = (you have to put in all variables one by one).

You are basically setting up a container for docker run and not for compose, for compose you usually have your compose file and a .env file which is not necessary here since you put everything into the Docker template.

 

 

This seems to be still wrong:

grafik.png.acb5dbbbccf144efb9f4f583f5c68821.png

 

In the screenshot above you have:

command: worker --concurrency=10

 

This means you have to put this into there:

worker --concurrency=10

 

  • Author
8 hours ago, ich777 said:

Are you now using the compose plugin, if not that's not necessary because the .env file is basically the variables in the container template, click on "Add another Path, Port, Varaible, Label at the bottom, select Variable from the drop down as key enter whatever is before the = in your .env file and and as Value everything that is after the = (you have to put in all variables one by one).

You are basically setting up a container for docker run and not for compose, for compose you usually have your compose file and a .env file which is not necessary here since you put everything into the Docker template.

 

 

This seems to be still wrong:

grafik.png.acb5dbbbccf144efb9f4f583f5c68821.png

 

In the screenshot above you have:

command: worker --concurrency=10

 

This means you have to put this into there:

worker --concurrency=10

 

Perfect, I understand.
I mentioned filling out an .env file because there are many variables to fill out. It's easier in text mode.

  • Author
On 2/13/2025 at 3:39 AM, ich777 said:

Are you now using the compose plugin, if not that's not necessary because the .env file is basically the variables in the container template, click on "Add another Path, Port, Varaible, Label at the bottom, select Variable from the drop down as key enter whatever is before the = in your .env file and and as Value everything that is after the = (you have to put in all variables one by one).

You are basically setting up a container for docker run and not for compose, for compose you usually have your compose file and a .env file which is not necessary here since you put everything into the Docker template.

 

 

This seems to be still wrong:

grafik.png.acb5dbbbccf144efb9f4f583f5c68821.png

 

In the screenshot above you have:

command: worker --concurrency=10

 

This means you have to put this into there:

worker --concurrency=10

 

Is there a way to load a docker XML file? So that I don't have to type one variable at a time?

  • Author
On 2/13/2025 at 3:39 AM, ich777 said:

Are you now using the compose plugin, if not that's not necessary because the .env file is basically the variables in the container template, click on "Add another Path, Port, Varaible, Label at the bottom, select Variable from the drop down as key enter whatever is before the = in your .env file and and as Value everything that is after the = (you have to put in all variables one by one).

You are basically setting up a container for docker run and not for compose, for compose you usually have your compose file and a .env file which is not necessary here since you put everything into the Docker template.

 

 

This seems to be still wrong:

grafik.png.acb5dbbbccf144efb9f4f583f5c68821.png

 

In the screenshot above you have:

command: worker --concurrency=10

 

This means you have to put this into there:

worker --concurrency=10

 

I still haven't been able to progress.

I manually added the variables to the docker Add.

But where should I put this information?

image.png.58c91cce24355cdc203d3ccc6b04e9e4.png



I already set these

image.png.48de3e3a1927fef894a7c5091588aee2.png

10 hours ago, Braulio Dias Ribeiro said:

But where should I put this information?

You don't need that since these are just specific information if you are deploying a container over multiple nodes with fail over and other options how and when the container should start.

 

11 hours ago, Braulio Dias Ribeiro said:

Is there a way to load a docker XML file? So that I don't have to type one variable at a time?

If someone already made a XML then it would be possible but you would need to write your own XML, you can take a look at all Docker template in /boot/config/plugins/dockerMan/templates-user/my-<CONTAINERNAME>.xml <- however I don't think that's a good idea if you don't want to do it in the WebUI and you are hitting that many road blocks.

 

10 hours ago, Braulio Dias Ribeiro said:

I still haven't been able to progress.

Would it be possible better for you to use the Compose Plugin from the CA App since it seems you are more familiar with Docker Compose than the Unraid WebUI since you would then be able to use Compose (almost) as usual?

  • Author

My friends, seriously, I'm almost giving up on Unraid!

I know it's good, but I can't set up a docker!

I set all the variables and it didn't work.

When I click on the log, I can't see ...... why the container is stopped.

I don't know what to do, I'm almost giving up.

  • Community Expert
3 hours ago, Braulio Dias Ribeiro said:

My friends, seriously, I'm almost giving up on Unraid!

I know it's good, but I can't set up a docker!

I set all the variables and it didn't work.

When I click on the log, I can't see ...... why the container is stopped.

I don't know what to do, I'm almost giving up.

Are you still trying to force compose arguments into normal docker?


Also, please, next time use the code formatting.


 

version: "3.7"
services:
 n8n_editor:
   image: "n8nio/n8n:latest"
   volumes:
    - /mnt/user/appdata/n8nio/.n8n:/home/node/.n8n
   ports:
    - "5678:5687"
   hostname: "{{.Service.Name}}.{{.Task.Slot}}"
   command: worker --concurrency=10
   network_mode: "bridge"
   environment:
     - "N8N_ENCRYPTION_KEY=BLAHBLAHBLAH"
     - "NODE_ENV=production"
   deploy:
     mode: replicated
     replicas: 1
     placement:
       constraints:
         - node.role == manager
     resources:
        limits:
          cpus: "1"
          memory: 1024M
     update_config:
          parallelism: 1
          delay: 30s
          order: start-first
          failure_action: rollback

this works fine on the compose plugin and works fine with portainer.

(You need to fix appdata permission since idk what user it uses)

image.thumb.png.d4d2650896c81bab699d2788d327c6b4.png



For a basic docker setup, this would be it

my-n8n_editor.xml

 

 

Edit:

 

I did not include --env-file in the normal docker XML since, well ive no clue. But that should be straight forward enough 

 

 

Edit edit:

 

Its also not a good idea to mess around with the --restart option in docker. If the container constantly restarts, you can't get any logs. That's something you can set after you know stuff is working. 

Edited by Mainfrezzer

  • Author
3 hours ago, Mainfrezzer said:

Are you still trying to force compose arguments into normal docker?


Also, please, next time use the code formatting.


 

version: "3.7"
services:
 n8n_editor:
   image: "n8nio/n8n:latest"
   volumes:
    - /mnt/user/appdata/n8nio/.n8n:/home/node/.n8n
   ports:
    - "5678:5687"
   hostname: "{{.Service.Name}}.{{.Task.Slot}}"
   command: worker --concurrency=10
   network_mode: "bridge"
   environment:
     - "N8N_ENCRYPTION_KEY=BLAHBLAHBLAH"
     - "NODE_ENV=production"
   deploy:
     mode: replicated
     replicas: 1
     placement:
       constraints:
         - node.role == manager
     resources:
        limits:
          cpus: "1"
          memory: 1024M
     update_config:
          parallelism: 1
          delay: 30s
          order: start-first
          failure_action: rollback

this works fine on the compose plugin and works fine with portainer.

(You need to fix appdata permission since idk what user it uses)

image.thumb.png.d4d2650896c81bab699d2788d327c6b4.png



For a basic docker setup, this would be it

my-n8n_editor.xml

 

 

Edit:

 

I did not include --env-file in the normal docker XML since, well ive no clue. But that should be straight forward enough 

 

 

Edit edit:

 

Its also not a good idea to mess around with the --restart option in docker. If the container constantly restarts, you can't get any logs. That's something you can set after you know stuff is working. 

Dude, the problem is that I don't know what to do or how to do it.
I've been using Unraid for almost 3 years and I still don't know how to use it!
I've read the forum and the manual, but there are things I don't understand.

 

  • Author

1) I only know how to use the Unraid docker menu.
There I set the environment variables and it doesn't work.
 

2) At first I thought it would be easy to create a file with the environments and set them inside it (it would be more practical).

Although you explained it, I didn't understand if it was possible and how to do it.


3) So I thought: I'll upload the XML of the docker template in Unraid with the variables filled in. But from what I understand and see, it's a lot of work to upload a simple XML (there's no button in docker to upload it, you need to turn off docker, set developer mode, and do other things... it's a lot of bureaucracy to upload some variables that could be placed in a file directly in the folder or in a file from docker itself, quickly and practically).


4) So I set the variables in Docker manually, but Docker doesn't start and I can't see the log because it doesn't start.


5) Until now I don't know how to start a simple Docker lol. It's very difficult to use Unraid. A stack in the portainer and everything starts up by itself (I'm trying to learn Unraid but I'm
not getting it right).
 

6) This is what I have in terms of materials. And I would like to go up by configuring the docker and not adding a docker compose.
 

services:
  chatwoot_app:
	image: chatwoot/chatwoot:latest
    command: bundle exec rails s -p 3000 -b 0.0.0.0
    entrypoint: docker/entrypoints/rails.sh
    volumes:
      - chatwoot_data:/app/storage ## Diretório dos arquivos de conversa
      - chatwoot_public:/app ## Diretório de todos os arquivos do chatwoot
    networks:
      - bdrtec ## Nome da rede interna
	
	# Gere uma chave N8N_ENCRYPTION_KEY aqui: https://www.avast.com/random-password-generator#mac
    environment:
      - CHATWOOT_HUB_URL=https://chatwoot.mysite.com.br
      - INSTALLATION_NAME=Chatwoot ## Nome da empresa
      - NODE_ENV=production
      - RAILS_ENV=production
      - INSTALLATION_ENV=docker
      - SECRET_KEY_BASE=test123
 ## Key aleatória gerada aleatóriamente
      - FRONTEND_URL=https://chatwoot.mysite.com.br ## Url do Chatwoot
      - DEFAULT_LOCALE=pt_BR
      - FORCE_SSL=true
      - ENABLE_ACCOUNT_SIGNUP=false ## false = Desativar novas inscrições no inicio | true = Ativar novas inscrições no inicio
      - REDIS_URL=redis://Redis:6379
      - REDIS_PASSWORD=mypasswd
      - POSTGRES_HOST=postgres
      - POSTGRES_USERNAME=bdrtec
      - POSTGRES_PASSWORD=mypasswd
      - POSTGRES_DATABASE=chatwoot
      - ACTIVE_STORAGE_SERVICE=local
      - RAILS_LOG_TO_STDOUT=true
      - USE_INBOX_AVATAR_FOR_BOT=true
      # Performance
      - SIDEKIQ_CONCURRENCY=10
      - RACK_TIMEOUT_SERVICE_TIMEOUT=0
      - RAILS_MAX_THREADS=5
      - WEB_CONCURRENCY=2
      - ENABLE_RACK_ATTACK=false
      - WEBHOOKS_TRIGGER_TIMEOUT=40
      # Servidor de Email Gmail
      - MAILER_SENDER_EMAIL=Chatwoot <myemail@gmail.com>
      - SMTP_DOMAIN=gmail.com
      - SMTP_ADDRESS=smtp.gmail.com
      - SMTP_PORT=587
      - [email protected]
      - SMTP_PASSWORD=mypaaswd
      - SMTP_AUTHENTICATION=login
      - SMTP_ENABLE_STARTTLS_AUTO=true
      - SMTP_OPENSSL_VERIFY_MODE=peer
      - [email protected]
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
          - node.role == manager
      resources:
        limits:
          cpus: "1"
          memory: 2048M
      # labels:
        # - traefik.enable=true
        # - traefik.http.routers.chatwoot_app.rule=Host(`seudominio.com.br`)
        # - traefik.http.routers.chatwoot_app.entrypoints=websecure
        # - traefik.http.routers.chatwoot_app.tls.certresolver=letsencryptresolver
        # - traefik.http.routers.chatwoot_app.priority=1
        # - traefik.http.routers.chatwoot_app.service=chatwoot_app
        # - traefik.http.services.chatwoot_app.loadbalancer.server.port=3000 
        # - traefik.http.services.chatwoot_app.loadbalancer.passhostheader=true 
        # - traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https
        # - traefik.http.routers.chatwoot_app.middlewares=sslheader@docker

  chatwoot_sidekiq:
    image: chatwoot/chatwoot:latest
    command: bundle exec sidekiq -C config/sidekiq.yml
    volumes:
      - chatwoot_data:/app/storage ## Diretório dos arquivos de conversa
      - chatwoot_public:/app ## Diretório de todos os arquivos do chatwoot
    networks:
      - bdrtec ## Nome da rede interna
    environment:
      - CHATWOOT_HUB_URL=https://chatwoot.mysite.com.br #
      - INSTALLATION_NAME=Chatwoot
      - NODE_ENV=production
      - RAILS_ENV=production
      - INSTALLATION_ENV=docker
      - SECRET_KEY_BASE=test123
      - FRONTEND_URL=https://chatwoot.mysite.com.br
      - DEFAULT_LOCALE=pt_BR
      - FORCE_SSL=true
      - ENABLE_ACCOUNT_SIGNUP=false ## false = Desativar novas inscrições no inicio | true = Ativar novas inscrições no inicio
      - REDIS_URL=redis://Redis:6379
      - REDIS_PASSWORD=mypasswd
      - POSTGRES_HOST=postgres
      - POSTGRES_USERNAME=bdrtec
      - POSTGRES_PASSWORD=mypasswd
      - POSTGRES_DATABASE=chatwoot
      - ACTIVE_STORAGE_SERVICE=local
      - RAILS_LOG_TO_STDOUT=true
      - USE_INBOX_AVATAR_FOR_BOT=true
      # Performance
      - SIDEKIQ_CONCURRENCY=10
      - RACK_TIMEOUT_SERVICE_TIMEOUT=0
      - RAILS_MAX_THREADS=5
      - WEB_CONCURRENCY=2
      - ENABLE_RACK_ATTACK=false
      - WEBHOOKS_TRIGGER_TIMEOUT=40
      # Servidor de Email Gmail
      - MAILER_SENDER_EMAIL=Chatwoot <myemail@gmail.com>
      - SMTP_DOMAIN=gmail.com
      - SMTP_ADDRESS=smtp.gmail.com
      - SMTP_PORT=587
      - [email protected]
      - SMTP_PASSWORD=mypasswd
      - SMTP_AUTHENTICATION=login
      - SMTP_ENABLE_STARTTLS_AUTO=true
      - SMTP_OPENSSL_VERIFY_MODE=peer
      - [email protected]
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
          - node.role == manager
      resources:
        limits:
          cpus: "1"
          memory: 2048M

volumes:
  chatwoot_data:
    external: true
    name: chatwoot_data
  chatwoot_public:
    external: true
    name: chatwoot_public

networks:
  bdrtec:
    external: true
    name: bdrtec
```

 

Edited by Braulio Dias Ribeiro

Then ask 1 question at a time... there alot here and alot can be bad in a lot of different locations and break from bad docker images to bad code to improper and misconfigured use...

So here are some  example only not a solution... I need to digest your docker compose above and review...

review this in terms of using docker compose alot of things online will have a compose file
 


when you say docker env... unriad template doesn't have that I have to assume you meant a docker template variable...

Environment option and variable are to different configurations...

Review the docker docs:
https://docs.docker.com/reference/compose-file/build/

https://docs.docker.com/reference/cli/docker/


There are 3 ways to interact with dockers on unriad
1. Terminal all the way using CLI to call the entier docker run command. (you will see it listed as 3rd party in teh docker tab) Termianl to interact contorl run etc...


2. Unraid Web UI and the CA templates. Here you use unraids webui to build the docker run line. There is no easy way to do this. Templates are premade and mainted by other users on the forum for easy of access.
 

3. the current traditional way... use a docker compose file
_The only offical docker use to call and run multiple as per what your trying to run and what netprobe is for the example...

Unriad has a nice web ui and interface to manage current docker images, to mange logs and display certain settings. Unraid is not the only platform that can run docker.

From my testing, Unriad is docker king... Lattely. OMV is getting closer and better but you have to use other web interfaces to interact such as portainer...

Theres are may types of dockers forms exmaples  HELM / POD / SWARM...
Unriad runs the older legacy version the original docker instance...

so while a other docker instances exists your image may not be made for unraid in mind and may be running or expecting something on a newer version/type of docker binary instance...

 

Example truenas scale runs helm dockers. They are designed differently I have in cooperated unraid docker on turenas and I have in cooperated truenas docker on unraid. I have tested the capabilities of many Operating systems from Casa OS, OVM, Proxmox, Portainer Docker, Bare Debain/ubuntu... etc....

I will gladly help where I can. As things can get technical fast...

It appears your trying to edit or use docer environment variables also known as the .env file... unraid docker web ui / template authoring doesn't support that.
To use .env files, you can call a docker env file with termianl docker run command... or use a compose file...

Per your above compose file it appears you are trying to run 2 dockers from the same docker image. As such, you would need to use docker compose.


 

Lets review and start over then and go through some basics!
Lets use docker compose...


so step one is making a folder path where we want to have our docker data and use that docker data...

 

We need to keep in mid docker volumes and the default docker path is...

Web UI > Setting > Docker

Default appdata storage location:

/mnt/user/appdata/

*It is recommended to run things her to maintain simplicity and folder pathing...

 

Lets make a compose folder (or if this is coming from someone's github with examples or other you can cd into the appdata storage location and git clone the project...

mkdir -p /mnt/user/appdata/ComposeExample


so we plan to store and put the compose file, the .env file and compose stuff to run this docker here...
Next we install the Docker compose plugin. (if its not installed!)

we should now see new items on the docker tab at the bottom.image.thumb.png.ab5fbab1abecf3a2b90ebda3c061fb82.png
 

to use a docker compose file on unraid we nee to click the bottom button to add a new stack:

this should give you a popup:
image.png.e73cd4aba4d44e798587efd98f83543a.png
Click advance and set the stack directory. the stack directory is the file location for that compose file, env file and potenatl other data location depending on how you want to handle file hirearcy...
 

image.png.b115d7778781893ced669cba9ebd87bc.png

*Usualy the  folder name for the stack matches the name in trhe web UI. Again how you wnat to see and interact with it...
 

image.png.8c22ea6881c091d438d087f20e84fb5a.png

 

image.thumb.png.e22f7655fc91a8da81301ef3b2735fb6.png

 

image.png.831589bff0aa50c11ef02b1c2313e25a.png

 

 

now we need to edit the compose stack:
click the gear icon:

image.png.6b40b01099934a0e82b53aebf786e63c.png

edit stack:
image.png.6c92f83b4b5ea7cc90f648075b478008.png

 

compose file:
image.thumb.png.86107e482d12561b78344726880583a3.png

note the file path of the file is at the top and a web ui edit is now on screen. This is where you place your compose file!

after adding data clicking save changes at the top you should be prompted with a ui label... this is where you make unraid prety... 
add a picture icon, fill in side data such as a go to this web UI IP and Port to access this docker...

I left it blank:
image.png.fcc6dd36f4a0dc7eaf7c012621f8bc69.png

 

*note you can add pre aditional data to the compse file example netprobe:
 

    labels:
      net.unraid.docker.webui: http://[IP]:[PORT:3001]
      net.unraid.docker.icon: './Example.png'
      folder.view: ComposeExample
      net.unraid.docker.managed: 'composeman'
      net.unraid.docker.shell: '/bin/sh'

*DOCKER COMPOSE IS YAML SYNTAX AND IS SPACING SPECIFIC!!! YOU MUST FOLLOW YAML DOCUMENTATION AND LINE INDENTATION!


As this will auto fill in data for the UI Labels and stack...

example netprobe:

https://github.com/bmartino1/netprobe_lite/blob/master/docker-compose.yml
image.png.ce0ed52967eb05f37bda7d4a63d7f2ba.png

image.thumb.png.40a9c551bde5b9a5483f482b1f3033f5.png

image.thumb.png.340e2c65936e8203586ae73946928459.png

 

Now about that envirment file...

Gear >edit stack >env:
image.png.f9746d7bf33f88b5208dbd7478f2c5d2.png

 

image.thumb.png.d469ea9d463822374e3cb1d23dd1f7d7.png

note the path at the top... this is the docker environment file... Again I assume this is what your looking for...

 

Ask 1 question and we will get back to you here. As Again there is a lot of data to go over and things can break at steps along the way...

  • Author

My head is spinning lol.

So let's go step by step.

There will be two dockers, so I'll create the individual stacks

I tried to identify which are the environments of the compose file and the environments of the env file.


Docker 1
compose file

services:
  chatwoot_app:
	image: chatwoot/chatwoot:latest
    command: bundle exec rails s -p 3000 -b 0.0.0.0
    entrypoint: docker/entrypoints/rails.sh
    volumes:
      - chatwoot_data:/app/storage
      - chatwoot_public:/app
    networks:
      - bdrtec
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
          - node.role == manager
      resources:
        limits:
          cpus: "1"
          memory: 2048M

  chatwoot_sidekiq:
    image: chatwoot/chatwoot:latest
    command: bundle exec sidekiq -C config/sidekiq.yml
    volumes:
      - chatwoot_data:/app/storage
      - chatwoot_public:/app
    networks:
      - bdrtec
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
          - node.role == manager
      resources:
        limits:
          cpus: "1"
          memory: 2048M

volumes:
  chatwoot_data:
    external: true
    name: chatwoot_data
  chatwoot_public:
    external: true
    name: chatwoot_public

networks:
  bdrtec:
    external: true
    name: bdrtec



env file

CHATWOOT_HUB_URL=https://chatwoot.mysite.com.br
INSTALLATION_NAME=Chatwoot
NODE_ENV=production
RAILS_ENV=production
INSTALLATION_ENV=docker
SECRET_KEY_BASE=test123
FRONTEND_URL=https://chatwoot.mysite.com.br
DEFAULT_LOCALE=pt_BR
FORCE_SSL=true
ENABLE_ACCOUNT_SIGNUP=false
REDIS_URL=redis://Redis:6379
REDIS_PASSWORD=mypasswd
POSTGRES_HOST=postgres
POSTGRES_USERNAME=bdrtec
POSTGRES_PASSWORD=mypasswd
POSTGRES_DATABASE=chatwoot
ACTIVE_STORAGE_SERVICE=local
RAILS_LOG_TO_STDOUT=true
USE_INBOX_AVATAR_FOR_BOT=true
SIDEKIQ_CONCURRENCY=10
RACK_TIMEOUT_SERVICE_TIMEOUT=0
RAILS_MAX_THREADS=5
WEB_CONCURRENCY=2
ENABLE_RACK_ATTACK=false
WEBHOOKS_TRIGGER_TIMEOUT=40
MAILER_SENDER_EMAIL=Chatwoot <myemail@gmail.com>
SMTP_DOMAIN=gmail.com
SMTP_ADDRESS=smtp.gmail.com
SMTP_PORT=587
[email protected]
SMTP_PASSWORD=mypaaswd
SMTP_AUTHENTICATION=login
SMTP_ENABLE_STARTTLS_AUTO=true
SMTP_OPENSSL_VERIFY_MODE=peer
[email protected]

 

  • Author

@bmartino1 no results....UI Label does not open and I did as per the post above and it does not work

  • Community Expert

This is as simpel as it gets.

the .env file has to exist, then you load it via "--env-file=/mnt/user/appdata/n8nio/.env" in extra arguments

image.png.5c596ff326a5338646164c50230865d8.png

Edited by Mainfrezzer

  • Author
3 hours ago, Mainfrezzer said:

This is as simpel as it gets.

the .env file has to exist, then you load it via "--env-file=/mnt/user/appdata/n8nio/.env" in extra arguments

image.png.5c596ff326a5338646164c50230865d8.png

 

Are you referring to docker compose stack?
Where do you add extra arguments?

  • Community Expert
49 minutes ago, Braulio Dias Ribeiro said:

 

Are you referring to docker compose stack?
Where do you add extra arguments?

the "--env-file=" is for normal docker, i.e. the webgui

image.thumb.png.a48c04e22a9764d6f033948fc98d55c2.png


for compose, declaring env files would look like this

 

version: "3.7"
services:
 n8n_editor:
   image: "n8nio/n8n:latest"
   env_file: "/mnt/user/appdata/etc/etc/etc/.env"

 

12 hours ago, Braulio Dias Ribeiro said:

@bmartino1 no results....UI Label does not open and I did as per the post above and it does not work

then there are issues within your docker compose file. Either indentation or issue with how compose read your configurations.



 

 

7 hours ago, Braulio Dias Ribeiro said:

 

Are you referring to docker compose stack?
Where do you add extra arguments?

Main Freezer is referring to the unraid web ui of the docker template. To use a env file as your constructing the docker run line...

There is a docker cli to add an additional env file. seen in middel of page in docker docs:
https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/

as pointed out earlier where you had your restart unless stopped option
image.png.6a462192e2b86df360880b1ea6b2c37f.png

 

you can add a .env file by calling --env-file =/path.to.env.file

in the extra parameter field under advance toggle.

  • Author
1 hour ago, bmartino1 said:

then there are issues within your docker compose file. Either indentation or issue with how compose read your configurations.



 

 

Main Freezer is referring to the unraid web ui of the docker template. To use a env file as your constructing the docker run line...

There is a docker cli to add an additional env file. seen in middel of page in docker docs:
https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/

as pointed out earlier where you had your restart unless stopped option
image.png.6a462192e2b86df360880b1ea6b2c37f.png

 

you can add a .env file by calling --env-file =/path.to.env.file

in the extra parameter field under advance toggle.

I've tried a few things, and I'm stuck here.
How do you map this invalid path?
image.thumb.png.81782a7c6439a546ec2a1222c7ae502f.png

version: "3.8"

#sh
# bundle exec rails db:chatwoot_prepare

services:
  chatwoot_admin:
    image: chatwoot/chatwoot:v4.0.1-ce
    #hostname: "{{.Service.Name}}.{{.Task.Slot}}"
    command: bundle exec rails s -p 3000 -b 0.0.0.0
    ports:
      - "4040:4040"
    entrypoint: docker/entrypoints/rails.sh
    volumes:
      - chatwoot_data:/app/storage
      - chatwoot_public:/app
    networks:
      - bdrtec

    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
          - node.role == manager
      resources:
        limits:
          cpus: "1"
          memory: 1024M

volumes:
  chatwoot_data:
    external: true
    name: chatwoot_data
  chatwoot_public:
    external: true
    name: chatwoot_public
networks:
  bdrtec:
    external: true
    name: bdrtec


image.png.49052268cc892f4ff6919ae82a349993.png

image.png.e462801330fca0c11944d08f838a1a75.png

image.thumb.png.81782a7c6439a546ec2a1222c7ae502f.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.