{{template "header" .}}
Never seen this service before? Want to know how to use it? This page will help you learn more about your tailnet's pastebin tool.
You can pipe commands or paste files to the pastebin using the command infinipaste
. You can install it by installing the Go compiler toolkit and then running this command:
go get github.com/tailscale/paste/cmd/infinipaste@main
Once it is installed, invoke it with the command infinipaste
:
infinipaste ./foo.txt
and the program will print a URL that you can share with your team. You can also pipe the output from any command to it:
go test &2<1 | infinipaste -n go-test.txt
The pastebin service has an API call at /api/post
that you can use to submit new pastes from command-line tools or your text editor. You use it by constructing either a basic HTML form post or a multipart form with these fields (both are required):
Name | Description |
---|---|
filename |
The name of the file you want to paste. The file extension of the name will determine the syntax highlighting for that paste. |
content |
The literal content of the paste. This can be a function, a bit of prose, or an entire buffer of text. |
The Accept
header will determine what kind of response you get. By default, this service will return a redirect to the paste upon pastes being successfully created. If you do not want this behavior (such as if you are implementing support for your favorite text editor or testing with curl
), set the Accept
header to the value text/plain
. This will make the server return the paste URL as normal text.
Here is an example curl command you can use to paste data to the service:
curl http://paste/api/post -F filename=filename.txt -F content="test paste from curl" -H "Accept: text/plain"
The default distribution of infinipaste ships with a package for GNU Emacs. This package will let you submit pastes from your editor. It requires the request
package and exposes two interactive functions:
M-x infinipaste-submit-region
- submits the currently highlighted region to infinipasteM-x infinipaste-submit-buffer
- submits the contents of the current buffer to infinipasteYou can download this package from the infinipaste repository. You can install it by using M-x package-install-file
or by opening it in Emacs and running M-x package-install-from-buffer
. Please be sure that request
is installed.