Skip to content

Deploying ioBroker

Introduction

ioBroker is a comprehensive, open-source home automation platform that integrates various smart home systems and IoT devices into a unified interface. Built on Node.js, ioBroker uses a modular adapter system that supports hundreds of protocols and devices, from popular platforms like Philips Hue and Sonos to industrial protocols like Modbus and MQTT.

Unlike monolithic smart home solutions, ioBroker acts as a central hub that bridges disparate systems together. Its powerful scripting engine allows complex automations, while visualization adapters like VIS enable custom dashboards for monitoring and controlling your entire home.

Key highlights of ioBroker:

  • 400+ Adapters: Connect virtually any smart home device or protocol
  • Flexible Automation: JavaScript-based scripting for complex logic and scenes
  • Custom Dashboards: VIS visualization system for building personalized interfaces
  • Multi-Host Support: Distribute adapters across multiple machines for load balancing
  • Cloud Connectivity: Optional cloud services for remote access and voice control
  • Historical Data: Built-in data logging with multiple database backends
  • Active Community: Large German and international community with extensive documentation
  • Cross-Platform: Runs on Linux, Windows, macOS, and Docker
  • Plugin Architecture: Easy extension through the adapter system
  • 100% Open Source: MIT licensed with optional commercial support

This guide walks through deploying ioBroker on Klutch.sh using Docker, configuring persistent storage, and setting up your smart home hub.

Why Deploy ioBroker on Klutch.sh

Deploying ioBroker on Klutch.sh provides several advantages for home automation:

Always-On Reliability: Your smart home hub runs 24/7 without local hardware failures affecting automation.

Simplified Deployment: Klutch.sh builds and deploys ioBroker without complex server configuration.

Persistent Storage: Adapters, configurations, and historical data survive restarts and redeployments.

HTTPS by Default: Secure access to your ioBroker admin interface from anywhere.

GitHub Integration: Track configuration changes in version control.

Scalable Resources: Allocate CPU and memory based on the number of adapters and devices.

Environment Variable Management: Store sensitive credentials securely.

Remote Access: Control your smart home from anywhere without VPN or port forwarding.

Prerequisites

Before deploying ioBroker on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your configuration
  • Basic familiarity with Docker and home automation concepts
  • Smart home devices or systems to integrate
  • Network connectivity between Klutch.sh and your local devices (VPN or cloud-connected devices)

Understanding ioBroker Architecture

ioBroker uses a modular, distributed architecture:

js-controller: The core process that manages all adapters and the object database.

Adapters: Individual modules that communicate with specific devices or services. Each adapter runs as a separate process.

Objects DB: Stores configuration, device definitions, and metadata. Uses file-based storage by default.

States DB: Stores current device states and sensor values. Can use file-based or Redis storage.

Admin Interface: Web-based UI for managing adapters, viewing logs, and configuring the system.

VIS Visualization: Drag-and-drop dashboard builder for custom smart home interfaces.

Preparing Your Repository

Create a GitHub repository for your ioBroker deployment.

Repository Structure

iobroker-deploy/
├── Dockerfile
├── README.md
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile in the root of your repository:

FROM buanet/iobroker:latest
# Set timezone
ENV TZ=${TZ:-America/New_York}
# Set language
ENV LANG=${LANG:-en_US.UTF-8}
# ioBroker packages to install on startup
ENV PACKAGES=${PACKAGES}
# Set admin interface credentials
ENV IOB_ADMINPORT=${IOB_ADMINPORT:-8081}
# Expose the admin interface
EXPOSE 8081
# Expose common adapter ports
# VIS
EXPOSE 8082
# Simple API
EXPOSE 8087
# SocketIO
EXPOSE 8084
# Health check
HEALTHCHECK --interval=60s --timeout=30s --start-period=120s --retries=3 \
CMD curl -f http://localhost:8081/ || exit 1

Advanced Dockerfile with Pre-installed Adapters

For faster deployment with common adapters:

FROM buanet/iobroker:latest
# Set timezone and locale
ENV TZ=America/New_York
ENV LANG=en_US.UTF-8
# Pre-install common adapters
ENV PACKAGES="iobroker.admin iobroker.vis iobroker.javascript iobroker.simple-api"
# Node.js settings for better performance
ENV NODE_OPTIONS="--max-old-space-size=1024"
# Admin interface port
ENV IOB_ADMINPORT=8081
# Expose ports
EXPOSE 8081 8082 8084 8087
# Health check
HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=3 \
CMD curl -f http://localhost:8081/ || exit 1

Environment Variables Reference

