It is assumed that the Python package
vantage6 has been successfully installed (see Dockerized installation if necessary).
The most straight forward way of creating a new server configuration is using the command
vserver new in Python which allows you to configure the most basic settings. See the image below to get an overview of what happens. And see parameter description for an explanation of the parameters.
By default the
configuration-file is stored at system level, which makes this configuration available for all users. In case you want to use a user directory you can add the
To update a configuration you need to modify the created YAML file. To see where this file is located you can use the command
vserver files . Do not forget to specify the flag
--system in the case of a system-wide configuration or the flag
--user in case of a user-level configuration.
The configuration wizard outputs a YAML file that can be used by the server. It is also possible to create this YAML file by hand. An example of the structure of this file is shown below.
While it's technically possible to store the configuration files anywhere on your machine, it is highly recommended to use the default vantage6 system (or user) folder; this is done automatically if you use the wizard. The location of this folder depends on the operating system used (see the table below).
Each server instance (configuration) can have multiple environments. You can specify these under the key
environments which allows four types:
If you do not want to specify any environment, you should only specify the key
In the end, the configuration file should look like this:
application:...environments:test:description: Testtype: testip: '127.0.0.1'port: 5000api_path: /apiuri: sqlite:///test.sqliteallow_drop_all: Truejwt_secret_key: super-secret-key! #recommended but optionallogging:level: DEBUGfile: test.loguse_console: Truebackup_count: 5max_size: 1024format: "%(asctime)s - %(name)-14s - %(levelname)-8s - %(message)s"datefmt: "%Y-%m-%d %H:%M:%S"prod:...
Human readable description of the server instance. This is to help your peers to identify the server.
Internal ip-address where the server can be reached. Note that in case you are using the Docker version of vantage6 this is the ip address inside the container, and binds to the ip address
Port to which the server listens. In case of the Dockerized version this will be used both internally in the container as at your host (At your host machine the server will be reachable at 127.0.0.1:
API path prefix. (e.g.
The secret key used to generate JWT authorization tokens. This should be kept secret as others are able to generate access tokens if they know this secret. This parameter is optional. In case it is not provided in the configuration it is generated each time the server starts. Thereby invalidating all previous handout keys.
The URI to the database. This should be a valid SQLAlchemy URI, See here for more information. (e.g. for an Sqlite database:
This should be set to
See Configuration File Structure for example values.
To configure a Mail server add the following block to your configuration file:
prod:...smtp:port: 587server: smtp.office365.comusername: your-usernamepassword: super-secret-password...