Self-hosting. Komodo
Π£Π½ΠΈΠ²Π΅ΡΡΠ°Π»ΡΠ½ΡΠΉ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ docker ΠΈ docker compose Ρ Π³ΠΈΠ±ΠΊΠΎΠΉ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡΡ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ ΠΈ Ρ ΡΠ°Π½Π΅Π½ΠΈΡ ΠΈΡΡ ΠΎΠ΄Π½ΡΡ ΡΠ°ΠΉΠ»ΠΎΠ², Π° ΡΠ°ΠΊ ΠΆΠ΅ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡΠΌΠΈ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΠ·Π°ΡΠΈΠΈ ΡΠ°Π±ΠΎΡΡ Ρ ΠΊΠΎΠ½ΡΠ΅ΠΉΠ½Π΅ΡΠ°ΠΌΠΈ.
Π Π΅ΠΏΠΎΠ·ΠΈΡΠΎΡΠΈΠΉ: https://github.com/moghtech/komodo
ΠΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΠΈΡ: Komodo

ΠΡΠΈΠΌΠ΅Ρ docker compose ΡΠ°ΠΉΠ»Π°:
###################################
# π¦ KOMODO COMPOSE - FERRETDB π¦ #
###################################
## This compose file will deploy:
## 1. Postgres + FerretDB Mongo adapter (https://www.ferretdb.com)
## 2. Komodo Core
## 3. Komodo Periphery
services:
postgres:
# π¨ Pin to a specific version. Updates can be breaking.
# https://github.com/FerretDB/documentdb/pkgs/container/postgres-documentdb
image: ghcr.io/ferretdb/postgres-documentdb
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
# ports:
# - 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${KOMODO_DB_USERNAME}
POSTGRES_PASSWORD: ${KOMODO_DB_PASSWORD}
POSTGRES_DB: postgres
ferretdb:
# π¨ Pin to a specific version. Updates can be breaking.
# https://github.com/FerretDB/FerretDB/pkgs/container/ferretdb
image: ghcr.io/ferretdb/ferretdb
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
depends_on:
- postgres
# ports:
# - 27017:27017
volumes:
- ferretdb-state:/state
environment:
FERRETDB_POSTGRESQL_URL: postgres://${KOMODO_DB_USERNAME}:${KOMODO_DB_PASSWORD}@postgres:5432/postgres
core:
image: ghcr.io/moghtech/komodo-core:${COMPOSE_KOMODO_IMAGE_TAG:-latest}
container_name: komodo-core
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
depends_on:
- ferretdb
ports:
- 9120:9120
env_file: .env
environment:
KOMODO_DATABASE_ADDRESS: ferretdb:27017
KOMODO_DATABASE_USERNAME: ${KOMODO_DB_USERNAME}
KOMODO_DATABASE_PASSWORD: ${KOMODO_DB_PASSWORD}
volumes:
## Store dated backups of the database - https://komo.do/docs/setup/backup
- ${COMPOSE_KOMODO_BACKUPS_PATH}:/backups
## Store sync files on server
# - /path/to/syncs:/syncs
## Optionally mount a custom core.config.toml
# - /path/to/core.config.toml:/config/config.toml
## Allows for systemd Periphery connection at
## "https://host.docker.internal:8120"
# extra_hosts:
# - host.docker.internal:host-gateway
## Deploy Periphery container using this block,
## or deploy the Periphery binary with systemd using
## https://github.com/moghtech/komodo/tree/main/scripts
periphery:
image: ghcr.io/moghtech/komodo-periphery:${COMPOSE_KOMODO_IMAGE_TAG:-latest}
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
user: "1000:990"
env_file: .env
volumes:
## Mount external docker socket
- /var/run/docker.sock:/var/run/docker.sock
## Allow Periphery to see processes outside of container
- /proc:/proc
## Specify the Periphery agent root directory.
## Must be the same inside and outside the container,
## or docker will get confused. See https://github.com/moghtech/komodo/discussions/180.
## Default: /etc/komodo.
- /home/deniom/docker:/home/deniom/docker
- /home/deniom/docker/komodo/ssl:/etc/komodo/ssl
volumes:
# Postgres
postgres-data:
# FerretDB
ferretdb-state:
####################################
# π¦ KOMODO COMPOSE - VARIABLES π¦ #
####################################
## These compose variables can be used with all Komodo deployment options.
## Pass these variables to the compose up command using `--env-file komodo/compose.env`.
## Additionally, they are passed to both Komodo Core and Komodo Periphery with `env_file: ./compose.env`,
## so you can pass any additional environment variables to Core / Periphery directly in this file as well.
## Stick to a specific version, or use `latest`
COMPOSE_KOMODO_IMAGE_TAG=latest
## Store dated database backups on the host - https://komo.do/docs/setup/backup
COMPOSE_KOMODO_BACKUPS_PATH=/etc/komodo/backups
## DB credentials
KOMODO_DB_USERNAME=admin
KOMODO_DB_PASSWORD=admin
## Configure a secure passkey to authenticate between Core / Periphery.
KOMODO_PASSKEY=<key>
## Set your time zone for schedules
## https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TZ=Europe/Moscow
#=-------------------------=#
#= Komodo Core Environment =#
#=-------------------------=#
## Full variable list + descriptions are available here:
## π¦ https://github.com/moghtech/komodo/blob/main/config/core.config.toml π¦
## Note. Secret variables also support `${VARIABLE}_FILE` syntax to pass docker compose secrets.
## Docs: https://docs.docker.com/compose/how-tos/use-secrets/#examples
## Used for Oauth / Webhook url suggestion / Caddy reverse proxy.
KOMODO_HOST=https://komodo.domein.ru
## Displayed in the browser tab.
KOMODO_TITLE=Komodo
## Create a server matching this address as the "first server".
## Use `https://host.docker.internal:8120` when using systemd-managed Periphery.
KOMODO_FIRST_SERVER=https://periphery:8120
## Give the first server a custom name.
KOMODO_FIRST_SERVER_NAME=Local
## Make all buttons just double-click, rather than the full confirmation dialog.
KOMODO_DISABLE_CONFIRM_DIALOG=false
## Rate Komodo polls your servers for
## status / container status / system stats / alerting.
## Options: 1-sec, 5-sec, 15-sec, 1-min, 5-min, 15-min
## Default: 15-sec
KOMODO_MONITORING_INTERVAL="15-sec"
## Interval at which to poll Resources for any updates / automated actions.
## Options: 15-min, 1-hr, 2-hr, 6-hr, 12-hr, 1-day
## Default: 1-hr
KOMODO_RESOURCE_POLL_INTERVAL="1-hr"
## Used to auth incoming webhooks. Alt: KOMODO_WEBHOOK_SECRET_FILE
KOMODO_WEBHOOK_SECRET=a_random_secret
## Used to generate jwt. Alt: KOMODO_JWT_SECRET_FILE
KOMODO_JWT_SECRET=a_random_jwt_secret
## Time to live for jwt tokens.
## Options: 1-hr, 12-hr, 1-day, 3-day, 1-wk, 2-wk
KOMODO_JWT_TTL="1-day"
## Enable login with username + password.
KOMODO_LOCAL_AUTH=true
## Set the initial admin username created upon first launch.
## Comment out to disable initial user creation,
## and create first user using signup button.
#KOMODO_INIT_ADMIN_USERNAME=admin
## Set the initial admin password
KOMODO_INIT_ADMIN_PASSWORD=changeme
## Disable new user signups.
KOMODO_DISABLE_USER_REGISTRATION=false
## All new logins are auto enabled
KOMODO_ENABLE_NEW_USERS=false
## Disable non-admins from creating new resources.
KOMODO_DISABLE_NON_ADMIN_CREATE=false
## Allows all users to have Read level access to all resources.
KOMODO_TRANSPARENT_MODE=false
## Prettier logging with empty lines between logs
KOMODO_LOGGING_PRETTY=false
## More human readable logging of startup config (multi-line)
KOMODO_PRETTY_STARTUP_CONFIG=false
## OIDC Login
KOMODO_OIDC_ENABLED=true
## Must reachable from Komodo Core container
KOMODO_OIDC_PROVIDER=https://authentik.domen.ru/application/o/komodo/
## Change the host to one reachable be reachable by users (optional if it is the same as above).
## DO NOT include the `path` part of the URL.
# KOMODO_OIDC_REDIRECT_HOST=https://oidc.provider.external
## Your OIDC client id
KOMODO_OIDC_CLIENT_ID=<authentik_id> # Alt: KOMODO_OIDC_CLIENT_ID_FILE
## Your OIDC client secret.
## If your provider supports PKCE flow, this can be ommitted.
KOMODO_OIDC_CLIENT_SECRET=<authentik_secret> # Alt: KOMODO_OIDC_CLIENT_SECRET_FILE
## Make usernames the full email.
## Note. This does not work for all OIDC providers.
# KOMODO_OIDC_USE_FULL_EMAIL=true
## Add additional trusted audiences for token claims verification.
## Supports comma separated list, and passing with _FILE (for compose secrets).
# KOMODO_OIDC_ADDITIONAL_AUDIENCES=abc,123 # Alt: KOMODO_OIDC_ADDITIONAL_AUDIENCES_FILE
## Github Oauth
KOMODO_GITHUB_OAUTH_ENABLED=false
# KOMODO_GITHUB_OAUTH_ID= # Alt: KOMODO_GITHUB_OAUTH_ID_FILE
# KOMODO_GITHUB_OAUTH_SECRET= # Alt: KOMODO_GITHUB_OAUTH_SECRET_FILE
## Google Oauth
KOMODO_GOOGLE_OAUTH_ENABLED=false
# KOMODO_GOOGLE_OAUTH_ID= # Alt: KOMODO_GOOGLE_OAUTH_ID_FILE
# KOMODO_GOOGLE_OAUTH_SECRET= # Alt: KOMODO_GOOGLE_OAUTH_SECRET_FILE
## Aws - Used to launch Builder instances.
KOMODO_AWS_ACCESS_KEY_ID= # Alt: KOMODO_AWS_ACCESS_KEY_ID_FILE
KOMODO_AWS_SECRET_ACCESS_KEY= # Alt: KOMODO_AWS_SECRET_ACCESS_KEY_FILE
#=------------------------------=#
#= Komodo Periphery Environment =#
#=------------------------------=#
## Full variable list + descriptions are available here:
## π¦ https://github.com/moghtech/komodo/blob/main/config/periphery.config.toml π¦
## Specify the root directory used by Periphery agent.
PERIPHERY_ROOT_DIRECTORY=/etc/komodo
## Periphery passkeys must include KOMODO_PASSKEY to authenticate.
PERIPHERY_PASSKEYS=${KOMODO_PASSKEY}
## Specify whether to disable the terminals feature
## and disallow remote shell access (inside the Periphery container).
PERIPHERY_DISABLE_TERMINALS=false
## Enable SSL using self signed certificates.
## Connect to Periphery at https://address:8120.
PERIPHERY_SSL_ENABLED=true
## If the disk size is overreporting, can use one of these to
## whitelist / blacklist the disks to filter them, whichever is easier.
## Accepts comma separated list of paths.
## Usually whitelisting just /etc/hostname gives correct size.
PERIPHERY_INCLUDE_DISK_MOUNTS=/etc/hostname
# PERIPHERY_EXCLUDE_DISK_MOUNTS=/snap,/etc/repos
## Prettier logging with empty lines between logs
PERIPHERY_LOGGING_PRETTY=false
## More human readable logging of startup config (multi-line)
PERIPHERY_PRETTY_STARTUP_CONFIG=false
ΠΡΠ½ΠΎΠ²Π½ΡΠ΅ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΡ:
KOMODO_PASSKEY - ΠΏΠ°ΡΠΎΠ»Ρ Π°Π²ΡΠΎΡΠΈΠ·Π°ΡΠΈΠΈ Π΄Π»Ρ komodo agent
KOMODO_OIDC_PROVIDER - ΡΡΡΠ»ΠΊΠ° Π½Π° ΠΏΡΠΎΠ²Π°ΠΉΠ΄Π΅ΡΠ° Π°Π²ΡΠΎΡΠΈΠ·Π°ΡΠΈΠΈ
KOMODO_OIDC_CLIENT_ID - Π2A ΠΊΠ»ΠΈΠ΅Π½Ρ id
KOMODO_OIDC_CLIENT_SECRET - ΠΊΠ»ΠΈΠ΅Π½Ρ ΡΠ΅ΠΊΡΠ΅Ρ
ΠΡΠΈΠΌΠ΅ΡΠ°Π½ΠΈΠ΅:: ΠΠ°ΡΠ°ΠΌΠ΅ΡΡΡ env Π΄Π»Ρ komodo
ΠΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅ Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΡΡ ΡΠ΅ΡΠ²Π΅ΡΠΎΠ²
####################################
# π¦ KOMODO COMPOSE - PERIPHERY π¦ #
####################################
services:
periphery:
image: ghcr.io/moghtech/komodo-periphery:${COMPOSE_KOMODO_IMAGE_TAG:-latest}
container_name: komodo-agent-${SERVER_NAME}
# user Π΄ΠΎΠ±Π°Π²Π»ΡΠ΅ΠΌ Π΄Π»Ρ ΡΠΎΠ·Π΄Π°Π½ΠΈΡ ΡΠ°ΠΉΠ»ΠΎΠ² ΠΏΠΎΠ΄ ΠΊΠΎΠ½ΠΊΡΠ΅ΡΠ½ΡΠΌ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Π΅ΠΌ
user: "${UID}:${DOCKER_GID}"
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /proc:/proc
# Π’ΠΎΡΠΊΠ° ΠΌΠΎΠ½ΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΠΊ ΠΏΠ°ΠΏΠΊΠ΅ Ρ docker compose, ΠΏΡΡΡ Π΄ΠΎΠ»ΠΆΠ΅Π½ ΠΏΠΎΠ»Π½ΠΎΡΡΡΡ ΡΠΎΠΎΡΠ²Π΅ΡΠ²ΡΡΠ²Π°ΡΡ Π² ΠΊΠΎΠ½ΡΠ΅ΠΉΠ½Π΅ΡΠ΅ ΠΈ Ρ
ΠΎΡΡΠ΅
- ${PERIPHERY_DATA_DIR}:${PERIPHERY_DATA_DIR}
# ΠΠ°ΠΏΠΊΠ° Ρ
ΡΠ°Π½Π΅Π½ΠΈΡ ΡΠ΅ΡΡΠΈΡΠΈΠΊΠ°ΡΠ° ssl ΡΠΎΠ·Π΄Π°ΡΡ ΠΎΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ user, Π½Π΅ΠΎΠ±Ρ
ΠΎΠ΄ΠΈΠΌΠΎ Π΅ΡΠ»ΠΈ ΡΠΊΠ°Π·ΡΠ²Π°ΡΡ user
- ${PERIPHERY_SSL_DIR}:/etc/komodo/ssl
ports:
- 8120:8120
# ΠΠ΅ΡΡΠΈΡ ΠΎΠ±ΡΠ°Π·Π° Komodo Periphery
COMPOSE_KOMODO_IMAGE_TAG=latest
# ΠΠΌΡ ΡΠ΅ΡΠ²Π΅ΡΠ° (Π»ΡΠ±ΠΎΠΉ ΠΏΠΎΠ½ΡΡΠ½ΡΠΉ ΡΠ΅Π±Π΅ ΠΈΠ΄Π΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΎΡ)
SERVER_NAME=monitoring
# ΠΏΠ΅ΡΠ²ΡΠΉ UID ΡΡΠΎ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΡΠΉ - ΠΎΠΏΡΠ΅Π΄Π΅Π»ΠΈΡΡ ΠΊΠΎΠΌΠ°Π½Π΄ΠΎΠΉ id
# Π²ΡΠΎΡΠΎΠΉ DOCKER_GID Π³ΡΡΠΏΠΏΡ docker - ΠΎΠΏΡΠ΅Π΄Π΅Π»ΠΈΡΡ ΠΊΠΎΠΌΠ°Π½Π΄ΠΎΠΉ getent group docker
UID=1000
DOCKER_GID=999
# ΠΠ°ΡΠ°Π»ΠΎΠ³ Ρ Π΄Π°Π½Π½ΡΠΌΠΈ docker-compose
PERIPHERY_DATA_DIR=/home/deniom/docker
# SSL-ΠΏΠ°ΠΏΠΊΠ° Π΄Π»Ρ Periphery
PERIPHERY_SSL_DIR=/home/deniom/docker/komodo-agent/ssl
# ΠΠΎΡΠ½Π΅Π²ΠΎΠΉ ΠΊΠ°ΡΠ°Π»ΠΎΠ³ ΠΏΠ΅ΡΠ΅ΡΠΈΡΠΈΠΈ (ΠΌΠΎΠΆΠ΅Ρ Π±ΡΡΡ ΠΈΠ·ΠΌΠ΅Π½ΡΠ½)
PERIPHERY_ROOT_DIRECTORY=/etc/komodo
# ΠΠ»ΡΡ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΠΈΠ· ΡΠ²ΠΎΠΉΡΡΠ²Π° KOMODO_PASSKEY komodo server
PERIPHERY_PASSKEYS=<ΠΊΠ»ΡΡ>
# ΠΠΊΠ»ΡΡΠΈΡΡ SSL
PERIPHERY_SSL_ENABLED=true
# Π Π°Π·ΡΠ΅ΡΠΈΡΡ ΡΠ΅ΡΠΌΠΈΠ½Π°Π»Ρ/Π΄ΠΎΡΡΡΠΏ ΠΊ shell
PERIPHERY_DISABLE_TERMINALS=false
# ΠΠ°ΠΊΠΈΠ΅ ΡΠΎΡΠΊΠΈ ΠΌΠΎΠ½ΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΡΡΠΈΡΡΠ²Π°ΡΡ ΠΏΡΠΈ ΠΏΠΎΠ΄ΡΡΡΡΠ΅ Π΄ΠΈΡΠΊΠΎΠ²
PERIPHERY_INCLUDE_DISK_MOUNTS=/etc/hostname
ΠΠ°ΡΠ°ΠΌΠ΅ΡΡΡ:
SERVER_NAME - ΠΈΠΌΡ ΡΠ΅ΡΠ²Π΅ΡΠ° Π² ΡΡΠ΅Π΄Π΅ komodo
UID - id ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΠΎΡ ΡΡΠ΅Π³ΠΎ ΠΈΠΌΠ΅Π½ΠΈ Π±ΡΠ΄ΡΡ ΡΠΎΠ·Π΄Π°Π²Π°ΡΡΡΡ ΡΠ°ΠΉΠ»Ρ
DOCKER_GID - id Π³ΡΡΠΏΠΏΡ docker Π΄Π»Ρ Π·Π°ΠΏΡΡΠΊΠ° ΠΏΠΎΠ΄ ΠΎΠ³ΡΠ°Π½ΠΈΡΠ΅Π½Π½ΡΠΌΠΈ ΠΏΡΠ°Π²Π°ΠΌΠΈ
PERIPHERY_DATA_DIR - ΠΎΡΠ½ΠΎΠ²Π½Π°Ρ ΠΏΠ°ΠΏΠΊΠ° Ρ
ΡΠ°Π½Π΅Π½ΠΈΡ docker compose ΡΠ°ΠΉΠ»ΠΎΠ²
PERIPHERY_SSL_DIR - ΠΏΠ°ΠΏΠΊΠ° Ρ
ΡΠ°Π½Π΅Π½ΠΈΡ ΡΠ°ΠΌΠΎΠ²ΡΠΏΡΡΠ΅Π½Π½ΡΡ
ΡΠ΅ΡΡΠΈΡΠΈΠΊΠ°ΡΠΎΠ² ssl, Π½Π΅ΠΎΠ±Ρ
ΠΎΠ΄ΠΈΠΌΠΎ ΡΠΎΠ·Π΄Π°Π²Π°ΡΡ ΠΏΠΎΠ΄ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Π΅ΠΌ ΠΈΠ· UID Π΄ΠΎ ΠΏΠ΅ΡΠ²ΠΎΠ³ΠΎ Π·Π°ΠΏΡΡΠΊΠ° ΠΊΠΎΠ½ΡΠ΅ΠΉΠ½Π΅ΡΠ°, ΠΈΠ½Π°ΡΠ΅ Π±ΡΠ΄Π΅Ρ ΠΎΡΠΈΠ±ΠΊΠ°.
PERIPHERY_PASSKEYS - ΠΊΠ»ΡΡ Π°Π²ΡΠΎΡΠΈΠ·Π°ΡΠΈΠΈ ΠΌΠ΅ΠΆΠ΄Ρ ΡΠ΅ΡΠ²Π΅ΡΠΎΠΌ ΠΈ Π°Π³Π΅Π½ΡΠΎΠΌ, ΡΠΌΠΎΡΡΠΈ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡ KOMODO_PASSKEY
ΠΡΠΈΠΌΠ΅ΡΠ°Π½ΠΈΠ΅:: ΠΠ°ΡΠ°ΠΌΠ΅ΡΡΡ env Π΄Π»Ρ komodo agent
ΠΠΎΠ»Π΅Π·Π½ΠΎΠ΅:
- ΠΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ ΡΠ΅ΡΠ²Π΅ΡΠΎΠ² Π² komodo
- Π£ΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ docker compose Π² komodo
- Π£Π²Π΅Π΄ΠΎΠΌΠ»Π΅Π½ΠΈΡ ΠΈΠ· komodo Π² telegram
- ΠΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅ komodo ΠΊ authentik
ΠΡΠΈΠΌΠ΅ΡΠ°Π½ΠΈΠ΅:: Docker compose ΠΎΡΠΊΠ΅ΡΡΡΠ°ΡΠΎΡ