Skip to main content

Configuration

Config file

config.yml
server:
host: ${SERVER_HOST}
port: ${SERVER_PORT}
tls:
mode: ${SERVER_TLS_MODE}
ca: ${SERVER_TLS_CA}
cert: ${SERVER_TLS_CERT}
key: ${SERVER_TLS_KEY}

database:
host: ${DATABASE_HOST}
port: ${DATABASE_PORT}
user: ${DATABASE_USER}
pass: ${DATABASE_PASS}
name: ${DATABASE_NAME}

coin:
xmr:
daemon:
url: ${XMR_DAEMON_URL}
user: ${XMR_DAEMON_USER}
pass: ${XMR_DAEMON_PASS}
btc:
daemon:
url: ${BTC_DAEMON_URL}
user: ${BTC_DAEMON_USER}
pass: ${BTC_DAEMON_PASS}
ltc:
daemon:
url: ${LTC_DAEMON_URL}
user: ${LTC_DAEMON_USER}
pass: ${LTC_DAEMON_PASS}
eth:
daemon:
url: ${ETH_DAEMON_URL}
bnb:
daemon:
url: ${BNB_DAEMON_URL}
server

Description: Configuration settings related to the server, including its host, port, and TLS settings.

host

Description: The hostname or IP address where the server will run.

CLI Option: none

Environment Variable: SERVER_HOST

Default Value: none

port

Description: The port number the server listens on for incoming connections.

CLI Option: none

Environment Variable: SERVER_PORT

Default Value: none

tls
mode

Description: The mode of TLS security used (none, tls, mtls)

CLI Option: none

Environment Variable: SERVER_TLS_MODE

Default Value: none (empty)

ca

Description: Path to the Certificate Authority (CA) file used for verifying TLS connections.

CLI Option: none

Environment Variable: SERVER_TLS_CA

Default Value: none

cert

Description: Path to the server's TLS certificate file.

CLI Option: none

Environment Variable: SERVER_TLS_CERT

Default Value: none

key

Description: Path to the server's private key file used for TLS encryption.

CLI Option: none

Environment Variable: SERVER_TLS_KEY

Default Value: none

database

Description: Configuration settings related to the database connection, including the host, port, credentials, and database name.

host

Description: The hostname or IP address of the database server.

CLI Option: none

Environment Variable: DATABASE_HOST

Default Value: none

port

Description: The port number used to connect to the database server.

CLI Option: none

Environment Variable: DATABASE_PORT

Default Value: none

user

Description: The username for authenticating with the database.

CLI Option: none

Environment Variable: DATABASE_USER

Default Value: none

pass

Description: The password for authenticating with the database.

CLI Option: none

Environment Variable: DATABASE_PASS

Default Value: none

name

Description: The name of the specific database to connect to.

CLI Option: none

Environment Variable: DATABASE_NAME

Default Value: none

coin

Description: Configuration settings for cryptocurrency-related integrations.

xmr
daemon
url

Description: The URL of the Monero (XMR) daemon endpoint.

CLI Option: none

Environment Variable: XMR_DAEMON_URL

Default Value: none

user

Description: The username for authenticating with the XMR daemon.

CLI Option: none

Environment Variable: XMR_DAEMON_USER

Default Value: none

pass

Description: The password for authenticating with the XMR daemon.

CLI Option: none

Environment Variable: XMR_DAEMON_PASS

Default Value: none

btc
daemon
url

Description: The URL of the Bitcoin (BTC) daemon endpoint.

CLI Option: none

Environment Variable: BTC_DAEMON_URL

Default Value: none

user

Description: The username for authenticating with the BTC daemon.

CLI Option: none

Environment Variable: BTC_DAEMON_USER

Default Value: none

pass

Description: The password for authenticating with the BTC daemon.

CLI Option: none

Environment Variable: BTC_DAEMON_PASS

Default Value: none

ltc
daemon
url

Description: The URL of the Litecoin (LTC) daemon endpoint.

CLI Option: none

Environment Variable: LTC_DAEMON_URL

Default Value: none

user

Description: The username for authenticating with the LTC daemon.

CLI Option: none

Environment Variable: LTC_DAEMON_USER

Default Value: none

pass

Description: The password for authenticating with the LTC daemon.

CLI Option: none

Environment Variable: LTC_DAEMON_PASS

Default Value: none

eth
daemon
url

Description: The URL of the Ethereum (ETH) daemon endpoint.

CLI Option: none

Environment Variable: ETH_DAEMON_URL

Default Value: none

bnb
daemon
url

Description: The URL of the BNB Smart Chain (BNB(BSC)) daemon endpoint.

CLI Option: none

Environment Variable: BNB_DAEMON_URL

Default Value: none

Example env file

Here you can see an example .env file:

.env.example
SERVER_HOST=0.0.0.0
SERVER_PORT=3000

SERVER_TLS_MODE=tls
SERVER_TLS_CA=/app/cert/server/ca.crt
SERVER_TLS_CERT=/app/cert/server/server.crt
SERVER_TLS_KEY=/app/cert/server/server.key

# As for now, only PostgreSQL is supported
DATABASE_HOST=db
DATABASE_PORT=5432
DATABASE_USER=postgres
DATABASE_PASS=postgres
DATABASE_NAME=goipay_db

XMR_DAEMON_URL=http://node.monerodevs.org:38089
XMR_DAEMON_USER=
XMR_DAEMON_PASS=

BTC_DAEMON_URL=http://localhost:38332
BTC_DAEMON_USER=user
BTC_DAEMON_PASS=pass

LTC_DAEMON_URL=http://localhost:18444
LTC_DAEMON_USER=user
LTC_DAEMON_PASS=pass

ETH_DAEMON_URL=https://ethereum.publicnode.com

BNB_DAEMON_URL=https://bsc-dataseed.binance.org

Misc CLI options

--config

Description: Path to the config file.

Environment Variable: none

Default Value: config.yml

--reflection

Description: Enables gRPC server reflection.

Environment Variable: none

Default Value: false

--client-ca

Description: Comma-separated list of paths to client certificate authority files (for mTLS).

Environment Variable: none

Default Value: none

--log-level

Description: Defines the logging level (debug, info, warn, error, fatal, panic).

Environment Variable: LOG_LEVEL

Default Value: info