Hosting your Svelte app on the internet securely without deploying to a full server is simple with Pinggy. This guide will show you how to run your Svelte application locally and expose it publicly via a secure SSH tunnel in just a few steps.
npx sv create my-app
cd my-app
npm install
npm run dev
2 Create a Tunnel with Pinggy Start SSH tunnel:
ssh -p 443 -R0:localhost:5173 -t qr@a.pinggy.io \"u:Host:localhost:5173\"
Access your Svelte app via the provided Pinggy public URL (e.g., https://your-app.pinggy.link
).
Svelte is an innovative, open-source JavaScript framework that shifts much of the work from runtime to compile time. Unlike traditional frameworks like React or Vue, Svelte compiles your code into vanilla JavaScript, resulting in:
Svelte is perfect for building everything from lightweight static sites to highly interactive applications with minimal fuss.
When developing a
Svelte application, it runs locally (e.g., on localhost:5173
), but there’s a common challenge: others cannot access your local development server. This limitation exists because of network constraints like
CGNAT (Carrier-Grade NAT), firewalls, and standard NAT configurations that prevent direct incoming connections to your device.
Traditional solutions involve deploying your app to cloud services, but this approach is often:
Using Pinggy, you can create a secure tunnel that instantly makes your locally-hosted Svelte application accessible to anyone on the internet no complex configuration or cloud deployments required.
npx sv create my-app
cd my-app
npm install
npm run dev
Visit http://localhost:5173
to verify your app is running locally.
Open a new terminal window and run:
ssh -p 443 -R0:localhost:5173 -t qr@a.pinggy.io \"u:Host:localhost:5173\"
ssh -p 443
: Connects securely to Pinggy’s server.-R0:localhost:5173
: Maps your local Svelte app (port 5173) to a public URL.a.pinggy.io
: The Pinggy server endpoint.Pinggy will provide a public URL (e.g., https://your-app.pinggy.link
). Open it in your browser to access your Svelte app remotely.
Pinggy offers advanced customization options to improve functionality and security.
To learn more about these features, refer to Pinggy’s official documentation.
5173
, or adjust -R0:localhost:<your_port>
.443
or switch networks.ssh: command not found.
Using Pinggy to share your Svelte app lets you skip complex deployments while keeping your work secure via SSH tunneling. With a few commands, your local app becomes globally accessible—perfect for demos, reviews, or testing. When it’s time for production, Svelte’s lightweight output pairs seamlessly with platforms like Vercel or Netlify.