mirror of
https://github.com/logos-messaging/docs.waku.org.git
synced 2026-01-07 23:33:12 +00:00
1 line
8.0 KiB
JavaScript
1 line
8.0 KiB
JavaScript
|
|
"use strict";(self.webpackChunkwaku_guide=self.webpackChunkwaku_guide||[]).push([[3937],{27702:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"run-node/config-methods","title":"Node Configuration Methods","description":"Waku nodes can be configured using a combination of the following methods:","source":"@site/docs/run-node/config-methods.md","sourceDirName":"run-node","slug":"/run-node/config-methods","permalink":"/run-node/config-methods","draft":false,"unlisted":false,"editUrl":"https://github.com/waku-org/docs.waku.org/tree/develop/docs/run-node/config-methods.md","tags":[],"version":"current","lastUpdatedAt":null,"frontMatter":{"title":"Node Configuration Methods","hide_table_of_contents":true,"displayed_sidebar":"runNode"},"sidebar":"runNode","previous":{"title":"Find Your Node Address","permalink":"/run-node/find-node-address"},"next":{"title":"Node Configuration Options","permalink":"/run-node/config-options"}}');var r=o(74848),s=o(28453);const t={title:"Node Configuration Methods",hide_table_of_contents:!0,displayed_sidebar:"runNode"},a=void 0,l={},d=[{value:"Command line options",id:"command-line-options",level:2},{value:"Environment variables",id:"environment-variables",level:2},{value:"Configuration files",id:"configuration-files",level:2},{value:"Default configuration values",id:"default-configuration-values",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Waku nodes can be configured using a combination of the following methods:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"Command line options and flags"}),"\n",(0,r.jsx)(n.li,{children:"Environment variables"}),"\n",(0,r.jsx)(n.li,{children:"TOML configuration files (currently the only supported format)"}),"\n",(0,r.jsx)(n.li,{children:"Default values"}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsx)(n.p,{children:"Take note of the precedence order: Each configuration method overrides the one below it (e.g., command line options override environment variables and configuration files)."})}),"\n",(0,r.jsx)(n.h2,{id:"command-line-options",children:"Command line options"}),"\n",(0,r.jsxs)(n.p,{children:["Node configuration is primarily done using command line options, which override other methods. Specify ",(0,r.jsx)(n.a,{href:"/run-node/config-options",children:"configuration options"})," by providing them in this format after the binary name:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-shell",children:"./build/wakunode2 --tcp-port=65000\n"})}),"\n",(0,r.jsx)(n.p,{children:"When running your node with Docker, provide the command line options after the image name in this format:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-shell",children:"docker run wakuorg/nwaku --tcp-port=65000\n"})}),"\n",(0,r.jsx)(n.h2,{id:"environment-variables",children:"Environment variables"}),"\n",(0,r.jsxs)(n.p,{children:["Nodes can be configured using environment variables by prefixing the variable name with ",(0,r.jsx)(n.code,{children:"WAKUNODE2_"})," and using the configuration option in ",(0,r.jsx)(n.a,{href:"https://en.wiktionary.org/wiki/screaming_snake_case",children:"SCREAMING_SNAKE_CASE"})," format."]}),"\n",(0,r.jsxs)(n.p,{children:["To set the ",(0,r.jsx)(n.code,{children:"tcp-port"})," configuration, the ",(0,r.jsx)(n.code,{children:"wakunode2"})," binary should be called in this format:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-shell",children:"WAKUNODE2_TCP_PORT=65000 ./build/wakunode2\n"})}),"\n",(0,r.jsxs)(n.p,{children:["When running your node with Docker, start the node using the ",(0,r.jsx)(n.code,{children:"-e"})," command option:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-shell",children:'docker run -e "WAKUNODE2_TCP_PORT=65000" wakuorg/nwaku\n'})
|