A stupidly simple and easy to self-host, personal server for file hosting on the web. Written in Rust.
Thanks, @Maciejowski, for the stylesheet!
- Install Docker
- Create a new directory and, inside it, a file called
docker-compose.yml
- Copy the following contents into that file:
version: '3.3'
services:
grasswave:
image: rafal06/grasswave:latest
container_name: grasswave
restart: unless-stopped
ports:
- '7000:7000'
volumes:
- ./data:/data
- Start the container with the command
docker compose up -d
- Copy the files for serving to the
./data/files
directory (see the section How to use) - If the container is not starting, check the logs with
docker compose logs
- Install the Rust toolchain
- Clone this repository
- Create the
files
folder and put your files inside (see How to use) - Run
cargo run --release
- This will compile and run the project
For every file you want to publish, create a seperate directory in the files
folder, and place the files inside of them. In every directory, create a file named info.toml
.
files
├── lorem
│ ├── lorem.tar.xz
│ └── info.toml
├── ipsum
│ ├── info.toml
│ └── ipsum.tar.xz
└── dolor
├── info.toml
└── dolor.tar.xz
In the toml files, set the name and description to display, and the name of the file to publish, in the following format:
name = "Lorem"
description = "Lorem ipsum dolor sit amet"
tags = ["lorem", "ipsum", "dolor"]
path = "lorem.tar.xz"
Run the executable, and that's it! You can visit it in the browser at the link displayed in the terminal.
You can configure it in a config file created automatically on the first run.
Default config
displayed_name = "Grasswave CDN"
files_path = "files"
accent_colors = ["#1D9F00", "#4DE928"]
http_port = 7000