VariableRequiredDefaultDescription
TZNoUTCTimezone for the container
LANGNoen_US.UTF-8System locale
PACKAGESNo-Space-separated list of adapters to install
IOB_ADMINPORTNo8081Admin interface port
IOB_MULTIHOSTNo-Multihost configuration
IOB_OBJECTSDB_TYPENofileObjects database type (file, redis)
IOB_STATESDB_TYPENofileStates database type (file, redis)

Deploying ioBroker on Klutch.sh

    Push Your Repository to GitHub

    Initialize and push your repository:

    Terminal window
    git init
    git add Dockerfile .dockerignore README.md
    git commit -m "Initial ioBroker deployment configuration"
    git remote add origin https://github.com/yourusername/iobroker-deploy.git
    git push -u origin main

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project named “iobroker” or “smart-home”.

    Create a New App

    Within your project, create a new app. Connect your GitHub account and select the repository containing your Dockerfile.

    Configure HTTP Traffic

    In the deployment settings:

    • Select HTTP as the traffic type
    • Set the internal port to 8081 (admin interface)

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    TZYour timezone (e.g., America/New_York)
    LANGen_US.UTF-8
    PACKAGESiobroker.admin iobroker.javascript iobroker.vis

    Attach Persistent Volumes

    Add volumes for data persistence:

    Mount PathRecommended SizePurpose
    /opt/iobroker10 GBioBroker installation and configuration

    Deploy Your Application

    Click Deploy to start the build process. ioBroker takes several minutes to initialize on first run.

    Access ioBroker

    Once deployed, access the admin interface at https://your-app-name.klutch.sh.

Initial Configuration

First-Time Setup

On first access to the admin interface:

  1. Complete the setup wizard
  2. Set an admin password
  3. Configure basic settings like language and units

Installing Adapters

Add adapters through the admin interface:

  1. Click Adapters in the sidebar
  2. Browse or search for adapters
  3. Click the + button to install
  4. Configure adapter settings in Instances

Essential Adapters

AdapterPurpose
adminWeb-based administration interface
javascriptScripting engine for automations
visVisualization dashboard builder
simple-apiREST API for external integrations
mqttMQTT broker/client for IoT devices
historyHistorical data logging
cloudioBroker cloud connectivity

Network Considerations

For local device integration from a cloud deployment:

Cloud-Connected Devices: Many modern devices (Philips Hue, Sonos, etc.) support cloud APIs that work without local network access.

VPN Connection: Use WireGuard or Tailscale to bridge your Klutch.sh deployment to your home network.

MQTT Bridge: Run a local MQTT broker that forwards messages to your cloud ioBroker instance.

Local Companion: Run a secondary ioBroker instance locally that syncs with your cloud deployment.

Creating Automations

JavaScript Scripting

Create automations using JavaScript:

  1. Install the javascript adapter
  2. Create a new script in Scripts
  3. Use the ioBroker API for device control

Example script:

// Turn on lights when motion is detected
on({id: 'motion.sensor.living_room', val: true}, function() {
setState('hue.0.light1.on', true);
// Turn off after 5 minutes
setTimeout(function() {
setState('hue.0.light1.on', false);
}, 5 * 60 * 1000);
});

Blockly Visual Programming

For no-code automations:

  1. Enable Blockly in the JavaScript adapter
  2. Create scripts using drag-and-drop blocks
  3. Combine triggers, conditions, and actions visually

Building Dashboards

VIS Visualization

Create custom dashboards with VIS:

  1. Install the vis adapter
  2. Access VIS at port 8082
  3. Add widgets for switches, charts, and cameras
  4. Design responsive layouts for mobile and desktop

Dashboard Widgets

  • Switches and buttons: Control devices
  • Gauges and charts: Display sensor data
  • Images and cameras: Live video feeds
  • Custom HTML: Advanced visualizations

Security Best Practices

  • Set Strong Passwords: Secure the admin interface with a strong password
  • Enable HTTPS: Always use HTTPS for remote access (provided by Klutch.sh)
  • Limit Adapter Access: Only install trusted adapters
  • Review Permissions: Check adapter permissions before installation
  • Regular Backups: Export configurations regularly

Troubleshooting

Adapter Not Connecting

  • Verify network connectivity to the device
  • Check adapter logs for specific errors
  • Ensure correct credentials and settings

High Memory Usage

  • Increase container memory allocation
  • Reduce history retention periods
  • Disable unused adapters

Slow Performance

  • Allocate more CPU resources
  • Use Redis for states database
  • Reduce logging verbosity

Additional Resources

Conclusion

Deploying ioBroker on Klutch.sh gives you a powerful, always-on home automation platform accessible from anywhere. With its extensive adapter ecosystem and flexible automation capabilities, ioBroker can unify your entire smart home ecosystem into a single, manageable interface.

Whether you’re connecting a few smart lights or building a comprehensive home automation system, ioBroker on Klutch.sh provides the reliability and accessibility you need for a truly smart home.