Welcome to the Flare Linux Documentation

_images/logo.png

Flare Linux Home Page

Installation

In order to start using Flare Linux, you must install Docker on your computer first.

General information on the Docker CE engine is available at the following address: https://docs.docker.com/install/

For more specific information on how to install Docker CE on your operating system of choice, please see the following pages:

Requirements (on top of the Docker specifications):

  • An additional 16 GB of RAM for each Node server you wish to run on your computer,

  • An additional 500 GB of storage (HDD or SSD).

Basic Usage

Once Docker is installed, you can now run a Flare Linux container. It is possible to run the container in live or test modes.

Flare Linux Live Mode

When running Flare Linux in live mode, you will run a node on the Songbird Network (Canary), or on the Flare Network.

Note

You must be whitelisted by Flare in order to connect to the live network. Please see the Flare website.

Songbird Network

Open a Bash or a ZSH terminal (Mac or Linux), or a Powershell CLI (Windows), and enter the following command in the terminal, and wait for the server to finish bootstrapping (might take some time):

$ docker run -dit --restart=always -e FLARE_BIND_ADDRESS=0.0.0.0 -p 9650:9650 --name my_flare_server asclinux/flarelinux:1.1.2 flare --songbird

To check the state of the ‘C’ chain, you can watch the logs of the server with this command, from inside the container:

$ docker exec -it my_flare_server /bin/bash

You will then get a command-line interface similar to this one:

_images/basic_usage01.png

Then, from inside the container:

# tail -f /home/flareuser/.flare/logs/C.log

You should then see the Songbird node’s logs, like so:

_images/basic_usage02.png

If you want to run a Songbird Validator node, open a Bash or a ZSH terminal (Mac or Linux), or a Powershell CLI (Windows), and enter the following command in the terminal, and wait for the server to finish bootstrapping (might take some time):

$ docker run -dit --restart=always -e FLARE_BIND_ADDRESS=0.0.0.0 -p 9650:9650 --name my_flare_server asclinux/flarelinux:1.1.2 flare --songbird-validator

Note

You must have validator keys to run a validator node. Please see the Flare documentation.

Flare Network

Open a Bash or a ZSH terminal (Mac or Linux), or a Powershell CLI (Windows), and enter the following command in the terminal, and wait for the server to finish bootstrapping (might take some time):

$ docker run -dit --restart=always -e FLARE_BIND_ADDRESS=0.0.0.0 -p 9650:9650 --name my_flare_server asclinux/flarelinux:1.1.2 flare --flare-observer

To check the state of the ‘C’ chain, you can watch the logs of the server with this command, from inside the container:

$ docker exec -it my_flare_server /bin/bash

Then, from inside the container:

# tail -f /home/flareuser/.flare/logs/C.log

If you want to run a Flare Validator node, open a Bash or a ZSH terminal (Mac or Linux), or a Powershell CLI (Windows), and enter the following command in the terminal, and wait for the server to finish bootstrapping (might take some time):

$ docker run -dit --restart=always -e FLARE_BIND_ADDRESS=0.0.0.0 -p 9650:9650 --name my_flare_server asclinux/flarelinux:1.1.2 flare --flare-validator

Note

You must have validator keys to run a validator node. Please see the Flare’s website.

Flare Linux Test Mode

When running Flare Linux in test mode, you will either connect to the Coston Network 1, the Coston Network 2, or use a local test network.

Coston Network 1

Open a Bash or a ZSH terminal (Mac or Linux), or a Powershell CLI (Windows), and enter the following command in the terminal, and wait for the server to finish bootstrapping (might take a few minutes):

$ docker run -dit --restart=always -e FLARE_BIND_ADDRESS=0.0.0.0 -p 9650:9650 --name my_flare_server asclinux/flarelinux:1.1.2 flare --flare-coston1

To check the state of the ‘C’ chain, you can watch the logs of the server with this command from inside the container:

$ docker exec -it my_flare_server /bin/bash

Then, from inside the container:

# tail -f /home/flareuser/.flare/logs/C.log

You can also run the server in interactive mode by removing the ‘d’ option, like so:

$ docker run -it --rm -e FLARE_BIND_ADDRESS=0.0.0.0 -p 9650:9650 --name my_flare_server asclinux/flarelinux:1.1.2 flare --flare-coston1

Coston Network 2

Open a Bash or a ZSH terminal (Mac or Linux), or a Powershell CLI (Windows), and enter the following command in the terminal, and wait for the server to finish bootstrapping (might take a few minutes):

$ docker run -dit --restart=always -e FLARE_BIND_ADDRESS=0.0.0.0 -p 9650:9650 --name my_flare_server asclinux/flarelinux:1.1.2 flare --flare-coston2

To check the state of the ‘C’ chain, you can watch the logs of the server with this command from inside the container:

