Install FLECS Core Using Docker

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.

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.1.0-red-deer
    restart: always
    network_mode: host
    environment:
      HTTP_PORT: 80
      HTTPS_PORT: 443
    volumes:
      - flecsd:/var/lib/flecs
      - flecs-floxy_data:/tmp/floxy
      - /run/docker.sock:/run/docker.sock

  webapp:
    image: flecspublic.azurecr.io/webapp:5.1.0-red-deer
    restart: always
    networks:
      flecs:
        ipv4_address: 172.21.255.254

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. Note that FLECS will automatically create a network named flecs using the bridge driver. It will occupy the first free /16 subnet in the range 172.21.0.0 ... 172.31.0.0 .

  1. Create required volumes

    This temporary volume will be shared between the FLECS Core (flecs-flecsd) and floxy (flecs-floxy), our standalone reverse proxy, which will be spawned automatically.

  2. 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. The FLECS WebApp and FLECS Core will be reachable through http/8080 and https/8443. 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.

  3. 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 Core

Last updated

Was this helpful?