Łukasz Ostrowski
Łukasz Ostrowski

Reputation: 1020

Public access container in QNAP NAS server

I have running node.js app in my docker container in Container Station in my QNAP NAS. It's working on my local network on the port I have specified.

Typically I would set reverse proxy pointing fe. my-domain.com/my-app :80 => :<local-port>

On NAS I have static IP provided, I have even a domain for public access (my-server.myqnapcloud.com) and I'd like to set up somehow my server to be visible outside. It doesn't have to be QNAP domain, I can set my own domain pointing to QNAP local address, but still I'm not able to forward local port to another in server scope.

What is the best way to setup such enviroment? It seems to be much easier without NAS at all...

Upvotes: 1

Views: 5004

Answers (1)

Maciej Los
Maciej Los

Reputation: 8591

If i'm not wrong, your QNAP server is over the router. If so, you have to change some settings...

Steps to do:

  1. Open a Container Station and find the instance of your container.
  2. Go to "Settings" then "Advanced settings" and find LAN bookmark (sieć)
  3. There must be a grid: "Port Routing" with 2 columns: "Host" and "Container".
    • "Container" - a port on which container is listening incoming internal connections
    • "Host" - a port on which QNAP server is listening incoming external connections. You have to remeber this value!
  4. Close Container Station and open myQNAPcloud application
  5. If you don't see the service which is responsible for port forwarding, you have to add appropriate service.
  6. After that you have to execute changes in a router.

Note:
I've struggled with the configuration of PostgreSQL database installed on container. Finally, i was able to achieve that. Here is detailed description: How to enable remote connections to your PostgreSQL server (in Container Station) on QNAP NAT server over the router

Hope this help.

Upvotes: 1

Related Questions