Megumin - Temporary file uploader
Small temporary file uploader.
Quickstart
Requires Go >= 1.26.0
Modify any config variables in the config.toml. For SSL support you will need to provide the keyfile and certfile paths, these are blank by default.
go get
go build
./megumin
[!NOTE]
If you need to build megumin in an isolated environment (e.g. the building user has no home directory), prefix any go commands with GOCACHE=/tmp/go-build GOPATH=/tmp/go.
Usage with curl
# Upload a file
$ curl -F "file=@somefile.txt" https://megumin.example.com/upload/
{"detail":"success","sharelink":"https://megumin.example.com/Abc123"}
# Download a file
$ curl -OJ https://megumin.example.com/Abc123
# => saves: somefile.txt
Running as a systemd Service
- Create the user
megumin on your system
- Clone this repo to
/opt/megumin
- Modify any config variables in
config.toml
- Compile megunin from source. Refer to Quickstart, omitting running the program
- Copy
megumin.service to /etc/systemd/system/megumin.service
- Transfer the necessary permissions with
sudo chown -R megumin:megumin /opt/megumin
- Enable and start the service with
sudo systemctl enable --now megumin