Examples
For a zero-dependency first step, run portzero demo (see Getting
started): it serves a built-in page through a Local tunnel with
nothing to clone or install. The examples below show the same PZ_TUNNEL mechanism on
real stacks.
These examples live in the separate portzero-examples
repository. Clone it anywhere convenient:
git clone https://github.com/PortZeroNetwork/portzero-examples.git
cd portzero-examples
Prefer one click? The PortZero app’s Getting started panel can download these same
examples and run any of them for you — no manual clone or PZ_TUNNEL wrangling needed.
The steps below are the equivalent done by hand.
Each example sets PZ_TUNNEL so the local daemon can make the process or Docker
Compose project available at a *.portzero.local name.
TypeScript process
cd nodejs-typescript/process
PZ_TUNNEL="nodejs-typescript-process.portzero.local:80" node app.ts
Open http://nodejs-typescript-process.portzero.local/ after the example starts.
TypeScript Docker Compose
cd nodejs-typescript/docker
PZ_TUNNEL="nodejs-typescript-docker.portzero.local:80" docker compose up --build
Requires Docker with Docker Compose installed and running. Open
http://nodejs-typescript-docker.portzero.local/ after the example starts.
Python process
cd python/process
PZ_TUNNEL="python-process.portzero.local:80" uv run python app.py
Open http://python-process.portzero.local/ after the example starts.
Python Docker Compose
cd python/docker
PZ_TUNNEL="python-docker.portzero.local:80" docker compose up --build
Requires Docker with Docker Compose installed and running. Open
http://python-docker.portzero.local/ after the example starts.
Rust process
cd rust/process
PZ_TUNNEL="rust-process.portzero.local:80" cargo run --quiet
Open http://rust-process.portzero.local/ after the example starts.
Rust Docker Compose
cd rust/docker
PZ_TUNNEL="rust-docker.portzero.local:80" docker compose up --build
Requires Docker with Docker Compose installed and running. Open
http://rust-docker.portzero.local/ after the example starts.
C# process
cd csharp/process
PZ_TUNNEL="csharp-process.portzero.local:80" dotnet run --no-launch-profile
Open http://csharp-process.portzero.local/ after the example starts.
C# Docker Compose
cd csharp/docker
PZ_TUNNEL="csharp-docker.portzero.local:80" docker compose up --build
Requires Docker with Docker Compose installed and running. Open
http://csharp-docker.portzero.local/ after the example starts.
On Windows, use PowerShell’s $env:PZ_TUNNEL = "..." form (set on its own line) before
each command instead of the inline VAR=value command form shown above.