Skip to main content

Environment Variables

In the following you can find all the environment variables used in the TruBudget project. Use this list as reference for development and deployment.

Env VariableRequiredDefault ValueUsed byDescription
ORGANIZATIONyes-bc/apiIn 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 and is also displayed in the frontend's top right corner.
ORGANIZATION_VAULT_SECRETyes-apiThis is the key to en-/decrypt user data of an organization. If you want to add a new node for your organization, you want users to be able to log in on either node. Make sure that the api connected to the new node has the same organization vault secret.
Caution: If you want to run TruBudget in production,make sure NOT to use the default value from the .env_example file!
API_HOSTnobc/provThe IP address of one api which is connected to the node you want to connect to (The IP addresses are usually the same as for the P2P host address).
API_PORTno8080bc/provThe port used to connect to the api.
JWT_SECRETno[random]api/bcA string that is used to sign JWT which are created by the authenticate endpoint of the api
P2P_HOSTnobcThe IP address of the blockchain node you want to connect to.
P2P_PORTno7447bcThe port on which the node you want to connect to has exposed the blockchain.
PORTno8080apiThe port used to expose the API for your installation. Example: If you run TruBudget locally and set API_PORT to 8080, you can reach the API via localhost:8080/api.
ROOT_SECRETno[random]apiThe root secret is the password for the root user. If you start with an empty blockchain, the root user is needed to add other users, approve new nodes,.. If you don't set a value via the environment variable, the API generates one randomly and prints it to the console
Caution: If you want to run TruBudget in production, make sure to set a secure root secret.
RPC_PASSWORDno[hardcoded]api/bcPassword used by the API to connect to the blockchain. The password is set by the origin node upon start. Every slave node needs to use the same RPC password in order to be able to connect to the blockchain.
Hint: Although the RPC_PASSWORD is not required it is highly recommended to set an own secure one
RPC_PORTno8000api/bcThe 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.
RPC_USERnomultichainrpcapi/bcThe user used to connect to the multichain daemon.
EXTERNAL_IPnobcThe IP address with which the current node can be reached. Example: If you have a VM running on and you want to start a slave node from this VM to connect to a master running on, you set the EXTERNAL_IP to on this node.
ACCESS_CONTROL_ALLOW_ORIGINno"*"bcThis environment variable is needed for the feature "Export to Excel". Since the export service uses CORS, the domain by which it can be called needs to be set. Setting this value to "*" means that it can be called from any domain. Read more about this topic here.
LOG_LEVELnoINFOapi/bcSets the lowest level to the pino logger that is printed to STDOUT with varying levels ranging from trace to fatal.
MULTICHAIN_DIRno/rootbcThe 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.
PRETTY_PRINTnotrueapi/bcDecides 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.
SWAGGER_BASEPATH deprecatedno/apiThis variable was used to choose which environment (prod or test) is used for testing the requests. The variable is deprecated now, as the Swagger documentation can be used for the prod and test environment separately.
TAGnomasterdcThe tag defines the version of the image that is pulled from the docker hub.
NODE_ENVnouiIf set to development search Trubudget's external services on localhost. If set to production disable Redux devtools extension
REACT_APP_VERSIONnouiInjected version via $npm_package_version in.env file to ensure the version is shown in the frontend


Env VariableRequiredDefault ValueUsed byDescription
EXPOSE_MCnofalsebcIf set to true Trubudget tries to expose it's multichain via kubernetes' ingress. First a kubernetes config file is searched in /.kube/config. If not found and the MC is deployed in a cluster, it is searching for the service account to get the information. After configuration the externalip arg is set to the ip of the service' ingress of the configured clusterSERVICE_NAME and NAMESPACE are required to access the ingress of the service.
SERVICE_NAMEnobcThis variable is only required if EXPOSE_MC is set to true. It defines which service the kubernetes client should search for in the configured kubernetes cluster
NAMESPACEnobcThis variable is only required if EXPOSE_MC is set to true. It defines in which namespace the kubernetes client should search for the given service