How to Install Discourse on Your UGREEN NAS

How to Install Discourse on Your UGREEN NAS

Discourse is an open source Internet forum system. Features include threading, categorization and tagging of discussions, configurable access control, live updates, expanding link previews, infinite scrolling, and real-time notifications. It is customizable via its plugin architecture and its theming system. Use it as a mailing list, discussion forum, long-form chat room, and more! In this step by step guide I will show you how to install DiscourseĀ on your UGREEN NASĀ using Docker and Portainer.

šŸ’”Note: This guide works perfectly with the latest Discourse v3.5.0Ā release.

šŸ’”Note: Check out my guide on how to Install Discourse on Your Synology NAS.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

InstallĀ Portainer using my step by step guide. If you already have Portainer installed on your UGREEN NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

āš ļøMandatory: Enable HTTPS on your UGREEN NAS.

  • STEP 4

Create a new hostname on the noip website using your noip account. For example, I have created mariusdiscourse as Host and I use the free ddns.net domain. In the IP Address area, type in your own IPV4 IP address from your ISP, then click Create. Follow the instructions in the image below.

Discourse UGREEN NAS Set up 1 new 2026

  • STEP 5

Go toĀ FilesĀ and open the docker folder. Inside the docker folder, create one new folder and name itĀ discourse. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Discourse UGREEN NAS Set up 2 new 2026

  • STEP 6

Now create four new folders inside the discourseĀ folder that you created at STEP 5 and name them data, db, redis, sidekiq. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Discourse UGREEN NAS Set up 3 new 2026

  • STEP 7

Follow my step by step guide on how to activate SMTP for your Gmail account. This step is mandatory. Note: If you don’t want to use the easiest way for SMTP with Google and you already have SMTP details from your own Mail Server, you can just skip this STEP and use your personalized email SMTP details instead.

  • STEP 8

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Home then Live connect. Follow the instructions in the image below.

Portainer Add Stack NAS 1

On the left sidebar in Portainer, click on StacksĀ thenĀ + Add stack. Follow the instructions in the image below.

Portainer Add Stack NAS 2

  • STEP 9

In the Name field type in discourse. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

