I have a Raspberry Pi Model B V1.2, and I wanted to transform it into a server. The foundation provides some software to flash an OS on the micro SD card, based on your distribution.
- I’ve installed RaspberryPi OS
- Once connected, I’ve turn on SSH in “interfaces”, then reboot.
- You should now be able to access the raspberry pi via ssh using the username and password you’ve defined for the first login.
- I’ve installed nginx, the config is pretty basic:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html/brain;
index index.html;
error_page 404 /404.html;
server_name test.com;
location / {
try_files $uri $uri.html $uri/ =404;
}
}
- I had to request a static IP from my internet provider
- I set a static IP address for my server inside my router config
WARNING
I could not reach my local server from macOS. You have to give access to your browsers to your local network: System Settings > Privacy & Security > Local Network > enable your browsers and command line here
- I went to my domain name provider to add a DNS record to bind my domain name on my local server
- Following this tuto for installing Let’s Encrypt. It was not working in the beginning because I had a problem with my DNS cache that wasn’t refreshing.
- Finally I added automation for releasing my second brain with Ansible and a bash script