# Identity Server configuration
# Email configuration for "thethings.example.com"
is:
  email:
    sender-name: 'The Things Stack'
    sender-address: 'noreply@192.168.0.8'
    network:
      name: 'The Things Stack'
      console-url: 'https://192.168.0.8/console'
      identity-server-url: 'https://192.168.0.8/oauth'

    # If sending email with Sendgrid
    # provider: sendgrid
    # sendgrid:
    #   api-key: '...'              # enter Sendgrid API key

    # If sending email with SMTP
    # provider: smtp
    # smtp:
    #   address:  '...'             # enter SMTP server address
    #   username: '...'             # enter SMTP server username
    #   password: '...'             # enter SMTP server password

  # Web UI configuration for "thethings.example.com":
  oauth:
    ui:
      canonical-url: 'https://192.168.0.8/oauth'
      is:
        base-url: 'https://192.168.0.8/api/v3'

# HTTP server configuration
http:
  cookie:
    block-key: '0967cd08a2936411fa5c1ef607c4649d90bf1cd258531546604cf91748258112'
    hash-key: 'a29410cda4a7a50bc4a5e79c695d583e99c8a9b7bba1b39e3222c0aed0f694847a11671ba32295786148ab25da042ba1be8201ee331c0cc275f615cc48387b45'
  metrics:
    password: 'metrics'
  pprof:
    password: 'pprof'

# If using custom certificates:
tls:
  source: file
  root-ca: /run/secrets/ca.pem
  certificate: /run/secrets/cert.pem
  key: /run/secrets/key.pem

# Let's encrypt for "thethings.example.com"
#tls:
#  source: 'acme'
#  acme:
#    dir: '/var/lib/acme'
#    email: 'you@thethings.example.com'
#    hosts: ['thethings.example.com']
#    default-host: 'thethings.example.com'

# If Gateway Server enabled, defaults for "thethings.example.com":
gs:
  mqtt:
    public-address: '192.168.0.8:1882'
    public-tls-address: '192.168.0.8:8882'
  mqtt-v2:
    public-address: '192.168.0.8:1881'
    public-tls-address: '192.168.0.8:8881'

# If Gateway Configuration Server enabled, defaults for "thethings.example.com":
gcs:
  basic-station:
    default:
      lns-uri: 'wss://192.168.0.8:8887'
  the-things-gateway:
    default:
      mqtt-server: 'mqtts://192.168.0.8:8881'

# Web UI configuration for "thethings.example.com":
console:
  ui:
    canonical-url: 'https://192.168.0.8/console'
    is:
      base-url: 'https://192.168.0.8/api/v3'
    gs:
      base-url: 'https://192.168.0.8/api/v3'
    gcs:
      base-url: 'https://192.168.0.8/api/v3'
    ns:
      base-url: 'https://192.168.0.8/api/v3'
    as:
      base-url: 'https://192.168.0.8/api/v3'
    js:
      base-url: 'https://192.168.0.8/api/v3'
    qrg:
      base-url: 'https://192.168.0.8/api/v3'
    edtc:
      base-url: 'https://192.168.0.8/api/v3'
    dcs:
      base-url: 'https://192.168.0.8/api/v3'

  oauth:
    authorize-url: 'https://192.168.0.8/oauth/authorize'
    token-url: 'https://192.168.0.8/oauth/token'
    logout-url: 'https://192.168.0.8/oauth/logout'
    client-id: 'console'
    client-secret: 'console'

# If Application Server enabled, defaults for "thethings.example.com":
as:
  mqtt:
    public-address: '192.168.0.8:1883'
    public-tls-address: '192.168.0.8:8883'
  webhooks:
    downlink:
      public-address: '192.168.0.8:1885/api/v3'

# If Device Claiming Server enabled, defaults for "thethings.example.com":
dcs:
  oauth:
    authorize-url: 'https://192.168.0.8/oauth/authorize'
    token-url: 'https://192.168.0.8/oauth/token'
    logout-url: 'https://192.168.0.8/oauth/logout'
    client-id: 'device-claiming'
    client-secret: 'device-claiming'          # choose or generate a secret
  ui:
    canonical-url: 'https://192.168.0.8/claim'
    as:
      base-url: 'https://192.168.0.8/api/v3'
    dcs:
      base-url: 'https://192.168.0.8/api/v3'
    is:
      base-url: 'https://192.168.0.8/api/v3'
    ns:
      base-url: 'https://192.168.0.8/api/v3'
