Environment setup
Last updated
Was this helpful?
Last updated
Was this helpful?
Clone recursively (including Git submodules like protos and UI):
Using you can setup a simple stack with:
Defguard Core
database
Defguard Gateway
example device connected to the gateway
This way you'll have some live stats data to work with.
To do so follow these steps:
Migrate database and insert test network and device:
Run the application:
To use different versions of Defguard images, edit docker-compose.yaml file, replacing image:
sections. Consult versions to browse for available image tags.
For example, to use current development version, change this section in docker-compose.yaml:
To run local code you will need to build core image from local changes:
Then just run the compose normally.
To run Defguard Core without Docker, you'll need:
environment variables set
The procedure to start Defguard Core:
Build front-end
Start Defguard Core in development mode
Once that's done, you can run backend with:
Use a web browser to connect to Defguard. For example, when using the default configuration the web site should be accessible under this address:
http://localhost:8000/
DEFGUARD_COOKIE_INSECURE=true
- running HTTP server locally does not need secured cookies
DEFGUARD_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- 64-character long security key
DEFGUARD_LOG_LEVEL=debug
- increase logging level
database
compiler (protoc
)
Launch PostgreSQL database, for example using :
Install
or use another method described in .
You'll find environment variables in .env file. Source them however you like (we recommend ).
Consult manual for a list of all available configuration settings.