FLECS Core aka flecsd
  • Rust 97.7%
  • Mustache 1.7%
  • Shell 0.4%
  • Dockerfile 0.1%
Find a file
Lukas Simon 347c92975d
All checks were successful
Pull Request / Validate code format with cargo fmt (pull_request) Successful in 30s
Pull Request / Check if code compiles (pull_request) Successful in 3m47s
Pull Request / Lint code with cargo clippy (pull_request) Successful in 3m29s
Pull Request / Run tests (pull_request) Successful in 4m42s
Pull Request / Create test coverage (pull_request) Successful in 4m44s
Pull Request / Create source code documentation (pull_request) Successful in 1m48s
Pull Request / build (amd64, x86_64-unknown-linux-gnu) (pull_request) Successful in 5m30s
Pull Request / build (arm64, aarch64-unknown-linux-gnu) (pull_request) Successful in 5m8s
Pull Request / bake (pull_request) Successful in 9m32s
Pull Request / build (pull_request) Successful in 0s
Pull Request / prepare_build_image (pull_request) Successful in 3m6s
Develop / build (amd64, x86_64-unknown-linux-gnu) (push) Successful in 9m38s
Develop / build (arm64, aarch64-unknown-linux-gnu) (push) Successful in 10m13s
Develop / bake (push) Successful in 8m1s
Develop / build-and-push (push) Successful in 0s
Develop / prepare_build_image (push) Successful in 3m24s
feat(enthrallment): Update capabilities if onboarding already completed
2026-06-01 11:00:08 +02:00
.cargo refactor(docker): Switch from alpine/musl to debian/gnu 2026-04-25 21:25:33 +02:00
.forgejo ci: remove obsolete dockerhub proxy workaround 2026-04-25 21:25:33 +02:00
.idea/codeStyles Set clang format as formatter for jetbrains IDEs 2024-04-11 14:05:23 +02:00
.vscode Remove obsolete vscode cpp config 2026-03-06 15:35:08 +01:00
api api: Provide sbom in spdx or cyclonedx format 2026-03-30 16:14:34 +02:00
docker feat(casbin_policy): Let general flecs roles inherit permissions from core roles 2026-04-30 11:22:08 +02:00
examples quest: Adapt princess_quest example to SyncQuestExt API 2026-03-30 17:02:28 +02:00
flecs-core feat(enthrallment): Update capabilities if onboarding already completed 2026-06-01 11:00:08 +02:00
flecs-healthcheck Add healthcheck 2026-03-30 10:51:33 +02:00
flecs_app_manifest refactor: Move large test modules into separate files 2026-05-27 09:35:19 +02:00
flecsd refactor: Switch to aws-lc-rs crypto backend 2026-04-16 11:49:12 +02:00
flecsd_axum_server clippy: Auto fix for new clippy lints from rust 1.94 2026-03-30 10:51:33 +02:00
flecstract flecstract: Set ownership on extracting files 2026-03-09 15:36:01 +01:00
schema Add title to dos manifest, correct path to dos manifest schema 2024-08-19 16:13:02 +02:00
supply-chain cargo-vet: Initial vetting of dependencies 2024-11-18 14:20:49 +01:00
.clang-format Update submodule flecs-build 2023-12-07 13:37:22 +01:00
.dockerignore Switch to distroless Docker image and adapt ci workflows 2026-03-30 11:02:03 +02:00
.gitignore Switch to distroless Docker image and adapt ci workflows 2026-03-30 11:02:03 +02:00
about.hbs Switch to distroless Docker image and adapt ci workflows 2026-03-30 11:02:03 +02:00
about.html.hbs Switch to distroless Docker image and adapt ci workflows 2026-03-30 11:02:03 +02:00
about.toml refactor: Switch to aws-lc-rs crypto backend 2026-04-16 11:49:12 +02:00
api-spec.yaml api: Provide sbom in spdx or cyclonedx format 2026-03-30 16:14:34 +02:00
auditable-cargo Hack corrosion into calling 'cargo auditable' 2025-11-07 15:06:15 +01:00
build.sh refactor(docker): Switch from alpine/musl to debian/gnu 2026-04-25 21:25:33 +02:00
Cargo.lock chore(deps): update astral-tokio-tar to 0.6.1 2026-04-29 12:13:42 +02:00
Cargo.toml chore: Switch dependency flecs_console_client from submodule to git dependency 2026-04-10 11:53:17 +02:00
cargo_vet.json cargo-vet: Initial vetting of dependencies 2024-11-18 14:20:49 +01:00
check.sh Switch to distroless Docker image and adapt ci workflows 2026-03-30 11:02:03 +02:00
cmake.sh Remove support for armhf architecture 2025-11-07 15:06:05 +01:00
CMakeLists.txt refactor(docker): Switch from alpine/musl to debian/gnu 2026-04-25 21:25:33 +02:00
CODE_OF_CONDUCT.md FLECS closed beta 0.1-b1 2021-12-10 14:37:39 +01:00
docker-bake.hcl Switch to distroless Docker image and adapt ci workflows 2026-03-30 11:02:03 +02:00
LICENSE Initial commit 2021-10-17 21:21:57 +02:00
README.md Replace hardcoded version references with 'latest' 2026-03-12 10:56:22 +01:00
rust-toolchain.toml refactor(docker): Switch from alpine/musl to debian/gnu 2026-04-25 21:25:33 +02:00
SECURITY.md Update SECURITY.md 2022-06-29 16:15:52 +02:00