services:
  postgresql:
    image: pgvector/pgvector:pg16
    container_name: Discourse-DB
    hostname: postgresql
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD", "pg_isready", "-q", "-d", "bitnami_discourse", "-U", "postgres"]
      timeout: 45s
      interval: 10s
      retries: 10
    volumes:
      - /volume1/docker/discourse/db:/var/lib/postgresql/data:rw
    environment:
      POSTGRES_DB: bitnami_discourse
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: bitnami123
    restart: on-failure:5

  redis:
    image: redis
    container_name: Discourse-REDIS
    command: redis-server --requirepass redispass
    healthcheck:
     test: ["CMD-SHELL", "redis-cli ping || exit 1"]
    volumes:
      - /volume1/docker/discourse/redis:/data:rw
    environment:
      TZ: Europe/Bucharest
    restart: on-failure:5

  discourse:
    image: bitnami/discourse:3.5.0
    container_name: Discourse
    user: 0:0
    restart: on-failure:5
    healthcheck:
      test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/3000' || exit 1
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 90s
    ports:
      - 2249:3000
    depends_on:
      - postgresql
      - redis
    environment:
      - DISCOURSE_USERNAME=marius1984 #Username should be a minimum of 10 carachters.
      - DISCOURSE_PASSWORD=mariushosting10 #Password should be a minimum of 15 carachters.
      - DISCOURSE_EMAIL=yourown@email
      - DISCOURSE_ENV=production
      - DISCOURSE_ENABLE_HTTPS=yes
      - DISCOURSE_DATABASE_HOST=postgresql
      - DISCOURSE_DATABASE_PORT_NUMBER=5432
      - DISCOURSE_DATABASE_USER=postgres
      - DISCOURSE_DATABASE_NAME=bitnami_discourse
      - DISCOURSE_DATABASE_PASSWORD=bitnami123
      - DISCOURSE_REDIS_HOST=redis
      - DISCOURSE_REDIS_PORT_NUMBER=6379
      - DISCOURSE_REDIS_PASSWORD=redispass
      - POSTGRESQL_CLIENT_POSTGRES_USER=postgres
      - POSTGRESQL_CLIENT_POSTGRES_PASSWORD=bitnami123
      - POSTGRESQL_CLIENT_CREATE_DATABASE_NAME=bitnami_discourse
      - POSTGRESQL_CLIENT_CREATE_DATABASE_EXTENSIONS=hstore,pg_trgm
      - DISCOURSE_HOST=mariusdiscourse.ddns.net
      - DISCOURSE_DEVELOPER_EMAILS=yourown@email
      - DISCOURSE_SMTP_HOST=smtp.gmail.com
      - DISCOURSE_SMTP_AUTH=login
      - DISCOURSE_SMTP_PORT_NUMBER=587
      - DISCOURSE_SMTP_USER=Your-own-gmail-address
      - DISCOURSE_SMTP_PASSWORD=Your-own-app-password
      - DISCOURSE_SMTP_PROTOCOL=tls
      - BITNAMI_DEBUG=true
    volumes:
      - /volume1/docker/discourse/data:/bitnami/discourse:rw
      
  sidekiq:
    image: bitnami/discourse:3.5.0
    container_name: Discourse-SIDEKIQ
    user: 0:0
    depends_on:
      - discourse
    volumes:
      - /volume1/docker/discourse/sidekiq:/bitnami/discourse:rw
    command: /opt/bitnami/scripts/discourse-sidekiq/run.sh
    environment:
      - DISCOURSE_USERNAME=marius1984 #Username should be a minimum of 10 carachters.
      - DISCOURSE_PASSWORD=mariushosting10 #Password should be a minimum of 15 carachters.
      - DISCOURSE_HOST=mariusdiscourse.ddns.net
      - DISCOURSE_ENABLE_HTTPS=yes
      - DISCOURSE_ENV=production
      - DISCOURSE_DATABASE_HOST=postgresql
      - DISCOURSE_DATABASE_PORT_NUMBER=5432
      - DISCOURSE_DATABASE_USER=postgres
      - DISCOURSE_DATABASE_NAME=bitnami_discourse
      - DISCOURSE_DATABASE_PASSWORD=bitnami123
      - DISCOURSE_REDIS_HOST=redis
      - DISCOURSE_REDIS_PORT_NUMBER=6379
      - DISCOURSE_REDIS_PASSWORD=redispass
      - DISCOURSE_DEVELOPER_EMAILS=yourown@email
      - DISCOURSE_SMTP_HOST=smtp.gmail.com
      - DISCOURSE_SMTP_AUTH=login
      - DISCOURSE_SMTP_PORT_NUMBER=587
      - DISCOURSE_SMTP_USER=Your-own-gmail-address
      - DISCOURSE_SMTP_PASSWORD=Your-own-app-password
      - DISCOURSE_SMTP_PROTOCOL=tls
      - BITNAMI_DEBUG=true

