Woof – Easily Exchange Files Over a Local Network in Linux

Woof (short for Web Offer One File) is a simple application for sharing files between hosts on a small local network. It consists of a tiny HTTP server that can serve a specified file for a given number of times (default is once) and then terminates.

To use woof, simply invoke it on a single file, and the recipient can access your shared file via a web browser or using a command-line web-client such as cURL, HTTPie, wget or kurly (a curl alternative) from the terminal.

One advantage of woof over other file sharing tools is that it shares files between a different operating system, or different devices (computers, smartphones, tablets etc.), provided the recipient has a web browser installed.

In this article, we will show how to install woof in Linux and use it to share files on a local network.

How to Install and Use Woof in Linux

On Debian and Ubuntu, you can easily install ‘woof‘ package from the distribution’s default repositories using apt or apt-get package manager as shown.

$ sudo apt install woof
$ sudo apt-get install woof

On other Linux distributions, you can download the woof script using wget command and move it to a /usr/bin directory as shown.

$ wget http://www.home.unix-ag.org/simon/woof
$ sudo cp woof /usr/bin/

To share a file, provide it as an argument as shown.

$ woof ./bin/bashscripts/getpubip.sh 

Then woof will generate a URL ( in this case) which your partner can use to access the file.

Share File with Woof
Share File with Woof

Send the URL to the recipient. Once the recipient accesses the file, woof will shutdown (see the following screenshot).

Access File Shared via Woof
Access File Shared via Woof

Note: In the above example, we have used wget command line downloader to obtain the shared file, and it automatically assigns the downloaded file a different name (for instance index.html).

To specify a custom name, use the -O option as shown.

$ wget -O  custom_name

Alternatively, you can also access the shared file from the web browser as shown (click Save File to download it).

Download Shared File from Web Browser
Download Shared File from Web Browser

By default, woof shares the file once, and after the recipient downloads it, woof terminates. You can set the number of time woof shares a file before it shuts down, using the -c option.

The following command will terminate woof after three downloads.

$ woof -c 3 ./bin/bashscripts/getpubip.sh

To share a directory, you can create a tarball and compress it by using (-z for gzip compression, or -j for bzip2 compression, or -Z for ZIP compression). For example:

$ woof -c 2 -z ./bin/

Check out the download file name, it should be a Gzip archive as shown in the following screenshot.

Download Compressed Tar Archive File
Download Compressed Tar Archive File

In addition, you can use the -U flag to tell woof to provide an upload form, allowing file uploads. The file will be uploaded to the current directory where woof was launched from:

$ woof -U

Then your partner can use the generated URL to access the upload form from a browser as shown.

Woof File Upload Form
Woof File Upload Form

After browsing and selecting the file, click the Upload button to upload files.

Woof File Upload Complete
Woof File Upload Complete

You can verify, that the file should be uploaded to the same directory where woof was invoked.

Verify File Uploads
Verify File Uploads

You can see more usage options by running:

$ man woof 
$ woof -h

Woof is a small, simple and easy-to-use HTTP server for sharing files on a local areas network. In this article, we showed how to install and use woof in Linux. Use the feedback form below to share your thoughts about this tool or ask questions.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.


Leave a Reply
  1. Anther easy way is using python http server module.
    Run the command “python -m SimpleHTTPServer 8000” in the folder you want to share the files.

  2. Because there aren’t scores of tools for accomplishing the same thing under Linux already. When are we going to start doing something, rather than reinventing the wheel, over and over again?


Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.