Skip to main content

Trubudget Blockchain

Environment Variables

Depending on the Trubudget setup environment variables

Env Variable nameRequiredDefault ValueDescription
PORTno8085This is the port where the multichain can be downloaded (backup) Value is a port with minimal value 0 and maximal value 65535
ORGANIZATIONnoMyOrgaIn the blockchain network, each node is represented by its organization name. This environment variable sets this organization name. It is used to create the organization stream on the blockchain.
MULTICHAIN_RPC_PORTno8000The port used to expose the multichain daemon of your Trubudget blockchain installation(bc). The port used to connect to the multichain daemon(api). This will be used internally for the communication between the API and the multichain daemon. Value is a port with minimal value 0 and maximal value 65535
MULTICHAIN_RPC_USERnomultichainrpcThe user used to connect to the multichain daemon.
MULTICHAIN_RPC_PASSWORDnos750SiJnj50yIrmwxPnEdSzpfGlTAHzhaUwgqKeb0G1jPassword used by the API to connect to the blockchain. The password is set by the origin node upon start. Every beta node needs to use the same RPC password in order to be able to connect to the blockchain. Hint: Although the MULTICHAIN_RPC_PASSWORD is not required it is highly recommended to set an own secure one, at least 32 characters long. Minimal value: 32.
RPC_ALLOW_IPno0.0.0.0/0It refers to an allowed IP address range, given either by IP or CIDR notation. 0.0.0.0/0 will allow access from anywhere.
CERT_PATHno-The path to the certificate used by the blockchain to authenticate with the connection peer. Note that self-signed certificates are not allowed in production environments. More information can be found here
CERT_CA_PATHno-The path to the certificate authority root certificate by the blockchain to authenticate with the connection peer. Note that self-signed certificates are not allowed in production environments.More information can be found here
CERT_KEY_PATHno-The path to the certificate key used by the blockchain to authenticate with the connection peer. More information can be found here
AUTOSTARTnotrueIf set to false multichain daemon will not start automatically.
EXTERNAL_IPno-The EXTERNAL_IP option is the IP address with which the current node can be reached. The variable is forwarded to the multichain daemon as externalip argument. This will be reported to other nodes in the Trubudget network. By default, daemon will try to automatically detect an external IP address. However, this might not always be accurate, especially if a node is behind a NAT or a firewall. By using EXTERNAL_IP, you can manually specify the IP. This can be useful if you want to ensure that your node is reachable at a specific address. If your node is not actually reachable at the specified IP address (e.g. because of a firewall), other nodes might not be able to connect to it. Example: If you have a VM running on 22.22.22.22 and you want to start a beta node from this VM to connect to an alpha running on 11.11.11.11, you set EXTERNAL_IP to 11.11.11.11 on alpha node and 22.22.22.22 on beta node.
LOG_LEVELnoinfoDefines the log output.
P2P_HOSTno-The IP address of the blockchain node you want to connect to. When given, the node joins the existing network rather than creating its own chain.
P2P_PORTno7447The port on which the node you want to connect to has exposed the blockchain. Value is a port with minimal value 0 and maximal value 65535
API_PROTOCOLnohttpThe Protocol which should be used to connect to the alpha-node's api.
API_HOSTnolocalhostUsed to build the URL to the alpha-node's API when requesting network access. (The IP addresses are usually the same as for the P2P host address).
API_PORTno8080The port used to connect to the alpha-node's api. Value is a port with minimal value 0 and maximal value 65535
MULTICHAIN_DIRno/rootThe path to the multichain folder where the blockchain data is persisted. For installations via docker compose, this refers to the path within the docker container of the blockchain. For bare metal installations, this refers to the path on the machine the blockchain is running on.
EMAIL_SSLno-If set to true the connection between blockchain and email-notification service is https instead of http.
NOTIFICATION_PATHno./notifications/The path where notification files shall be saved on the blockchain environment
NOTIFICATION_MAX_LIFETIMEno24This number configure how long notifications shall be saved in the NOTIFICATION_PATH in hours
NOTIFICATION_SEND_INTERVALno10This number configure in which interval the notifications in the NOTIFICATION_PATH should be checked and send.
JWT_ALGORITHMnoHS256-
EMAIL_SERVICE_ENABLEDno-If set to true the Email-Service feature is enabled and the EMAIL_* variables are required
EMAIL_HOSTyes (if EMAIL_SERVICE_ENABLED=true)-The IP address from the email-notification service.
EMAIL_PORTyes (if EMAIL_SERVICE_ENABLED=true)-The port address from the email-notification service.
JWT_SECRETyes (if EMAIL_SERVICE_ENABLED=true)-The JWT_SECRET is only required if the Email feature is enabled. It is used to authenticate the blockchain at the email-service, so it can send notifications.
MULTICHAIN_FEED_ENABLEDyes (if EMAIL_SERVICE_ENABLED=true)-If set to true the multichain-feed go script in src/multichain-feed/multichain-feed is passed to the multichain daemon and executed in a separate process.
NODE_ENVnoproductionEnvironment: Default development when running development-script. Production when running production-script
BLOCKNOTIFY_SCRIPTno-Configure the blocknotifiy argument of the multichain configuration like -blocknotify=[BLOCKNOTIFY_SCRIPT]
KUBE_SERVICE_NAMEno--
KUBE_NAMESPACEno--
EXPOSE_MCno--
PRETTY_PRINTno-Decides whether the logs printed by the API are pretty printed or not. Pretty printed logs are easier to read while non-pretty printed logs are easier to store and use e.g. in the ELK (Elasticsearch-Logstash-Kabana) stack.
CI_COMMIT_SHAno-The /version endpoint returns this variable as commit property.
BUILDTIMESTAMPno-The /version endpoint returns this variable as buildTimestamp property.

Connected services

Email-Service

The email-service can be configured via the following environment variables. To get started have a look at dedicated documentation