$ docker exec -it my_flare_server /bin/bash

Then, from inside the container:

# tail -f /home/flareuser/.flare/logs/C.log

You can also run the server in interactive mode by removing the ‘d’ option, like so:

$ docker run -it --rm -e FLARE_BIND_ADDRESS=0.0.0.0 -p 9650:9650 --name my_flare_server asclinux/flarelinux:1.1.2 flare --flare-coston2

Local Network

If you prefer, you can run a local Flare node, by running the following command instead:

$ docker run -it --rm -e FLARE_BIND_ADDRESS=127.0.0.1 -p 9650:9650 --name my_flare_server asclinux/flarelinux:1.1.2 flare

Start Testing the Flare API

Use Postman to start querying your server’s API: VIDEO TUTORIAL,

Note

Make sure the “C” chain is bootstrapped, before making other queries!

Stopping the Flare Node

To stop the Flare server, please enter the following command (or press Ctrl+C in interactive mode):

$ docker rm -f my_flare_server

Configuration

The Flare Linux Docker image allows for runtime configuration. You can do so by passing in environment variables to the container on startup, or by sharing files with the container that is running the Flare server nodes.

Environment Variables

You can set some environment variables in order to change the default values of the Flare server nodes at runtime.

You can do so by adding the ‘e’ option as often as you need to, like so:

$ docker run -it --rm -p 9650:9650 --name my_flare_server -e FLARE_BIND_ADDRESS="0.0.0.0" asclinux/flarelinux:1.1.2 flare --flare-coston1

Here is a complete list of all environment variables that will be taken into account by the Flare Linux container at runtime:

Environment Variables

Variable

Description

FLARE_BIND_ADDRESS

Bind the Flare server to a specified network interface

Sharing Files

It is also possible to share files with the Flare Linux container at runtime.

You can do so by adding the ‘v’ option as often as you need to, like so:

$ docker run -it --rm -p 9650:9650 --name my_flare_server -v ${PWD}/.flare:/home/flareuser/.flare asclinux/flarelinux:1.1.2 flare --flare-coston1

Installing Additional Software

You can install additional software by using the lfphp-get utility.

For example, to install the Ethereum tools, you can run the following command, from inside the container:

# lfphp-get ethereum-utils

For more information on this utility, please see the Linux for PHP Documentation.

What’s New in Version 1.0

New Since Version 1.1.2 (Oct 31, 2022)

  • Updated OS software/libraries:
    • Flare Node (0.7.1)

New Since Version 1.1.1 (Oct 11, 2022)

  • Updated OS software/libraries:
    • Songbird Node (0.6.4)

New Since Version 1.1.0 (Oct 6, 2022)

  • Updated OS software/libraries:
    • Flare Node (0.7.0)

New Since Version 1.0.1 (Aug 16, 2022)

  • Updated OS software/libraries:
    • Songbird Node (0.6.2)

