⚙️Configuring and Running Kepler
Setting up a Host
Kepler is a Rust application which can serve Controllers and Clients over HTTP. To build Kepler yourself, you need only Cargo and Git.
First, clone the Kepler repository:
Next, choose a location which the Hosts can use to store content uploaded by Clients. The easiest way is to use the local filesystem. Make sure that the path exists before running the application. For example:
Finally, decide on a secret for this Kepler instance. This secret MUST be encoded as a URL-safe unpadded base 64 string. It is used to derive the identifiers and cryptographic key pairs for the Hosts belonging to this kepler instance. For example:
With these environment variables set, Kepler can be run in a few ways (these are example config options for testing things out, do not use this secret value in production):
Running Kepler from source with Cargo is easy:
To see debug log output, you can add the RUST_LOG=debug
environment variable.
Additional Configuration Options
There are a number of configuration options available to Kepler deployments. They can be configured via environment variables or a kepler.toml
configuration file. The only required config options are the Host's secret and the content storage config. For more information, see the Configuration section of the Kepler readme.
CORS
If running Kepler locally for development purposes, CORS support can be enabled via the KEPLER_CORS
config option:
Notes on production deployment
When deploying in a production environment, the following points are STRONGLY RECOMMENDED:
Back up the value of
KEPLER_KEYS_SECRET
in a secure locationDo not configure
KEPLER_KEYS_SECRET
via thekepler.toml
config file, only with an environment variable.Make use of the
KEPLER_STORAGE_DATABASE
configuration option. By default it will use an in-memory instance of SQLite which will NOT be persisted. In production it will be essential to persist this information, either in an on-disk SQLite file or an instance of PostgreSQL.
Last updated