🎉 Ebbflow has launched! 🎊
Use coupon code LaunchParty to save 25% off of the base price!

You can use Ebbflow to host a website with your Raspberry Pi very easily. You can use multiple Pis at the same time, or add your Raspberry Pi as an additional host to your fleet! It's also super easy to set up your Pi(s) so you can ssh to them.

Here are the steps this guide will work through assuming you've created an account (which has a free trial!!)

Installing the Client
Set up SSH (to SSH to your Pi from anywhere)
Set up Website Hosting

Ebbflow actually uses Raspberry Pis to host its website! You're currently being served by a server named aws-linux-i34709-useast. A hard-refresh (how-to) may let you get a Raspberry Pi as the host if you don't already see one. Here is an actual photo of some of the Pis Ebbflow uses to host its own website, through Ebbflow:

If you get stuck, you can always follow the quickstart guide or consult the general documentation.

Installing the Client

Ebbflow vends a Debian package for the Raspberry Pi specifically (If you're curious about how Ebbflow does this, check Linux Packaging blog post). The following commands will add Ebbflow's package signing key as a trusted key, add our servers as a package repo, and then finally install the package to your system.

curl https://pkg.ebbflow.io/live/raspbian/buster.gpg | sudo apt-key add -
curl https://pkg.ebbflow.io/live/raspbian/buster.list | sudo tee /etc/apt/sources.list.d/ebbflow.list
sudo apt update && sudo apt install ebbflow

You should see that the ebbflow package was successfully installed! If not, email support@ebbflow.io.

To initialize the client, you then execute

sudo ebbflow init
Here you will be asked about setting up SSH!

Setting up SSH

When you execute sudo ebbflow init you will be asked if you'd like to have SSH set up for your Pi, meaning you will be able to SSH to this Pi from anywhere. If you would like it, type y and continue! It will then ask you to change what name will be used as the target for this Pi. This name is used when connections to this Pi are attempted, e.g. when you do ssh -J ebbflow.io pi@HOSTNAME. If you have one Pi, you will probably leave this as the default raspberrypi hostname, but feel free to change it. Here is what it looks like for my Pi that I already changed the hostname of:

The Pi is setup to Receive connections, but you aren't set up to connect to it yet. You need to add the public portion of your SSH key from as host you'd like to ssh from. To do this, from the host want to SSH from, find the public portion of your SSH key, typically ~/.ssh/id_rsa.pub. Here are other resources:

  • Finding an existing key: guide
  • Generating a new key: guide

After you've found your key, add it to Ebbflow in the Console > IAM > Create New SSH Key. This is what it should look like:

Note the Policy we are adding, SshToAnything. More documentation about Ebbflow's permission model can be found here, but what we do specifically now is allow this SSH key to SSH to any server in this account.

Once that is setup, you should be all good to go! Assuming you kept raspberrypi as your hostname, you can likely just do

ssh -J ebbflow.io pi@raspberrypi
This "should just work"! If something goes wrong, go to your Pi and execute ebbflow status to look for errors.

Hosting your Website

Hosting websites through your Pi is a very exciting prospect, as it can be a major pain to get the networking correct to route a website to your Pi. As described in Ebbflow's announcement blog post, networking is tricky and Ebbflow aims to solve that. And as we mentioned above, Ebbflow's website is partially hosted by Raspberry Pis, through Ebbflow itself! (Note that we are talking about the website for Ebbflow, not the actual Ebbflow data plane, which is hosted on multiple regions, continents, and cloud providers)

First things first, your Pi will need to be running some web server. Maybe that means Apache (guide) or something you wrote in Python or Rust ❤️. This server should already be up and running. The goal is to expose this web server to the world using a domain name you own!

To get started with things Ebbflow-wise, create an Endpoint in Ebbflow. We highly recommend Managed as the type. From there, you will see a page with some data and instructions for setting up DNS. You need to point your domain name to Ebbflow, so that when users visit your website they will reach Ebbflow servers which will then reach out to your Raspberry Pi. The following diagram shows the general traffic flow

The instructions of setting up DNS for your domain name are specific to whomever you registered your domain name with so we cannot provide specific instructions.

Once DNS is set up click the Verify button on your endpoint's page. Ebbflow then tries to verify your domain name points to Ebbflow and that everything is OK.

The following video shows the end-to-end process which may be helpful to you, although it is running on an Ubuntu machine, not Raspberry Pi. If you get stuck, consult this or the quickstart guide.

After DNS is working, we just need to tell our Pi to host the website! We do so by adding the domain name as a new Endpoint using the ebbflow CLI:

# Note the port your server is running on, Apache uses 80 for example

sudo ebbflow config add-endpoint --dns your-website.com --port 80
After that is done, and assuming your web server is running, then you should be able to navigate to your website on any browser, or via curl. If that doesn't work, make sure your endpoint has been 'Verified' on the Ebbflow Console or check for errors on your Pi using ebbflow status. Your Raspberry Pi should now be successfully hosting your website with browser trusted Let's Encrypt certificates!

Conclusion

Now your Raspberry Pi is being put to use! You can access your Pi from the coffee shop or when you're traveling, and you didn't need to punch a hole in your router or expose your home's IP address. Raspberry Pis are powerful little computers that would cost at least a hundred dollars a year, or more, for a similarly spec'd cloud instance. Using Ebbflow, we can use our Raspberry Pis to actually host production traffic, as Ebbflow is doing itself.

I hope you've enjoyed this guide on how to host a website on your Raspberry Pi! If you have feedback, you can always email info@ebbflow.io.