diff --git a/docs/cli/server.md b/docs/cli/server.md index 21ed27ed74..0803208e3a 100644 --- a/docs/cli/server.md +++ b/docs/cli/server.md @@ -12,6 +12,8 @@ The ```bor server``` command runs the Bor client. - ```datadir```: Path of the data directory to store information +- ```keystore```: Path of the directory to store keystores + - ```config```: File for the config file - ```syncmode```: Blockchain sync mode ("fast", "full", or "snap") diff --git a/internal/cli/server/config.go b/internal/cli/server/config.go index 137f6aed0f..ab8c8e5155 100644 --- a/internal/cli/server/config.go +++ b/internal/cli/server/config.go @@ -52,6 +52,9 @@ type Config struct { // DataDir is the directory to store the state in DataDir string `hcl:"data-dir,optional"` + // KeyStoreDir is the directory to store keystores + KeyStoreDir string `hcl:"keystore-dir,optional"` + // SyncMode selects the sync protocol SyncMode string `hcl:"sync-mode,optional"` @@ -894,6 +897,7 @@ func (c *Config) buildNode() (*node.Config, error) { cfg := &node.Config{ Name: clientIdentifier, DataDir: c.DataDir, + KeyStoreDir: c.KeyStoreDir, UseLightweightKDF: c.Accounts.UseLightweightKDF, InsecureUnlockAllowed: c.Accounts.AllowInsecureUnlock, Version: params.VersionWithCommit(gitCommit, gitDate), diff --git a/internal/cli/server/flags.go b/internal/cli/server/flags.go index 6269e1c6fa..21e9a38cb9 100644 --- a/internal/cli/server/flags.go +++ b/internal/cli/server/flags.go @@ -33,6 +33,11 @@ func (c *Command) Flags() *flagset.Flagset { Value: &c.cliConfig.DataDir, Default: c.cliConfig.DataDir, }) + f.StringFlag(&flagset.StringFlag{ + Name: "keystore", + Usage: "Path of the directory to store keystores", + Value: &c.cliConfig.KeyStoreDir, + }) f.SliceStringFlag(&flagset.SliceStringFlag{ Name: "config", Usage: "File for the config file",