Hardware How To's

Expose a Public URL

This feature is currently under maintenance

We recently made some changes that prevent port forwarding from the Brev console. We will have this back up and running shortly.

In this guide we show you how you can fully deploy your instance in one click. With Brev Public Ports, you can expose a port running on localhost to a public URL and easily send it to a friend, teammate, customer, or mother.

Within the Brev console

From the Brev console, click on your instance, open the Hardware tab, and scroll down to the "Public Ports" section


In the "Public Ports" section, add the port you wish to expose and click "Expose Port"


That's it! You can now share the URL with anyone you want.


Example: Build a Stable Diffusion API

To showcase this, we built a template to create a Fast API Stable Diffusion template. Run a Text to Image API right from your instance!

1. Clone the instance at this link.

2. Open your instance:

Once you've checked out your machine and landed in your instance page, select the specs you'd like (I used Python 3.10 and CUDA 12.1.1; these should be preconfigured for you if you use the badge above) and click the "Build" button to build your verb container. Give this a few minutes.

A few minutes after your model has started Running, click the 'Notebook' button on the top right of your screen once it illuminates (you may need to refresh the screen). You will be taken to a Jupyter Lab environment, where you will see a notebook called stable-diffusion-fast-api. Follow the instructions there (skipping step 1, "Get a GPU").

If you need HTTPS

At the moment, the exposed url does not have HTTPS. If you need HTTPS, please let us know in the #feedback channel on our Discord and we'll prioritize it. In the meantime, you can use Ngrok to get an HTTPS url.

Step 1: Install Ngrok

# ngrok
curl -s | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok

Step 2: Port forward your localhost port

# open port 3000 on a url
ngrok http 3000