Posts

Showing posts with the label openssl

https://www.vultr.com

The Everywhere Cloud

Deploy an instance.
Accelerate your application.


Running Home Assistant on FreeBSD Servers

Image
Home Assistant is an open-source home automation system powered by Python, primarily intended to run on single-board computers like the Raspberry Pi, with Linux as the host operating system. The following procedure shows how to run Home Assistant Core on FreeBSD servers, on either physical or virtual machines. ========== 1. PREPARING THE SERVER 1.1. Update the package list and upgrade the existing packages. root@host: # pkg update && pkg upgrade -y 1.2. Install Python and other required packages. root@host: # pkg install python38 py38-sqlite3 openssl autoconf libffi rust 1.3. Create a system account with disabled login (-w no), a dedicated home directory (-m), and some informational text (-c comment). root@host: #  pw useradd homeassistant -w no -m -c "Home Assistant" 1.3.1. If groups for hardware input/output are present, append the system account. Else, skip this step for now. root@host: #  pw groupmod gpio -m homeassistant root@host: #  pw groupmod i2c -m ...

Enabling HTTPS in Home Assistant

Image
The following procedure activates HTTPS for the Home Assistant server. The secure protocol uses TLS/SSL certificates to encrypt the data transferred between user and server. Although it is possible to make this home automation system, whether in  Linux or  FreeBSD , accessible over the Internet, Home Assistant is usually operated within private networks, either physical or virtual. In this case, self-signed certificates may be acceptable to use and quicker to deploy. ========== 1. Log in as the system account. 1.1. Linux, with $HOME "bin" included in $PATH (-i) of system account (-u). user@host: $ sudo -i -u homeassistant 1.2. FreeBSD, coming from "root" superuser. root@host: # su - homeassistant 2. Go to the Home Assistant configuration directory. user@host: $ cd ~/.homeassistant 3. Make a directory for SSL certificates. user@host: $ mkdir ssl 4. Ensure that only the system account and members of its group can access the directory. user@host:...

Making Self-Signed Digital Certificates

Image
The need for TLS/SSL certificates may arise when developing server projects that need encryption, like the Apache web server on  Debian-based  or Red Hat-based Linux distributions, on the  FreeBSD  operating system, and the Home Assistant  home automation system. The following procedure shows how to create and install self-signed certificates, if acquiring them from a Certificate Authority (CA) is either too expensive or too complicated. It is important to keep in mind, however, that self-signing may be deemed UNTRUSTWORTHY in a production environment. ========== 1. Create the certificate and key. 1.1.  [OPTION A] One-step process, skipping the Certificate Signing Request (CSR). user@host: $  openssl req -new -x509 -days 36500 -nodes -keyout server.key -out server.crt 1.2.  [OPTION B] Separate CSR for submission to CAs, if planning to legitimize later on. 1.2.1. Generate keys for the CSR. user@host:...