gone is an ephemeral content server written in Go.
The primary goal is to share files and text using an HTML interface and API.
gone requires Go to develop.
Makefile provides functionality to build, run and test the application.
make build
Binaries are built to the release directory.
make run
make debug
Install as a service on systemd Linux:
make install
Output is in JSON format and can be parsed with jq:
gone | jq '.message'
Default settings are embedded into the application. To configure, pass a modified settings file using -config or -settings:
gone -config mySettings.json
Set an empty handler path to disable it; for example, to turn off text features:
"paths": {
"message": "",
"wall": ""
A basic HTML user interface is available at the root path (/ by default) - 127.0.0.1:8080 when running locally.
Features are also available using command-line programs such as curl:
Get server status:
curl 127.0.0.1:8080/status
Get user request information:
curl 127.0.0.1:8080/user
Upload file:
curl 127.0.0.1:8080/upload -F "file=@example.txt"
Upload multiple files:
curl 127.0.0.1:8080/upload -F "file=@example1.txt" -F "file=@example2.txt"
Upload file with 5 downloads allowed:
curl 127.0.0.1:8080/upload -F "downloads=5" -F "file=@example.txt"
Upload file with 5 minute expiration:
curl 127.0.0.1:8080/upload -F "duration=5m" -F "file=@example.txt"
List uploaded files:
curl 127.0.0.1:8080/list
Download a file (default settings require token-based authentication):
curl 127.0.0.1:8080/download/example.txt -H "X-Auth: mySecret"
Get static (never expires) content:
curl 127.0.0.1:8080/static
Post a plain-text message (use single quotes to wrap special characters):
curl 127.0.0.1:8080/msg -d 'message=hello, world!'
Get message text only:
curl 127.0.0.1:8080/msg | jq '.[].data'
Post multi-line text for shared edit:
curl 127.0.0.1:8080/wall -F "wall=$(cat /etc/resolv.conf)"
Get shared multi-line text:
curl 127.0.0.1:8080/wall | jq -r
Get random values of certain type:
curl 127.0.0.1:8080/random/
curl 127.0.0.1:8080/random/coin
curl 127.0.0.1:8080/random/hex
curl 127.0.0.1:8080/random/id
curl 127.0.0.1:8080/random/mask
curl 127.0.0.1:8080/random/name
curl 127.0.0.1:8080/random/nato
curl 127.0.0.1:8080/random/number
curl 127.0.0.1:8080/random/pass
See config/zshrc for alias and function examples, such as:
$ gonePut test.txt 3 30m
[
{
"id": "1J81kxgMK0JEJa5VpMb7AJJvwutwaq7bhV26xtEaFL4w",
"name": "test.txt",
"sum": "4dca0fd5f424a31b03ab807cbae77eb32bf2d089eed1cee154b3afed458de0dc",
"downloads": {
"allow": 3
},
"size": "14 bytes",
"type": "text/plain; charset=utf-8",
"owner": {
"address": "127.0.0.1:12345",
"mask": "Bob123",
"agent": "curl/8.7.1"
},
"time": {
"allow": "30m0s",
"upload": "2026-05-20T12:00:00.00000-00:00"
}
}
]
Application documentation is available with godoc:
make doc
Tests and lint are validated with a workflow on changes, or manually:
make lint
make test
make test-verbose
make test-race
Test coverage is also available - to generate an HTML report as testCoverage.html:
make cover
The application can run in a container using Dockerfile
On macOS, using apple/container:
make build-container
make run-container
Get the server IP address:
container ls | grep gone | grep --color --text -Eo "([0-9]{1,3}\.){3}[0-9]{1,3}"
curl 192.168.64.3:8080