https://github.com/kernelschmelze/inbox
simple upload server with pushover notification
https://github.com/kernelschmelze/inbox
curl pushover self-hosted uberspace upload-server
Last synced: 3 months ago
JSON representation
simple upload server with pushover notification
- Host: GitHub
- URL: https://github.com/kernelschmelze/inbox
- Owner: kernelschmelze
- License: mit
- Created: 2022-05-21T16:13:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-03T12:43:52.000Z (about 3 years ago)
- Last Synced: 2024-12-28T12:18:25.053Z (about 1 year ago)
- Topics: curl, pushover, self-hosted, uberspace, upload-server
- Language: Go
- Homepage:
- Size: 78.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Inbox
Inbox is a simple upload server with [Pushover](https://pushover.net/) notification for messages or small files.
``` bash
echo "Hallo Freund" | \
curl -F file=@- -F "from=Kay" -F "subject=re: inbox" http://localhost:25478/inbox
```
Persist upload to disk.
`./data/f6ab2023-c582-4939-ba77-d758e3b85aee`
``` json
{
"time":"2022-05-21T18:33:51.562755+02:00",
"id":"f6ab2023-c582-4939-ba77-d758e3b85aee",
"from":"Kay",
"subject":"re: inbox",
"payload":"SGFsbG8gRnJldW5kCg=="
}
```
With Pushover notification.

## Use case
### Upload a file
```bash
curl -F "file=@msg.txt" -F "from=Kay" -F "subject=file upload" https://127.0.0.1:12345/inbox
```
### Upload encrypted message
I prefer [age](https://github.com/FiloSottile/age) instead of pgp.
``` bash
echo "Hallo Freund" | \
age -r age1tjup7hvt35ldu3n98kzfl8ckl6dm43s4wnr02vrx7vvw27njhv4qfgdwym -a -o - | \
curl -F file=@- -F "from=Kay" -F "subject=encrypted message" http://localhost:25478/inbox
```
## Install
```bash
git clone https://github.com/kernelschmelze/inbox.git
cd inbox
go build
```
## Usage
``` bash
./inbox -f inbox.toml
```
## Config
`inbox.toml`
``` toml
# 25478
# :25478
# http://127.0.0.1:25478
# https://127.0.0.1:25478
# default :25478
listen = ":25478"
# tls crt and key file
# default empty
crt = "srv.crt"
key = "srv.key"
# simple json store
# default path ./data
# default days 0, no housekeeping
[jsonstore]
path = "./data"
days = 30
# pushover config
[pushover]
app = "API Token"
user = "Your User Key"
```
## Uberspace setup
If you use [uberspace](https://uberspace.de/) as hoster, then [here](uberspace.md) is the setup.