jacobalberty / unifi-docker

Unifi Docker files
MIT License
2.16k stars 457 forks source link

How to add config.gateway.json? #705

Closed c0ldtech closed 11 months ago

c0ldtech commented 11 months ago

Operating system

Unraid 6.12.4

UniFi Tag

latest

Docker run

mounted /unifi from host directory

Bug description

I know, not really a bug - but the best place to ask I guess. Does anyone use a config.gateway.json? If yes, where did you put it so it gets applied? I put it in /unifi/data/sites/default (only have the default site), but it does not seem to take. The directories sites and default didn't even exist, not sure if it should be like that. I validated the JSON file first of course, so formatting shouldn't be an issue.

Is it even still possible to use a config.gateway.json? Where in the container did you guys put it, and what did you do so the USG (UXG Lite to be precise) actually uses it? Any help would really be appreciated. Thanks!

Steps to reproduce

No response

Relevant log output

No response

Fraddles commented 11 months ago

I am using a config.gateway.json file with this container and docker compose.

I have a data folder mapped into the container at /unifi, and the file is in a subdirectory of that at data/sites/default ... as such it looks like you have it in the correct location. If you open a shell into the container can you see the file in the correct spot?

However I am using a USG, and you have the new UXG-Lite... maybe the new unit does not use the config file?

Cheers,

Fraddles commented 11 months ago

Or another thought, since I am reading the thread over on the UniFi forums... The UXG-Lite requires controller v8+

c0ldtech commented 11 months ago

Yes, I'm using controller version 8.0.7 - so maybe that's the issue then.

Did you have to create sites/default folder, or were they already there?

When inside the container, I can see the file in /unifi/data/sites/default just fine.

Fraddles commented 11 months ago

My folders were already there... however my data folder has been carried over for years from much earlier versions of the controller. Here might be the p lace to ask; https://community.ui.com/releases/New-Hardware-Release-UXG-Lite/d2b66133-a6a7-45b1-8e08-6b4455aceeb0

c0ldtech commented 11 months ago

So it seems like the UXG Lite (same as UXG Pro and the UDM line) does not support config.gateway.json files and probably never will. That sucks - I really would need to add a few static host entries for docker containers and other stuff. Unfortunately, something like this is still not possible in the UI (even though at least now you can add static host entries for single hosts).

Raka74 commented 11 months ago

Or another thought, since I am reading the thread over on the UniFi forums... The UXG-Lite requires controller v8+

That's not true I've adopted it on 7.x

basvo commented 10 months ago

Or another thought, since I am reading the thread over on the UniFi forums... The UXG-Lite requires controller v8+

That's not true I've adopted it on 7.x

If you use cloud key gen 1 it will not adopt. Just had this experience.