# Configuration

Qewig has two options for overriding default configuration items. CLI args can be passed or a config.toml can be created. If an argument is specified in the toml file and passed when starting qewigm the cli arg will override the toml specified one.

# CLI ARGS

Starting qewig with the help flag will result in a list of args that can be used when starting qewig

 qewig --help
Usage of qewig:
  -controller-enabled
    	Change value of Controller-Enabled. (default true)
  -controller-ip
    	Change value of Controller-IP. (default 127.0.0.1)
  -controller-port
    	Change value of Controller-Port. (default 443)
  -debug
    	Change value of Debug. (default true)
  -handler-enabled
    	Change value of Handler-Enabled. (default true)
  -handler-nodesdir
    	Change value of Handler-NodesDir. (default nodes)
  -handler-portrange
    	Change value of Handler-PortRange. (default 0)
  -handler-qemupath
    	Change value of Handler-QemuPath. (default /usr/bin/)
  -handler-secret
    	Change value of Handler-Secret. (default changeme)
  -logtofile
    	Change value of LogToFile. (default false)
  -mysql-dbname
    	Change value of MySQL-DBName. (default qewig2)
  -mysql-password
    	Change value of MySQL-Password. (default qewig)
  -mysql-path
    	Change value of MySQL-Path. (default tcp(localhost:3306))
  -mysql-username
    	Change value of MySQL-Username. (default qewig)
  -paths-images
    	Change value of Paths-Images. (default images)
  -paths-imagestmp
    	Change value of Paths-ImagesTmp. (default imagestmp)
  -paths-root
    	Change value of Paths-Root. (default /opt/qewig)
  -tls
    	Change value of TLS. (default true)

# Toml Example

WARNING

the toml file must be called config.toml and be in the same directory as the qewig binary.

tls = true
debug = true
logtofile = false
[MySQL]
Path            = "tcp(localhost:3306)"
Username        = "qewig"
Password        = "qewig"
DBName          = "qewig"
[Controller]
Port = 443
IP = "127.0.0.1"
Enabled=true
[Handler]
Enabled=true
QemuPath = "/usr/bin/"
~                              

# debug

# logtofile

# tls

# mysql (table)

# controller (table)

# paths (table)

# Port

  • Type: integer
  • Default: 443

Conntrols port that the controller will listen to http/https requests on

# IP

  • Type: string
  • Default: /usr/bin/

IP the handler will use to connect to the controller

# handler (table)

# Enabled

  • Type: boolean
  • Default: true

Conntrols if qewig will run the handler functionality.

# QemuPath

  • Type: string
  • Default: /usr/bin/

Path to use for the qemu binary.

# Example

tls = true
debug = true
logtofile = false
[MySQL]
Path            = "tcp(localhost:3306)"
Username        = "qewig"
Password        = "qewig"
DBName          = "qewig2"
[Controller]
Port = 443
IP = "127.0.0.1"
Enabled=true
[Handler]
Enabled=true
QemuPath = "/usr/bin/"
~