Install FLECS Core With Maximum Customization

For users familiar with Docker, FLECS can be installed directly using Docker images. This method is ideal for those who prefer containerized environments and have Docker installed on their system.

Prerequisites for Docker Installation

  • Docker installed on your system (version 20.10.5 or higher).

  • Ensure that your system is compatible with Docker and has internet access to pull images.

  • Only you want to use Docker Compose: Docker Compose installed on your system (version 2.0.0 or higher, i.e. any version of the go rewrite)

Installation Steps

Deploy FLECS Using Docker Compose

If you prefer using Docker Compose, create a docker-compose.yml file with the following content:

services:
  flecsd:
    image: flecspublic.azurecr.io/flecs-slim:5.2.0-red-deer
    restart: always
    network_mode: host
    volumes:
      - flecsd:/var/lib/flecs
      - flecs-floxy_data:/tmp/floxy
      - /run/docker.sock:/run/docker.sock

  webapp:
    image: flecspublic.azurecr.io/webapp:5.2.0-red-deer
    restart: always
    networks:
      flecs:
        ipv4_address: 172.21.255.254
    extra_hosts:
      - "flecs-floxy=172.21.0.1"

  floxy:
    image: flecspublic.azurecr.io/flecs/floxy:0
    restart: always
    network_mode: host
    volumes:
     - flecs-floxy_data:/tmp/floxy
     - flecs-floxy_certs:/etc/nginx/certs
    environment:
      FLOXY_HTTP_PORT: 80
      FLOXY_HTTPS_PORT: 443
      FLOXY_FLECS_GATEWAY: 172.21.0.1

networks:
  flecs:
    name: flecs
    ipam:
      driver: default
      config:
        - subnet: 172.21.0.0/16
          gateway: 172.21.0.1

volumes:
  flecsd:
  flecs-floxy_certs:
    name: flecs-floxy_certs
  flecs-floxy_data:
    name: flecs-floxy_data
    driver: local
    driver_opts:
      device: tmpfs
      type: tmpfs
      o: size=4m

Then, deploy FLECS by running:

Manual Docker Run Commands

Alternatively, you can start the FLECS components manually using Docker commands.

  1. Create required volumes

    This temporary volume will be shared between the FLECS Core (flecs-flecsd) and floxy (flecs-floxy), our standalone reverse proxy. The other volumes (flecsd and flecs-floxy_certs, will be created with default values by docker during the docker run commands)

  2. Create required network

  3. Deploy FLECS Floxy

    This command spins up FLECS Floxy the flecs reverse proxy. The FLECS WebApp and FLECS Core will be reachable through http/8080 and https/8443 via this reverse proxy. You can freely choose both ports according to your needs. Note that all http connections will be automatically upgraded to https for security reasons. As the certificates are self-signed, you have to accept a security exception in your browser or, when using curl, pass -k to accept self-signed certificates.

  4. Deploy the FLECS Daemon (flecs-flecsd)

    This command runs flecs-flecsd in the background, using host networking for full feature support. It also mounts, and implicitly creates, the necessary volumes for persistent storage and passes through the host Docker socket for creating Apps.

  5. Deploy the FLECS WebApp

    Finally, this command spins up the FLECS WebApp on the custom flecs network, assigning it a special, reserved IP address.

Interacting with the WebApp

After installation, open a browser and navigate to http://localhost:8080/ to open the FLECS WebApp. Due to the use of self-signed certificates by default, you'll have to accept a security exception in your browser.

Install FLECS on Your Device with FILiP

For those who wish to install FLECS on their own hardware, FILiP simplifies the process with a one-liner installation command. This method is ideal if you want to use your existing Linux-based device for automation tasks.

💾Installing FLECS Corechevron-right

Last updated

Was this helpful?