Skip to content

Configuration

Raghav Sood edited this page Dec 5, 2024 · 1 revision

vultiserver is configured through the use of yaml configuration files.

The yaml file loaded by the server and worker processes will default to config.yaml unless another file is specified in the VS_CONFIG_NAME environment variable. This must exclude the file extension. i.e., to load config-server.yaml, VS_CONFIG_NAME must be set to config-server.

Configuration Guide

Server Configuration

The server section configures the main application server settings:

server:
  port: "8080"           # The port number the server listens on
  host: "localhost"      # The host address to bind to
  vaults_file_path: "/tmp/vultisigner/server/vaults"  # Path to store vault files
  mode: "vultiserver"    # Server operation mode

The server mode can either be vultiserver or pluginserver.

Database Configuration

The database section specifies the PostgreSQL database connection:

database:
  dsn: "postgres://username@localhost/dbname?sslmode=disable"  # Database connection string

The DSN (Data Source Name) includes:

  • Username
  • Host
  • Database name
  • SSL mode settings

Other parameters may be specified if necessary, as long as they are valid for a psql connection string.

Plugin Configuration

plugin:
  type: "payroll"
  plugin_config:                # Per-plugin map[string]interface
    plugin_specific: value

The plugin section allows you to specify the plugin type when running in server.mode = pluginserver, and a general per-plugin map for implementation specific config.

This section may be omitted when running in vultiserver mode.

Redis Configuration

The redis section configures the Redis connection:

redis:
  host: "localhost"   # Redis server host
  port: "6379"        # Redis server port
  password: ""        # Redis password (if required)
  db: "0"            # Redis database number

It is possible to run multiple instances of vultiserver and plugin servers against the same redis instance by configuring them to use different redis databases by specifying the redis.db value. A default redis instance supports 16 databases, numbered 0-15.

Block Storage Configuration

The block_storage section configures the S3-compatible storage service:

block_storage:
  host: "http://localhost:9000"  # S3-compatible storage endpoint
  region: "us-east-1"            # AWS region
  access_key: "your-access-key"  # Access key for authentication
  secret: "your-secret-key"      # Secret key for authentication
  bucket: "bucket-name"          # Target bucket name

Relay Configuration

The relay section specifies the router endpoint:

relay:
  server: "https://api.vultisig.com/router"  # Router server URL

It is possible and convenient to use the production relay even when developing locally.

Email Server Configuration

The email_server section configures the email service:

email_server:
  api_key: "your-mandrill-api-key"  # Mandrill API key for sending emails

Example Configuration

Here's a complete example configuration file:

server:
  port: "8080"
  host: "localhost"
  vaults_file_path: "/tmp/vultisigner/server/vaults"
  mode: "vultiserver"
database:
  dsn: "postgres://raghavsood@localhost/vs-plugins-development?sslmode=disable"
redis:
  host: "localhost"
  port: "6379"
  password: ""
  db: "0"
block_storage:
  host: "http://localhost:9000"
  region: "us-east-1"
  access_key: "qhl6djjVjNkrmH7q7rw3"
  secret: "9RKPbc6Jkd37CIZXjrgreHkIbXz869GICqJM308A"
  bucket: "vs-test"
relay:
  server: "https://api.vultisig.com/router"
email_server:
  api_key: "your-mandrill-api-key"