Skip to content

mrshabel/xend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xend - A local file-server over HTTP

xend is a zero-config file server for developers, tinkerers, and anyone who needs to quickly share a local directory over HTTP. It pairs perfectly with systems like Cloudflare Tunnel, letting you securely expose a local folder to the internet.

My motivation was to experiment with Cloudflare tunneling and HTTP while building something lightweight and useful.

Features

  • Secure by Default Hidden files and directories (.git, .env, etc.) are automatically blocked from being served.
  • Gzip Compression Assets are compressed when the client supports it.
  • Zero Configuration Run it in any directory you want.

Installation

There are two ways to install xend.

1. Download from Releases (Recommended)

You can download the latest pre-compiled binary for your operating system from the Releases page. This is the easiest way to get started.

2. Build from Source

If you prefer to build it yourself, you'll need Go installed.

Prerequisites

  • Go 1.24 or higher

Steps

  1. Clone the repository:

    git clone https://github.com/mrshabel/xend.git
    cd xend
  2. Build the binary:

    go build .

    This will create an executable named xend (or xend.exe on Windows) in the current directory.

Usage

You can run the server by pointing it to the directory you wish to serve.

# serve the current directory on localhost:8000
./xend

# serve a specific directory on a different port
./xend -dir ./public -port 9090

# see all available options
./xend -h

Options

Flag Description Default
-host HTTP network host to listen on localhost
-port HTTP network port to listen on 8000
-dir Root directory to serve files from .

Use with Cloudflare Tunnel

xend is perfect for exposing a local folder to the internet securely with Cloudflare Tunnel.

  1. Start the xend server:

    # Serve the 'example' folder on the default port 8000
    ./xend -dir /example
  2. Expose it with cloudflared:

    In a new terminal, run the cloudflared command to create a tunnel to your local server.

    cloudflared tunnel --url http://localhost:8000

    This generates a random public URL that securely tunnels traffic to your local xend instance. You may also configure your own custom public domain to point to the instance on the Cloudflare dashboard

References

About

A minimal HTTP file-server that lets you securely expose any local directory to the internet using Cloudflare Tunnels.

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages