Skip to main content
Version: 0.8

Configuration

Skytable can be configured to run per your needs. You can use either of command-line arguments, environment variables or a configuration file. We don't have any specific recommendation for a mode of configuration but we generally consider using a configuration file to be the best practice since it is something that won't get lost (which in other cases can get lost due to lost shell history and such).

Configuration file

The configuration file is a simple YAML file. Use this as your configuration file template:

system:
mode: prod
rs_window: 300

auth:
plugin: pwd
# replace with your root password of choice
root_pass: password

endpoints:
secure:
host: 127.0.0.1
port: 2004
# replace `cert` with the path to your self-signed certificate
cert: cert.pem
# replace `private_key` with the path to your private key
private_key: private.key
# replace `passphrase.txt` with the path to your private key passphrase
pkey_passphrase: passphrase.txt
insecure:
host: 127.0.0.1
port: 2003
Starting the server with a configuration file

To start the server with a configuration file, simply run skyd --config <path to config>.yaml

Here's an explanation of all the keys:

  • system:
    • mode: set to either dev / prod mode. prod mode will generally make some things stricters (such as background services)
    • rs_window: This is a very important setting! It is set to 300 by default and is called the "reliability service window" which ensures that if any changes are observed in 300 (or whatever value you set) seconds, then they reach the disk as soon as that time elapses. For example, in the default configuration the system checks for changes every 5 minutes and if there are any dataset changes, they are immediately synced
  • auth:
    • plugin: this is the authentication plugin. we currently only have pwd that is a simple password based authentication system where the password is stored as an rcrypt hash on disk. More plugin options are set to be implemented for more advanced authentication, especially in enterprise settings
    • root_pass: this is the root account password. It must have atleast 16 characters
  • endpoints:
    • secure:
      • host: the host for your secure (TLS) endpoint
      • port: the port for your secure (TLS) endpoint
      • cert: path to the PEM certificate to use for TLS
      • private_key: path to the PEM private key to use for TLS
      • pkey_passphrase: all private keys must be secured with a passphrase; this key should be set to the path of a plaintext file containing your passphrase and not the passphrase itself
    • insecure:
      • host: the host for your TCP endpoint
      • port: the port for your TCP endpoint

Command-line arguments

You can use the following command line arguments:

CategoryArgumentExampleMeaning
--config--config=config.yamlPath to the configuration file.
System
--service-window--service-window=300Set the reliability service window (see above)
--mode--mode=prodSet dev or prod mode
Auth
--auth-plugin--auth-plugin=pwdSets the authentication plugin (see above)
--auth-root-password--auth-root-password=mypassSets the root account password (see above)
Endpoints
--endpoint--endpoint=tcp@localhost:2003Repeat this for all your endpoints such as tls@host:port and tcp@host:port
--tlscert--tlscert=cert.pemPath to TLS cert
--tlskey--tlskey=private.keyPath to TLS private key
--tls-passphrase--tls-passphrase=pass.txtPath to plaintext file containing TLS private key password

Environment variables

You can use the following environment variables:

CategoryVariableExampleMeaning
System
SKYDB_SERVICE_WINDOWSKYDB_SERVICE_WINDOW=300Sets the reliability service window (see above)
Auth
SKYDB_AUTH_PLUGINSKYDB_AUTH_PLUGIN=pwdSets the authentication plugin
SKYDB_AUTH_ROOT_PASSWORDSKYDB_AUTH_ROOT_PASSWORD=mypassSets the root account password
Endpoints
SKYDB_ENDPOINTSSKYDB_ENDPOINTS=tcp@myhost:2003,tls@myhost:2004Sets the endpoints to use
SKYDB_TLS_CERTSKYDB_TLS_CERT=cert.pemSets the path to the TLS cert
SKYDB_TLS_KEYSKYDB_TLS_KEY=private.keySets the path to the TLS private key
SKYDB_TLS_KEY_PASSSKYDB_TLS_KEY_PASS=pass.txtSets the path to the plaintext file containing the TLS private key password