FLECS - The World of Automation

We make the world’s automation solutions available at one place, with one click!

How To Build

Cloning the sources

If you are new to FLECS, make sure to clone recursively:

git clone --recurse-submodules https://github.com/flecs-technologies/flecs-public

If you have cloned the source code earlier, make sure to initialize submodules:

git submodule update --init

Requirements

It is recommended to use our official Docker image for building. To do so, run

docker run -it --rm --name flecs-build -v $(pwd):$(pwd) -w $(pwd) flecspublic.azurecr.io/flecs-build:latest

from the repository's root directory.

If you intend to build Docker images as well (such as our System Apps), make sure to mount yout local Docker socket:

docker run -it --rm --name flecs-build -v $(pwd):$(pwd) -v /run/docker.sock:/run/docker.sock -w $(pwd) flecspublic.azurecr.io/flecs-build:latest

Note: It is recommended to use the Docker image tag that corresponds to the Git tag you are building.

The other way

If you don't want to use our Docker image for whatever reason, here is what you will need:

  • CMake >= 3.25
  • Ninja >= 1.11.1
  • gcc >= 12.2.0
  • g++ >= 12.2.0
  • libudev-dev >= 252

While older versions might work, they are neither tested not officially supported.

Dependencies

For a list of up-to-date 3rd party dependencies, refer to LICENSE-3RDPARTY.

Our official Docker image to build FLECS contains prebuilt externals for all architectures. They are located in /usr/local and can be extracted using

CONTAINER_ID=`docker create flecspublic.azurecr.io/flecs-build:latest`
docker cp ${CONTAINER_ID}:/usr/local <target dir>
docker rm ${CONTAINER_ID}

Alternatively, your distribution of Linux might provide suitable packages in their respective package repositories, official or unofficial.

The from-scratch way

To also build all dependencies from source, refer to flecs-build for more information.

Building

  1. Configuration:
cmake -G Ninja -B build/${ARCH} -DARCH=${ARCH} -DCMAKE_INSTALL_PREFIX=out/${ARCH}

ARCH has to be one of (amd64|arm64)

  1. a. Building the whole project
cmake --build build/${ARCH}
  1. b. Building single targets
cmake --build build/${ARCH} --target <target>
  1. Installing
cmake --build build/${ARCH} --target install

As FLECS is intended to run as Docker container, install will merely prepare the build artifacts for further packaging. out/${ARCH}/flecsd/docker will contain runtime binaries and libraries, while out/${ARCH}/flecsd/pkg will contain surrounding scripts and init services.

flecsd runtime configuration

Some settings can be configured via environment variables and a config file. The config will be loaded once on every startup. The default location for the config file is /var/lib/flecs/config.toml which can be overwritten by setting the environment variable FLECS_CORE_CONFIG_PATH. The following config.toml with default values will explain all the settings.

# The only required field which defines the version of the config file format. Currently, there is only version 1.
version = 1

# The filter applied to the log printed to standard output. Look at
# https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives for the syntax.
# Default: "debug" for debug builds, "info,tower_http=debug,axum::rejection=debug" for release builds
# Environment variable: RUST_LOG.
tracing_filter = "info,tower_http=debug,axum::rejection=debug"

# The base directory of the persistant files written directly by flecsd. The base directories of modules will be derived
# from this if they are not explicitly set.
# Default: "/var/lib/flecs/". 
# Environment variable: FLECS_CORE_BASE_PATH
base_path = "/var/lib/flecs/"

[export]
# The base directory for exports, i.e. where exports are created and stored. If this is not set it will be derived from
# the general flecsd base_path.
# Default: "<flecsd-base_path>/export"
# Environment variable: FLECS_CORE_EXPORT_BASE_PATH
base_path = "/var/lib/flecs/export"