Note: Before you paste the code above in the Web editor area below, change the value for TZ.Ā (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area below, change the value for DISCOURSE_USERNAME. Type in your own username. marius1984 is an example for a username.
Note: Before you paste the code above in the Web editor area below, change the value for DISCOURSE_PASSWORD. Type in your own password. mariushosting10 is an example for a password. You will need this password later at STEP 17.
Note: Before you paste the code above in the Web editor area below, change the value for DISCOURSE_EMAIL. Type in your own email address. You will need this email later at STEP 17.
Note: Before you paste the code above in the Web editor area below, change the value for DISCOURSE_HOST and type in your own NO IP DDNS address withoutĀ https:// at the beginning that you have previously created at STEP 4.
Note: Before you paste the code above in the Web editor area below, change the value for DISCOURSE_DEVELOPER_EMAILS. Type in your own email address. You will need this email address at STEP 17.
Note: Before you paste the code above in the Web editor area below, change the value for DISCOURSE_SMTP_USERĀ and type in your own Gmail address. Refer to STEP 7.
Note: Before you paste the code above in the Web editor area below, change the value for DISCOURSE_SMTP_PASSWORDĀ and type in your own Gmail app password. Refer to STEP 7.
Note: Before you paste the code above in the Web editor area below, change the value for DISCOURSE_HOST and type in your own NO IP DDNS withoutĀ https:// at the beginning that you have previously created at STEP 4.
Note: Before you paste the code above in the Web editor area below, change the value for DISCOURSE_DEVELOPER_EMAILS. Type in your own email address. You will need this email address at STEP 17.
Note: Before you paste the code above in the Web editor area below, change the value for DISCOURSE_SMTP_USERĀ and type in your own Gmail address. Refer to STEP 7.
Note: Before you paste the code above in the Web editor area below, change the value for DISCOURSE_SMTP_PASSWORDĀ and type in your own Gmail app password. Refer to STEP 7.

Discourse UGREEN NAS Set up 4 new 2026

  • STEP 10

Scroll down on the page until you see a button namedĀ Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

Discourse UGREEN NAS Set up 5 new 2026

  • STEP 11

If everything goes right, you will see the following message at the top right of your screen: ā€œSuccess Stack successfully deployedā€œ.

Portainer Success Stack NAS

  • STEP 12

Open your Nginx Proxy Manager container that you have previously installed at STEP 3. Click Add Proxy Host. A new pop up window will open. Add the following details:

Domain Names: Type in your own noip domain name that you have previously created at STEP 4.
Scheme: http
Forward Hostname/IP: Type in the local NAS IP of your UGREEN NAS.
Forward Port: Type in the Discourse local Port that is 2249
Check Block Common Exploits
Check Websockets Support
Click the SSL tab. Follow the instructions in the image below.

Discourse UGREEN NAS Set up 6 new 2026

  • STEP 13

After you click the SSL tab, add the following details:

SSL Certificate: Request a new SSL Certificate
Check: Force SSL
Check: HSTS Enabled
Check: HTTP/2 Support
Email Address for Let’s Encrypt: Type in your own Email Address.
Check: I Agree to the Let’s Encrypt Terms of Service.
Click Save. Follow the instructions in the image below.

Discourse UGREEN NAS Set up 7 new 2026

  • STEP 14

In the Proxy Hosts area, if everything goes right, you will see that your discourse hostname has been generated. Click on it. Follow the instructions in the image below.

Discourse UGREEN NAS Set up 8 new 2026

  • STEP 15

🟢Please Support My work by Making a Donation. Almost 99,9% of the people that install something using my guidesĀ forget to support my work, or justĀ ignoreĀ STEP 1. I’ve been very honest about this aspect of my work since the beginning: I don’t run any ADS, I don’t require subscriptions, paid or otherwise, I don’t collect IPs, emails, and I don’t have any referral links from Amazon or other merchants. I also don’t have any POP-UPs or COOKIES. I have repeatedly been told over the years how much I have contributed to the community. It’s something I love doing and have been honest about my passion since the beginning. But I also Need The Community to Support me Back to be able to continue doing this work.

  • STEP 16

Please waitĀ approximately 5 minutes for the installation to be completed or you will get a blank error page if you try to connect too soon. Now open your browser and type in your HTTPS/SSL certificate like this https://yourname.ddns.netĀ In my case it’s https://mariusdiscourse.ddns.net If everything goes right, you will see the main Discourse login page. Click Log in.Ā Follow the instructions in the image below.

Discourse UGREEN NAS Set up 9 new 2026

  • STEP 17

A new pop up window will open. Type in your own Email Address (DISCOURSE_EMAIL) and your own Password (DISCOURSE_PASSWORD) that you have previously added at STEP 9, then click Log in. Follow the instructions in the image below.

Discourse UGREEN NAS Set up 10 new 2026

  • STEP 18

On the left Discourse sidebar, click Admin. Follow the instructions in the image below.

Discourse UGREEN NAS Set up 11 new 2026

  • STEP 19

ClickĀ Security. Check the Force HTTPS option, then confirm it. Follow the instructions in the image below.

Discourse UGREEN NAS Set up 12 new 2026

  • STEP 20

Your Discourse forum at a glance!

Discourse UGREEN NAS Set up 13 new 2026

Add your first post!

Discourse UGREEN NAS Set up 14 new 2026

Enjoy Discourse on your UGREEEN NAS!

šŸ†˜TROUBLESHOOTING

šŸ†™Note/Update/Container: How to Update Your Docker Containers on UGREEN NAS Using Portainer.
🐳Note: How to Create Docker Shortcuts on Desktop.
šŸ†•Note: How to Update Portainer to the latest version.

This post was updated on Sunday / August 31st, 2025 at 12:17 AM