When using `HOST_NETWORK: "on"` is there anything ...
# install
c
When using
HOST_NETWORK: "on"
is there anything else I need to change? I can't find the mentioned example compose
b
there are some additional bind mounts you need. see compose file from v0.12.2 https://github.com/gravitl/netmaker/blob/v0.12.2/compose/docker-compose.hostnetwork.yml
c
So basically only
network_mode: host
for the service netmaker?
Copy code
version: "3.4"

services:
  netmaker:
    container_name: netmaker
    image: gravitl/netmaker:v0.16.0
    network_mode: host
    cap_add:
      - NET_ADMIN
      - NET_RAW
      - SYS_MODULE
    sysctls:
      - net.ipv4.ip_forward=1
      - net.ipv4.conf.all.src_valid_mark=1
      - net.ipv6.conf.all.disable_ipv6=0
      - net.ipv6.conf.all.forwarding=1
    restart: always
    volumes:
      - /home/netmaker/sqldata:/root/data
      - /home/netmaker/certs:/etc/netmaker
    environment:
      SERVER_NAME: "broker.NETMAKER_BASE_DOMAIN"
      SERVER_HOST: "SERVER_PUBLIC_IP"
      SERVER_API_CONN_STRING: "api.NETMAKER_BASE_DOMAIN:443"
      DNS_MODE: "on"
      SERVER_HTTP_HOST: "api.NETMAKER_BASE_DOMAIN"
      API_PORT: "8081"
      CLIENT_MODE: "on"
      MASTER_KEY: "REPLACE_MASTER_KEY"
      CORS_ALLOWED_ORIGIN: "*"
      DISPLAY_KEYS: "on"
      DATABASE: "sqlite"
      NODE_ID: "netmaker-server-1"
      MQ_HOST: "mq"
      MQ_PORT: "443"
      MQ_SERVER_PORT: "1883"
      HOST_NETWORK: "on"
      VERBOSITY: "1"
      MANAGE_IPTABLES: "on"
      PORT_FORWARD_SERVICES: "dns"
    ports:
      - "51821-51830:51821-51830/udp"
  netmaker-ui:
    container_name: netmaker-ui
    image: gravitl/netmaker-ui:v0.16.0
    depends_on:
      - netmaker
    links:
      - "netmaker:api"
    restart: always
    environment:
      BACKEND_URL: "https://api.NETMAKER_BASE_DOMAIN"
  mq:
    container_name: mq
    image: eclipse-mosquitto:2.0.11-openssl
    depends_on:
      - netmaker
    restart: unless-stopped
    volumes:
      - /home/mqtt/config:/mosquitto/config
      - /home/mqtt/data:/mosquitto/data
      - /home/mqtt/log:/mosquitto/log
      - /home/netmaker/certs:/mosquitto/certs
b
you are missing some bind mounts
c
Not sure what exactly you mean
b
check the volumes section
c
traefik_certs - not used shared_certs - mounted sqldata - mounted dnsconfig - not used mosquitto_data - mounted mosquitto_logs - mounted
b
what about /usr/bin/wg
c
Ah to call the hosts binary
Copy code
[netmaker] Fatal: Unable to initialize iptables on host: lookup coredns: Try again
Well I got it started now and it asks me for a login, not asking to create a user
lol
Copy code
curl -H "Authorization: Bearer x" -H 'Content-Type: application/json' localhost:8081/api/users
{"Code":500,"Message":"could not find any records"}
Copy code
curl -H "Authorization: Bearer x" -H 'Content-Type: application/json' localhost:8081/api/users/adm/hasadmin
false
Nope there still must be something wrong. Created user via API, login failed.
Nvm we can close this. Thx anyway
(I guess it's an issue with Cloudflare but I can't find anything about it)
5 Views