Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. English
    3. ioBroker general
    4. Run iobroker behind a proxy

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Run iobroker behind a proxy

    This topic has been deleted. Only users with topic management privileges can see it.
    • Peter Bauer
      Peter Bauer last edited by

      Hi *!

      Since I had to run iobroker behind a web proxy, I had to solve the issue that node does not support proxy requests out of the box.

      The solution was to install node-global-proxy like this

      # make npm proxy ready
      > npm config set proxy http://192.168.0.1:8080
      
      # next, install node-global-proxy in iobroker directory
      > cd /opt/iobroker
      > npm install node-global-proxy --save
      
      # edit controller.js
      > vi /opt/iobroker/node_modules/iobroker.js-controller/controller.js
      

      and make sure it looks like this:

      /**
       *      Redirect for older installations
       *
       *      Copyright 2018-2022 bluefox <dogafox@gmail.com>,
       *      MIT License
       *
       */
      const proxy = require("node-global-proxy").default;
       
      proxy.setConfig("proxy.corp.itserv.de:8080");
      proxy.start();
      
      require('./main').init();
      

      just in case this helps somebody in the future.

      If the integration can be done better than editing controller.js, please tell me. Thank you.

      1 Reply Last reply Reply Quote 1
      • First post
        Last post

      Support us

      ioBroker
      Community Adapters
      Donate

      1.1k
      Online

      31.6k
      Users

      79.6k
      Topics

      1.3m
      Posts

      1
      1
      341
      Loading More Posts
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      Community
      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
      The ioBroker Community 2014-2023
      logo