Skip to main content

Deployments guides

Docker

Install and configure dependencies

MySQL

If you plan to use SQLite, please skip this step.
To install the MySQL server files, run the following command:
To start the MySQL service:
Set a password for the MySQL root user. Connect to MySQL:
Use the following command to create a user and password:
Now create a database with the same name:
And grant privileges to the user on that database:

Nginx

To install Nginx, run the following command:

Running the Locker Secrets API

Create a directory to deploy the Locker Secrets API application:
Write the .env file with the content below:
If you choose SQLite as the database, you need to mount a directory to avoid data loss after container restart:
Run the Docker command, replacing api_port and web_socket_port with your custom values:
Configure Nginx and HTTPS: Create a file named api in the /etc/nginx/sites-enabled directory with the following content:
Restart the Nginx service:
Now the Locker Secrets API is running at https://locker_secrets_api_domain:[nginx_port].

Running the Locker Secrets Web

Create a directory to deploy the Locker Secrets Web application:
Write the .env file with the content below:
Run the Docker command, replacing web_port with a custom value:
Configure Nginx and HTTPS: Create a file named web in the /etc/nginx/sites-enabled directory with the following content:
Restart the Nginx service:
Now the Locker Secrets Web is running at https://locker_secrets_web_domain:[nginx_port].

docker-compose

Run all Locker Secrets components at once

Create a directory to deploy Locker Secrets:
Write a docker-compose.yml file with the following content. Make sure you replace values such as Locker Secrets domain, MySQL passwords, Nginx API port, and Nginx web port with the appropriate values:
Create a directory named conf and a default.conf file inside it:
Content of default.conf:
Create a directory named ssl, move your certificate file and key file into it. Then start all services at once:
Now you can access https://your_domain_or_ip:web_port to view the Locker Secrets Web graphical user interface.