# The timeout in seconds for exporting an app image.
# Default: max signed 64bit integer = 9223372036854775807
# Environment variable: FLECS_CORE_EXPORT_TIMEOUT
timeout = 9223372036854775807

[import]
# The base directory for exports, i.e. where imports are extracted and stored. If this is not set it will be derived 
# from the general flecsd base_path.
# Default: "<flecsd-base_path>/import"
# Environment variable: FLECS_CORE_IMPORT_BASE_PATH
base_path = "/var/lib/flecs/import"

# The timeout in seconds for importing an app image.
# Default: max signed 64bit integer = 9223372036854775807
# Environment variable: FLECS_CORE_IMPORT_TIMEOUT
timeout = 9223372036854775807

[floxy]
# The base directory for floxy, e.g. where instance reverse proxy configs are stored.
# Default: "/tmp/floxy/conf.d"
# Environment variable: FLECS_CORE_FLOXY_BASE_PATH
base_path = "/tmp/floxy/conf.d"

[console]
# The console uri the core connects to.
# Default: "https://console-dev.flecs.tech/" for debug builds, "https://console.flecs.tech/" for release builds
# Environment variable: FLECS_CORE_CONSOLE_URI.
uri = "https://console.flecs.tech/"

[instance]
# The base directory for instances, e.g. where instance configs are stored. If this is not set it will be derived from
# the general flecsd base_path.
# Default: "<flecsd-base_path>/instances"
# Environment variable: FLECS_CORE_INSTANCE_BASE_PATH
base_path = "/var/lib/flecs/instances"

[network]
# The name of the default network.
# Default: "flecs"
# Environment variable: FLECS_CORE_NETWORK_DEFAULT_NETWORK_NAME
default_network_name = "flecs"

[app]
# The base directory for apps, i.e. where app information is stored (not the images). If this is not set it will be
# derived from the general flecsd base_path.
# Default: "<flecsd-base_path>/apps"
# Environment variable: FLECS_CORE_APP_BASE_PATH
base_path = "/var/lib/flecs/apps"

[deployment]
# The base directory for deployments, i.e. information how apps are deployed. If this is not set it will be derived from
# the general flecsd base_path.
# Default: "<flecsd-base_path>/deployments"
# Environment variable: FLECS_CORE_DEPLOYMENT_BASE_PATH
base_path = "/var/lib/flecs/deployments"

[manifest]
# The base directory for apps, i.e. where the app manifests are stored. If this is not set it will be derived from the
# general flecsd base_path.
# Default: "<flecsd-base_path>/manifests"
# Environment variable: FLECS_CORE_MANIFEST_BASE_PATH
base_path = "/var/lib/flecs/manifests"

[secret]
# The base directory for secrets, i.e. where license and session information is stored. If this is not set it will be
# derived from the general flecsd base_path.
# Default: "<flecsd-base_path>/device"
# Environment variable: FLECS_CORE_SECRET_BASE_PATH
base_path = "/var/lib/flecs/device"

[auth]
# The time in seconds the certificate of the issuer is cached for, i.e. the time after which the certificate of the
# issuer will be reaquired from the issuer.
# Default: 3
# Environment variable: FLECS_CORE_ISSUER_CERTIFICATE_CACHE_LIFETIME
issuer_certificate_cache_lifetime = 3
# The path of the casbin policy file used for access control.
# Default: "/usr/local/share/flecs/auth/casbin_policy.csv"
# Environment variable: FLECS_CORE_CASBIN_POLICY_PATH
casbin_policy_path = "/usr/local/share/flecs/auth/casbin_policy.csv"
# The path of the casbin model file used for access control.
# Default: "/usr/local/share/flecs/auth/casbin_model.conf"
# Environment variable: FLECS_CORE_CASBIN_MODEL_PATH
casbin_model_path = "/usr/local/share/flecs/auth/casbin_model.conf"
# The path of the initial auth provider flecsport containing the shipped auth provider.
# Default: "/usr/local/lib/flecs/auth/initial_auth_provider.tar"
# Environment variable: FLECS_CORE_INITIAL_AUTH_PROVIDER_FLECSPORT_PATH
initial_auth_provider_flecsport_path = "/usr/local/lib/flecs/auth/initial_auth_provider.tar"

[system]
# The path of the sbom for flecs-core.
# Default: "/usr/local/lib/flecs/sbom/sbom.spdx.json"
# Environment variable: FLECS_CORE_SBOM_SPDX_PATH
core_sbom_spdx_path = "/usr/local/lib/flecs/sbom/sbom.spdx.json"