https://github.com/stacksjs/localtunnels
π A simple and smart tunneling alternative. Without or with self-hosting.
https://github.com/stacksjs/localtunnels
dev-tool expose local-development localtunnel ngrok tunnel
Last synced: about 2 months ago
JSON representation
π A simple and smart tunneling alternative. Without or with self-hosting.
- Host: GitHub
- URL: https://github.com/stacksjs/localtunnels
- Owner: stacksjs
- License: mit
- Created: 2024-03-02T07:32:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-13T22:57:15.000Z (about 2 months ago)
- Last Synced: 2025-08-14T00:25:03.054Z (about 2 months ago)
- Topics: dev-tool, expose, local-development, localtunnel, ngrok, tunnel
- Language: TypeScript
- Homepage: https://localtunnel.sh
- Size: 19.1 MB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
[![npm version][npm-version-src]][npm-version-href]
[![GitHub Actions][github-actions-src]][github-actions-href]
[](http://commitizen.github.io/cz-cli/)# localtunnels
> A zero-config local tunnel that's simple, lightweight, and secure.
## Features
- Simple, lightweight local tunnel
- Security built-in, including HTTPS
- IAC, self-hostable _(via AWS)_
- Custom subdomains
- CLI & Library## Install
```sh
bun install -d localtunnels
```## Get Started
There are two ways of using this local tunnel: _as a library or as a CLI._
### Library
Given the npm package is installed:
```ts
import type { LocalTunnelConfig } from 'localtunnels'
import { startLocalTunnel } from 'localtunnels'const config: LocalTunnelConfig = {
from: 'localhost:5173',
domain: 'stacksjs.dev', // optional, defaults to the stacksjs.dev domain
subdomain: 'test', // optional, uses a random subdomain by default
verbose: true, // optional, defaults to false
}startLocalTunnel(config)
```You may als use a configuration file:
```ts
// tunnel.config.{ts,js}
import type { LocalTunnelConfig } from '@stacksjs/localtunnels'const config: LocalTunnelConfig = {
from: 'localhost:5173',
domain: 'stacksjs.dev', // optional, defaults to the stacksjs.dev domain
subdomain: 'test', // optional, uses a random subdomain by default
verbose: true, // optional, defaults to false
}export default config
```_Then run:_
```sh
./localtunnels start
```### CLI
```sh
localtunnels start --from localhost:5173 --subdomain test --verbose
localtunnels --help
localtunnels --version
```To learn more, head over to the [documentation](https://localtunnels.sh/).
## Testing
```sh
bun test
```## Changelog
Please see our [releases](https://github.com/stacksjs/localtunnels/releases) page for more information on what has changed recently.
## Contributing
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
## Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)
For casual chit-chat with others using this package:
[Join the Stacks Discord Server](https://discord.gg/stacksjs)
## Postcardware
βSoftware that is free, but hopes for a postcard.β We love receiving postcards from around the world showing where `localtunnels` is being used! We showcase them on our website too.
Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States π
## Sponsors
We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.
- [JetBrains](https://www.jetbrains.com/)
- [The Solana Foundation](https://solana.com/)## Credits
- [Chris Breuer](https://github.com/chrisbbreuer)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
Made with π
[npm-version-src]: https://img.shields.io/npm/v/localtunnels?style=flat-square
[npm-version-href]: https://npmjs.com/package/localtunnels
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/localtunnels/ci.yml?style=flat-square&branch=main
[github-actions-href]: https://github.com/stacksjs/localtunnels/actions?query=workflow%3Aci