Easily Share Your Local Server

This tutorial demonstrates a way to share your localhost server with anyone, anywhere, using cotunnel to create a secure tunnel to your local development server.

Demonstrating your application’s latest features to project managers or clients isn’t easy unless they’re sitting a few desks away. It may be possible to commit the changes and deploy to a public staging server, but that process can be impractical if you’re just seeking an opinion about a widget color or demonstrating the futility of their ridiculous suggestion!

Ideally, you need some way to share access to your localhost server. Cotunnel provides that solution for sharing your local web server.

What is Cotunnel?

Your development machine may be connected to a secure network behind a firewall. To work around access restrictions, Cotunnel runs a small client process on your machine which creates a private connection tunnel to the cloud service. Your localhost development server is mapped to an cotunnel.com sub-domain, which a remote user can then access. There’s no need to expose ports, set up forwarding, or make other network changes.
The cotunnel client software is available for Windows, macOS, and Linux.

Is Local Tunneling Secure?

The connection tunnel established by cotunnel is secure and can only transmit data to the localhost port you have open. It would be difficult to do any damage, but it’s only as secure as the application you’re testing.

Install Cotunnel

Go to cotunnel.com, register and login. Click add a new device button. The popup will appear please follow the instructions by your platform. You can watch the video about cotunnel installation progress.



After the installation progress finished. You can visit tunnels tab in the Cotunnel dashboard.



You can also modify the tunnel port settings. You can set the device port to whatever port you are using on your local server.



And now anyone can visit my local React app using the tunnel url provided by Cotunnel. You can see your Cotunnel url in the Tunnels tab.

Why would I need Cotunnel?

Cotunnel is useful when you’re developing web applications or APIs locally and need to share them with others or access them from external devices for testing and debugging.

Can I use Cotunnel in production environments?

Cotunnel is primarily designed for development and testing, it’s not recommended for production use due to potential performance.

Is Cotunnel secure?

Cotunnel uses secure tunnels (HTTPS) to transfer data between your local machine and the internet. However, keep in mind that data passing through Cotunnel’s servers is decrypted at their end before being sent to your local machine.

Can I use Cotunnel for TCP or UDP tunnels?

Yes, Cotunnel supports creating tunnels for TCP and UDP protocols, in addition to HTTP and HTTPS. This can be useful for exposing services that don’t use the HTTP protocol.

Can I specify a custom subdomain with Cotunnel?

Yes, you can use a custom subdomain if you are using paid plan.