Configuration

The Config object

The values below are the default values. They will be used automatically when starting the application without specifying a specific configuration. To change them, override the specific default values with custom values when initializing the application. For more information, please see the configuration guide.

{
    label: 'alpha-sdk-app', (1)
    version: '0.0.0', (2)
    protocolVersion: '1.1', (3)
    tempPath: '/tmp/lisk', (4)
    ipc: {
        enabled: false, (5)
    },
    genesisConfig: {
        epochTime: new Date(Date.UTC(2016, 4, 24, 17, 0, 0, 0)).toISOString(), (6)
        blockTime: 10, (7)
        maxPayloadLength: 15 * 1024, // Kilo Bytes (8)
        rewards: {
            milestones: [
                '500000000', // Initial Reward (9)
                '400000000', // Milestone 1 (10)
                '300000000', // Milestone 2 (11)
                '200000000', // Milestone 3 (12)
                '100000000', // Milestone 4 (13)
            ],
            offset: 2160, // Start rewards at 39th block of 22nd round (14)
            distance: 3000000, // Distance between each milestone (15)
        },
    },
    rebuildUpToRound: null, (16)
    forging: {
        force: false, (17)
        delegates: [], (18)
    },
    network: {
        seedPeers: [], (19)
        wsPort: 5000, (20)
    },
    components: {
        logger: {
            fileLogLevel: 'info', (21)
            consoleLogLevel: 'none', (22)
            logFileName: 'logs/lisk.log', (23)
        },
        cache: {
            enabled: false, (24)
            host: '127.0.0.1', (25)
            port: 6380, (26)
            db: 0, (27)
            password: null, (28)
        },
        storage: {
            host: 'localhost', (29)
            port: 5432, (30)
            database: 'lisk_dev', (31)
            user: 'lisk', (32)
            password: 'password', (33)
            min: 10, (34)
            max: 25, (35)
            poolIdleTimeout: 30000, (36)
            reapIntervalMillis: 1000, (37)
            logEvents: ['error'], (38)
            logFileName: 'logs/lisk_db.log', (39)
        },
    },
    modules: {
        http_api: {
            enabled: true, (40)
            httpPort: 4000, (41)
            address: '0.0.0.0', (42)
            trustProxy: false, (43)
            access: {
                public: false, (44)
                whiteList: ['127.0.0.1'], (45)
            },
            ssl: {
                enabled: false, (46)
                options: {
                    port: 443, (47)
                    address: '0.0.0.0', (48)
                    key: './ssl/lisk.key', (49)
                    cert: './ssl/lisk.crt', (50)
                },
            },
            options: {
                limits: {
                    max: 0, (51)
                    delayMs: 0, (52)
                    delayAfter: 0, (53)
                    windowMs: 60000, (54)
                    headersTimeout: 5000, (55)
                    serverSetTimeout: 20000, (56)
                },
                cors: {
                    origin: '*', (57)
                    methods: ['GET', 'POST', 'PUT'], (58)
                },
            },
            forging: {
                access: {
                    whiteList: ['127.0.0.1'], (59)
                },
            },
        },
    },
}
1 Label of the application.
2 Version of the application.
3 Protocol version of the application.
4 Root path for storing temporary pid and socket file.
5 If true, it allows modules to communicate over IPCs, (inter-process-channels).
6 Epoch timestamp indicating the initial network start, (Date.toISOString()).
7 Slot time interval in seconds.
8 Maximum payload allowed per block.
9 Initial block reward.
10 Block reward after milestone 1.
11 Block reward after milestone 2.
12 Block reward after milestone 3.
13 Block reward after milestone 4.
14 Offset describing the number of blocks that need to be added to the chain, before paying out the first rewards.
15 Distance of blocks between each milestone.
16 Integer. If this value is defined, the node will start and rebuild up to the defined round, (set to 0 to rebuild until current round). Otherwise, the application continues normal execution.
17 Forces forging to be on, only used on local development networks.
18 List of delegates, who are allowed to forge on this node. To successfully enable forging for a delegate, the public key and the encrypted passphrase need to be deposited here as a JSON object.
19 A list of peers to use as seeds when starting the node for the first time.
20 Websocket port of the node.
21 Minimum loglevel, that should be logged in the log file.
22 Minimum loglevel, that should be logged in the console when starting the node.
23 Define name and path of the log file. Default: logs/lisk.log.
24 If true, enables cache. Default: false.
25 Redis host IP. Default: 127.0.0.1
26 Redis host port. Default: 6380.
27 Set the number of databases for Redis to use. Min: 0 (default), Max: 15.
28 Password.
29 The host address of the database.
30 The port of the database.
31 The name of the database to use.
32 Name of the database user.
33 Password of the database user.
34 Specifies the minimum amount of database handles.
35 Specifies the maximum amount of database handles.
36 This parameter sets how long to hold connection handles open.
37 Closes and removes clients which have been idle > 1 second.
38 Specifies the minimal log level for database logs.
39 Relative path of the database log file.
40 Controls the API’s availability. If disabled, no API access is possible.
41 HTTP port which the node listens on.
42 Address of the API of the node.
43 For nodes that sit behind a proxy. If true, the client IP addresses are understood as the left-most entry in the X-Forwarded-* header.
44 If true, the API endpoints of the node are available to the public.
45 This parameter allows connections to the API by IP. Defaults to only allow local host.
46 Enables SSL for HTTP requests.
47 Port to host the Lisk Wallet on, the default is 443, however it is recommended to use a port above 1024 with IP tables.
48 Interface to listen on for the Lisk Wallet.
49 Required private key to decrypt and verify the SSL Certificate.
50 SSL certificate to use with the Lisk Wallet.
51 Maximum amount of API connections.
52 Minimum delay between API calls in ms.
53 Minimum delay after an API call in ms.
54 Minimum delay between API calls from the same window.
55 Indicates the minimum amount of time an idle connection has to be kept opened, (in seconds).
56 Time to wait for response from the server before timing out.
57 Defines the domains that the resource can be accessed by in a cross-site manner. Defaults to all domains.
58 Defines the allowed methods for CORS.
59 This parameter allows connections to the forging API by IP. Defaults to allow only local connections.