Install · Commands

Server commands

All commands of the basklee server tool. Run them with sudo; sudo basklee without a command opens a menu with the common tasks.

How it works

The tool keeps its records in /etc/basklee, the nginx sites in /etc/nginx/basklee and the storefronts in /srv/basklee. Two commands never change the server at the same time: if one is running, the next one stops and asks you to wait.

Commands

CommandWhat it does
sudo baskleeMenu with the common tasks.
sudo basklee setupInstalls Node.js, nginx and certbot and prepares the server. Safe to run again.
sudo basklee domain add [domain]Adds a domain with an HTTPS certificate and connects it to a storefront and your backend.
sudo basklee domain listDomains with storefront, backend, days left on the certificate and HTTPS status.
sudo basklee domain check <domain>Checks the DNS, certificate, backend, storefront and HTTPS answer of one domain.
sudo basklee domain remove <domain>Removes a domain; with --delete-certificate its certificate too.
sudo basklee cert listExpiry dates of the certificates.
sudo basklee cert renew [--force]Renews the storefront certificates that expire within 30 days; --force renews all of them now. Certificates of other sites are left alone.
sudo basklee app install <nuxt|react|svelte> [name]Creates a storefront from its npm package in /srv/basklee, connects your backend and domain, gets the certificate and runs the storefront as a service.
sudo basklee app versions <nuxt|react|svelte>Published versions of a storefront package.
sudo basklee app listInstalled storefronts with type, port, state, backend and folder.
sudo basklee app status <name>Service state of a storefront.
sudo basklee app logs <name>Last log lines of a storefront.
sudo basklee app start|stop|restart <name>Starts, stops or restarts the service of a storefront.
sudo basklee app remove <name>Stops and removes the service of a storefront. Its files stay; its domains show a placeholder.
sudo basklee statusNode.js, nginx, certbot, storefronts and domains at a glance.
sudo basklee updateDownloads the latest version of the tool.
basklee helpAll commands and options.

Update the tool

The tool downloads its latest version from basklee.com:

bash
sudo basklee update

Files

Domains: /etc/basklee/domains. Storefronts: /etc/basklee/apps. nginx sites: /etc/nginx/basklee, one file per domain, written by the tool; nginx loads them through basklee.conf in the folder nginx.conf includes (conf.d, or http.d on Alpine), or through basklee-loader.conf next to nginx.conf. Certificates: /etc/letsencrypt/live. Storefront services: /etc/systemd/system, or /etc/init.d on Alpine. Storefront logs: journalctl, or /var/log/basklee on Alpine.