Install miniserve on Ubuntu 24.04

Install miniserve on Ubuntu 24.04

The miniserve is a command line tool for serving files and directories over HTTP. It's a lightweight, single-binary application written in Rust programming language, designed to make it easy to share files from your computer or server without requiring complex setup or configuration. This tutorial explains how to install miniserve on Ubuntu 24.04.

Install miniserve

Retrieve the most recent version of miniserve from its official GitHub repository:

MINISERVE_VERSION=$(curl -s "" | grep -Po '"tag_name": "v\K[0-9.]+')

Download the miniserve executable and place it in the /usr/local/bin directory:

sudo wget -qO /usr/local/bin/miniserve$MINISERVE_VERSION-x86_64-unknown-linux-gnu

Set execute permission:

sudo chmod a+x /usr/local/bin/miniserve

We can verify the miniserve version with the following command:

miniserve --version

Testing miniserve

Create simple index.html for testing:

echo '<!DOCTYPE html><html><head><title>Title</title></head><body>Hello world</body></html>' > index.html

Serve previously created file over HTTP as follows:

miniserve index.html

Launch a web browser and navigate to http://<IP_ADDRESS>:8080, replacing <IP_ADDRESS> with your system's IP address. A newly created page will appear.

Uninstall miniserve

To remove miniserve, delete the associated file:

sudo rm -rf /usr/local/bin/miniserve

Leave a Comment

Cancel reply

Your email address will not be published.