Urgent.News

What's breaking now, across thousands of outlets.

Tech

How do you actually self-host securely?

I recognize that the title is rather vague, but I'm completely green when it comes to self-hosting, so I figured here would be a good place to ask for some pointers given the discussions I sometimes see happening in the comments. I tried researching first through DDG and Google, but (and I recognize this might be a skill issue) most things I found are either SEO slop or trying to sell/market some…

I understand that you're new to self-hosting and looking for guidance on how to do it securely. You've got a Raspberry Pi and want to start by hosting your static website on it, potentially expanding to other services later on. You're skeptical of using solutions like Cloudflare Tunnels as they seem to go against the spirit of self-hosting.

To get started securely, you'll first need to set up your Raspberry Pi with a stable operating system like Raspberry Pi OS. Make sure to keep the OS up to date with the latest security patches. Next, you'll need to install and configure a web server such as Apache or Nginx, which will serve your static website files.

For accessing your website remotely, you can set up port forwarding on your router so that incoming traffic on a specific port (e.g., 80 for HTTP or 443 for HTTPS) is directed to your Raspberry Pi's IP address. You'll then use a domain name or IP address to access your site from anywhere.

To enhance security, consider implementing HTTPS using a tool like Certbot to obtain and install a free SSL certificate. This will encrypt the data between your website visitors and your Raspberry Pi. Additionally, you can configure a firewall (like UFW on Raspberry Pi OS) to only allow traffic on necessary ports and block everything else.

Be aware that self-hosting comes with its own set of challenges. You'll be responsible for maintaining your server, including regular updates, backups, and monitoring for potential security issues. It's crucial to understand the basics of network security, such as keeping software updated, using strong passwords, and being cautious about which ports you open.

In summary, while Cloudflare Tunnels might seem convenient, the essence of self-hosting is about having control over your own infrastructure. By using open source tools and following best practices for security, you can set up a secure and private environment to host your website on your Raspberry Pi. Just remember, with great power comes great responsibility—you're now in charge of the security of your own system.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at lobste.rs →

More in Tech

More from Wednesday 11 November →