New Since Version 1.0.0 (Jun 15, 2022)

  • New features:
    • All Flare dependencies have been upgraded to latest requirements

  • Updated OS software/libraries:
    • bind (9.16.5)

    • GFlags (2.0)

    • Golang (1.16.8)

    • jq (1.6-137-gd18b2d0)

    • LevelDB (1.23)

    • libtirpc (1.3.1)

    • libuv (1.38.1)

    • lsof (4.91)

    • Node.js (10.24.1)

    • RocksDB (6.11.6)

    • Snappy (1.1.9)

  • Complete list of installed software/libraries (asclinux/linuxforphp-8.2-ultimate):
    • Acl (2.2.52)

    • Alsa-lib (1.1.4.1)

    • Apache (2.4.29)

    • Apr (1.6.3)

    • Apr-Util (1.6.1)

    • Aspell (0.60.6.1)

    • Attr (2.4.47)

    • Autoconf (2.69)

    • Automake (1.15)

    • Bash (4.3.30)

    • Bc (1.06.95)

    • Berkeley DB (6.2.32)

    • Binutils (2.27)

    • Bison (3.0.4)

    • Bzip2 (1.0.6)

    • c-ares (1.12.0)

    • Certificate Authority Certificates

    • Check (0.10.0)

    • CMake (3.10.2)

    • CPIO (2.12)

    • Coreutils (8.25)

    • Cups (2.2.4)

    • cURL (7.68.0)

    • Cyrus-SASL (2.1.26)

    • DejaGNU (1.6.1)

    • DHCP Client (4.3.6)

    • Diffutils (3.5)

    • Docbook-xml (4.5)

    • Docbook-xsl (1.79.2)

    • Doxygen (1.8.15)

    • Eudev (3.2)

    • E2fsprogs (1.43.1)

    • Enchant (1.6.0)

    • Exim (4.89.1)

    • Expat (2.2.0)

    • Expect (5.45.4)

    • File (5.28)

    • Findutils (4.6.0)

    • Flex (2.6.1)

    • Fontconfig (2.12.6)

    • FreeTDS (1.00.112)

    • FreeType (2.9)

    • Gawk (4.1.3)

    • GCC (6.2.0)

    • GDBM (1.12)

    • Gettext (0.19.8.1)

    • Giflib (5.1.4)

    • Git (2.16.2)

    • Glib (2.60.1)

    • Glibc (2.24)

    • GMP (6.1.1)

    • GnuTLS (3.6.2)

    • Gperf (3.0.4)

    • Grep (2.25)

    • Groff (1.22.3)

    • GRUB (2.02~beta3)

    • Gzip (1.8)

    • Iana-Etc (2.30)

    • icu4c (60.2)

    • IMAP-Cclient (2007f)

    • Inetutils (1.9.4)

    • Intltool (0.51.0)

    • IPRoute2 (4.7.0)

    • Kbd (2.0.3)

    • Kerberos5 (1.17)

    • Kmod (23)

    • Less (481)

    • LFS-Bootscripts (20150222)

    • libarchive (3.3.2)

    • Libcap (2.25)

    • libevent (2.1.8)

    • libexif (0.6.21)

    • libffi (3.2.1)

    • libgd (2.2.5)

    • libjpeg-turbo (1.5.3)

    • libmcrypt (2.5.8)

    • libnghttp2 (1.32.0)

    • Libpipeline (1.4.1)

    • libpng (1.6.34)

    • libsodium (1.0.18)

    • libtasn (1-4.13)

    • Libtool (2.4.6)

    • libunistring (0.9.8)

    • libxml (2-2.9.7)

    • libxslt (1.1.32)

    • libzip (1.6.1)

    • Linux (4.7.2) - Kernel is NOT installed in this Docker image!

    • LZO (2.10)

    • M4 (1.4.17)

    • Make (4.2.1)

    • Man-DB (2.7.5)

    • Man-pages (4.07)

    • MariaDB (10.2.13)

    • mcrypt (2.6.8)

    • meson (0.50.1)

    • mhash (0.9.9.9)

    • MongoDB (4.0.16)

    • MPC (1.0.3)

    • MPFR (3.1.4)

    • MSMTP (1.8.4)

    • Ncurses (6.0)

    • Nettle (3.4)

    • Net-SNMP (5.8)

    • nginx (1.17.7)

    • Ninja (1.9.0)

    • Node.js (10.7.0)

    • oniguruma (6.9.5)

    • OpenJDK (1.8.0.141)

    • OpenLDAP (2.4.45)

    • OpenSSH (8.0p1)

    • OpenSSL (1.0.2n)

    • p11-kit (0.23.9)

    • Patch (2.7.5)

    • PCRE (8.41)

    • Perl (5.24.0)

    • Pkg-config (0.29.1)

    • PostgreSQL (10.2.0)

    • Procps (3.3.12)

    • Psmisc (22.21)

    • Python (2.7.14)

    • Python (3.7.4)

    • rabbitmq-client (0.9.0)

    • re2c (1.3.0)

    • Readline (6.3)

    • Redis (5.0.4)

    • Rsync (3.1.3)

    • Ruby (2.5.0)

    • runit (2.1.2)

    • runit-docker (1.1.0)

    • Sed (4.2.2)

    • SGML-common (0.6.3)

    • Shadow (4.2.1)

    • SQLite (3.22.0)

    • Sysklogd (1.5.1)

    • Sysvinit (2.88dsf)

    • Tar (1.29)

    • Tcl (8.6.8)

    • Texinfo (6.1)

    • Tidy-HTML5 (5.4.0)

    • Time Zone Data (2016f)

    • Udev-lfs Tarball (udev-lfs-20140408)

    • UnZip (6.0)

    • Util-linux (2.28.1)

    • Vim (7.4)

    • Wget (1.19.4)

    • Which (2.21)

    • XML::Parser (2.44)

    • Xorg Libraries 7

    • Xz Utils (5.2.2)

    • yasm (1.3.0)

    • Zip (3.0)

    • Zlib (1.2.8)

Flare Linux License

Copyright 2018-2021, Foreach Code Factory.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Apache License

Version 2.0, January 2004

http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

  1. Definitions.

“License” shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.

“Licensor” shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.

“Legal Entity” shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, “control” means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

“You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by this License.

“Source” form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.

“Object” form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.

“Work” shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).

“Derivative Works” shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.

“Contribution” shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, “submitted” means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as “Not a Contribution.”

“Contributor” shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.

  1. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.

  2. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.

  3. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:

    You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.

  4. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.

  5. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.

  6. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.

  7. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.

  8. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

Indices and tables