Closed badokun closed 1 year ago
use the docker network 172.20.0.0/16
Thanks, that worked
@bqdokun: I am just about deploying nginx proxy manager (npm) and trying to get it work, however I installed it on a different machine. Would you please share what exactly you have configured in npm to get netmaker working properly in this npm environment? Many thanks in advance!
Any updates on this issue? @maveice
Unfortunately not - as I didn't receive any help, I already gave up ... - if you already got any further, please let me know. @LukasPoque
I think I found a solution. In my case, there is a server that runs NPM and another server in the same network that runs Netmaker in a docker container.
In NPM setup 3 proxy hosts api.VPN_DOMAIN
-> forward to NETMAKER_SERVER_IP:8081, broker.VPN_DOMAIN
-> NETMAKER_SERVER_IP:8883 (add websocket support), and dashboard.VPN_DOMAIN
-> NETMAKER_SERVER_IP:80.
Then use the default docker-compose.yml from the repo (+ use the mosquitto.conf
and wait.sh
from here: https://github.com/gravitl/netmaker/tree/master/docker).
In the docker-compose file, delete the caddy section, and replace all placeholder vars with your NETMAKER_SERVER_IP and your VPN_DOMAIN. Last but not least, add some ports to the different containers, so NPM can connect to them. Therefore edit the docker-compose file again and add:
netmaker:
ports:
- "8081:8081"
netmaker-ui:
ports:
- "80:80"
mq:
ports:
- "8883:1883"
Hope that helps you :) @maveice
Hello everyone!
I Know that this ticket is closed, But I'm having a hard time figuring out how to make mosquito working behind NPM with the compose file.
Unfortunately, the advanced section of the doc doesn't help.
What I try to setup is NPM + Netmaker on the same droplet but I can't figure out how make MQ accessible outside of the docker network.
Here is my compose file. It's quite modified, but everything run ''well'' locally but the MQ is just unreachable. Netmaker Logs show
error publishing node update to peer LONG_ID cannot publish ... mqclient not connected (1)
The compose file:
version: "3.4"
services:
netmaker:
container_name: netmaker
image: gravitl/netmaker:v0.18.5
restart: always
volumes:
- /home/DROPLET/netmaker/dns/dnsconfig:/root/config/dnsconfig
- /home/DROPLET/netmaker/sql/sql_data:/root/data
- /home/DROPLET/netmaker/mosquitto/mosquitto_data:/etc/netmaker
environment:
BROKER_ENDPOINT: "wss://broker.netmaker.domain.co"
SERVER_NAME: "netmaker.domain.co"
STUN_LIST: "stun.netmaker.domain.co:3478,stun1.netmaker.io:3478,stun2.netmaker.io:3478,stun1.l.google.com:19302,stun2.l.google.com:19302"
SERVER_HOST: "*.*.*.*"
SERVER_API_CONN_STRING: "api.netmaker.domain.co:443"
COREDNS_ADDR: "*.*.*.*"
DNS_MODE: "on"
SERVER_HTTP_HOST: "api.netmaker.domain.co"
API_PORT: "8081"
MASTER_KEY: "MASTERKEY"
CORS_ALLOWED_ORIGIN: "*"
DISPLAY_KEYS: "on"
DATABASE: "sqlite"
NODE_ID: "netmaker-server-1"
SERVER_BROKER_ENDPOINT: "ws://mq:1883"
VERBOSITY: "1"
MQ_PASSWORD: "MQ_PASSWORD"
MQ_USERNAME: "MQ_USER"
STUN_PORT: "3478"
DEFAULT_PROXY_MODE: "off"
ports:
- "3478:3478/udp"
netmaker-ui:
container_name: netmaker-ui
image: gravitl/netmaker-ui:v0.18.5
depends_on:
- netmaker
links:
- "netmaker:api"
restart: always
environment:
BACKEND_URL: "https://api.netmaker.domain.co"
coredns:
container_name: coredns
image: coredns/coredns
command: -conf /root/dnsconfig/Corefile
depends_on:
- netmaker
restart: always
volumes:
- /home/DROPLET/netmaker/dns/dnsconfig:/root/dnsconfig
mq:
container_name: mq
image: eclipse-mosquitto:2.0.15-openssl
depends_on:
- netmaker
restart: unless-stopped
command: ["/mosquitto/config/wait.sh"]
ports:
- "8883:1883"
environment:
MQ_PASSWORD: "MQ_PASSWORD"
MQ_USERNAME: "MQ_USER"
volumes:
- /root/mosquitto.conf:/mosquitto/config/mosquitto.conf
- /root/wait.sh:/mosquitto/config/wait.sh
- /home/DROPLET/netmaker/mosquitto/mosquitto_logs:/mosquitto/log
From the NPM side of things, I've got all the right proxies sets (all with SSL):
If we manage to found the proper way to configure NPM with Netmaker, we could update the doc afterward (the advanced setup for NPM in the doc look like the pre-0.13 era).
I'd like to use Nginx Proxy Manager instead of traefik so I can setup a reverse proxy for my home lab.
The documentation on https://docs.netmaker.org/ appears to be outdated, and the
HOST_NETWORK
comments refers to a docker-compose file that no longer exists.I've modified my docker-compose, but unable to reach the other nodes from within the
nginx-proxy-manager
container. How can I bridge the network from thenetmaker
container?From the
netmaker
container I see:and from
nginx-proxy-manager
So it's not able to reach any addresses in the 10.87.181.xxx range
Here's my docker-compose file: