Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

347
Views
Docker NGINX Proxy Automation + DDNS + port forwarding + Nextcloud

I want to run a Nextcloud instance on my personal computer that uses a dynamic DNS (DDNS) to be exposed to the world. Nextcloud is running on Docker:

version: '3.5'

services:
  nextcloud:
    image: nextcloud:latest
    depends_on:
      - database
    volumes:
      # ...
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    env_file:
      - ./nextcloud.env
    environment:
      VIRTUAL_HOST:      "ddnsdomain.test.org:50001"
      LETSENCRYPT_HOST:  "ddnsdomain.test.org:50001"
      LETSENCRYPT_EMAIL: "nextcloud@ddnsdomain.test.org"
      NETWORK: proxy
    restart: unless-stopped

  database:
    image: mariadb:latest
    env_file:
      - ./nextcloud.env
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: unless-stopped

networks:
  default:
      external:
        name: proxy

and I thought to use NGINX Proxy Automation to place a NGINX proxy server upon my local machine to get HTTPS automatic redirection.

Now, after running NGINX Proxy Automation (running on a Docker network named proxy) and Nextcloud I should be able access my computer from the outside world, so I should just access ddnsdomain.test.org, the problem is that I don't want to expose port 80 and 443 of my personal computer, so I tried to bind 443 to a custom port via Port Forwarding on my router, so I got 443 -> 50001 via router. Now I expect to see the Nextcloud instance when accessing https://ddnsdomain.test.org:50001, but unfortunately I just get: 503 Service Temporarily Unavailable and if I access http://ddnsdomain.test.org:50001 I get:

400 Bad Request
The plain HTTP request was sent to HTTPS port
nginx/1.20.1

What am I doing wrong? Do I maybe need to use VIRTUAL_PORT (see Ports) as container env variable?

Is it really possible what I'm trying to accomplish?

Thanks

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!