Coder Social home page Coder Social logo

Comments (4)

goofball222 avatar goofball222 commented on May 28, 2024

It appears you're trying to remap the controller http port 8080 to the external/host port 8888 - 8888:8080. I assume this is because you already have another service or container operating on TCP port 8080 on your host.

That port mapping change won't work without also setting unifi.http.port=8888 in the controller ${DATADIR}/system.properties file. At that point you'd also need to change your port mapping to: - 8888:8888.

The UniFi controller software has to explicitly know which ports it's using so it can send that information to the managed devices in their connection strings/config. This means you can't use the transparent remapping function of Docker.

This also affects the container health check script since it defaults to checking that the API is running and responding properly on port 8080 unless an alternate is set in system.properties.

from unifi.

zilexa avatar zilexa commented on May 28, 2024

Aha ok that makes total sense for the second method.
But the first method, using "network-mode: host", isn't that just suppose to work?
No port forwarding happening there.

from unifi.

goofball222 avatar goofball222 commented on May 28, 2024

network_mode: host still uses/attaches ports on the Docker host, so if there's something else already occupying one of the UniFi ports on the host the controller will fail to function properly. You would need to check other running containers and the host processes via netstat or other commands to determine what might be on the required ports. From there you'd need to move the conflicting service, or adjust the controller settings to move the UniFi controller service(s) to an unused port.

from unifi.

zilexa avatar zilexa commented on May 28, 2024

Ah that makes a lot of sense. Indeed that port was used already. I'll close this one. Thanks a lot for the clarification!

from unifi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.