opuza serves the contents of a local directory, providing file listings and downloads over HTTP.
For example, you can point it at a directory full of PDFs, allowing users to browse and view the PDFs in their web browser.
If opuza is connected to monero-wallet-rpc, it can be configured to require Monero payments for downloads.
Public Opuza instances:
- Open an issue or submit a PR if you run an Opuza instance and would like it to appear in this readme!
Opuza is free software developed by @refring, forked of the great project Agora
If you have a question, want to request a feature, or find a bug, please feel free to open an issue.
The developer can also be reached via email.
$ mkdir files
$ echo 'amazing content' > files/file.txt
$ opuza --directory files --http-port 1234
$ curl http://localhost:1234/files/file.txtSee opuza --help for more configuration options.
Pre-built binaries for Linux, MacOS, and Windows can be found on the releases page.
opuza is written in Rust and built with cargo.
You can install Rust with rustup.
Inside the checked out repository, running cargo build --release will build opuza and copy the binary to ./target/release/opuza.
From within the repository, you can also run, e.g., cargo install --locked --path . --root /usr/local, which will copy opuza to /usr/local/bin/opuza.
The opuza Docker image can be pulled from ghcr.
The Docker image can also be built directly from within the repository.
Building the image:
docker build --tag opuza:latest .The Docker image can used to serve files from your host machine, and connect to your existing monero-wallet-rpc instance.
To run opuza with a local directory ~/my-files:
docker run \
--network="host" \
-e FILES_DIR=/files \
-e OPUZA_PORT=8080 \
-v ~/my-files:/files \
opuza:latestTo receive release notifications on GitHub, you can watch this repository with custom notification settings.
Additionally, an RSS feed of opuza releases is published here.
The opuza binary contains its static assets, so it can be copied and run from anywhere on the filesystem.
By default cargo links to system libraries dynamically.
You can avoid this by using the x86_64-unknown-linux-musl target: cargo build --target=x86_64-unknown-linux-musl --release.
This produces a statically linked binary that runs on, e.g., Alpine and CentOS Linux.
You can configure the network port and address opuza listens on, and the directory it serves.
See opuza --help for details.
If you're running opuza on a public domain it can be configured to automatically request TLS certificates for HTTPS from Let's Encrypt via the ACME protocol.
See the --acme-* and --https-* flags in opuza --help for details.
By default opuza serves files for free.
To charge for downloads, opuza must be connected to an monero-wallet-rpc instance.
There are multiple command line flags to configure this connection, see opuza --help for details.
To configure which files are free and which are paid, see Access Configuration below.
You can put a .opuza.yaml configuration file into directories served by opuza to configure access to files in that directory.
An example configuration is:
# whether or not to charge for files
paid: true
# price for files in XMR
base-price: 0.1 XMRAccess configuration applies recursively to files in subdirectories. For example you can put this configuration in your base directory:
paid: false
base-price: 0.01 XMRThen in some subdirectories you can charge for file downloads by creating an subdir/.opuza.yaml like this:
paid: trueThe default configuration is:
paid: false
# `base-price` does not have a default. Setting `paid` to `true`
# while not having a `base-price` causes an error.
base-price: nullopuza serves directory file listings.
If a .index.md file is present in a directory, opuza will render the contained Markdown as HTML and include it with the file listing. opuza expects Commonmark Markdown, extended with footnotes, strikethrough, tables, and task lists.
You can navigate to any Opuza instance and browse the hosted files. Opuza instances can host a mix of free and paid files. For paid files, Opuza will present you a invoice to be paid with Monero that you must pay before downloading the file. These invoices can be paid with a Monero wallet. Popular wallets include:
- Monero GUI Wallet, An open-source graphical user interface (GUI) wallet developed by the Monero community
- Feather, Feather is a free, open-source Monero wallet for Linux, Tails, Windows and macOS.
- Monerujo, a self-custodial wallet for Android.
- Cake Wallet, a self-custodial wallet for iOS and Android.
Opuza is not a hosted platform.
If you want to sell files through it, you'll have to host your own Opuza instance.
Opuza instances require access to an monero-wallet-rpc instance
to create invoices and query their payment status.
monero-wallet-rpc in turn needs access to a Monero node --
to query the state of the Monero blockchain.
A guide to setup a node can be found here
In order to process payments, Opuza needs to be connected to an monero-wallet-rpc instance.
See the --monero-* flags in opuza --help.
You can run the tests locally with cargo test.
Pull requests are tested on github actions, with the workflow defined in .github/workflows/build.yaml.
You can run approximately the same tests locally with just all.
(See just.)
Opuza is licensed under the CC0 with the exception of third-party components listed in ATTRIBUTION.md.