terminal pastebin & url shortener — hosted in canada

usage

examples

Send some text and read it back:

echo I Love Timbits | nc 1yr.ca 443https://1yr.ca/x7kqcurl https://1yr.ca/x7kqI Love Timbits

Send file contents:

cat ~/.ssh/id_ed25519.pub | nc 1yr.ca 443

Send recent logs from an app or container:

docker logs --until 30s 4af7 | nc 1yr.ca 443

requirements

There is only one requirement to use this service: netcat. To check if you already have it installed, type in terminal nc or ncat or netcat.

Netcat is available on most platforms, including Windows, macOS and Linux.

alias

To simplify usage, you can add an alias to your shell configuration.

echo 'alias pb="nc 1yr.ca 443"' >> ~/.zshrc
echo 'alias pb="nc 1yr.ca 443"' >> ~/.bashrc
alias --save pb="nc 1yr.ca 443"

request delete

For the first 10 minutes after creating a paste, you can delete it from the same IP address by sending a DELETE request:

curl -X DELETE "https://1yr.ca/x7kq"

If you need a paste removed after that time, please send a request to the email address listed below.

about

1 Year RetentionYour pastes are stored for up to 365 days*. No more disappearing links.
Open Source1yr.ca uses fiche-n-chips. Inspect the code, even host your own version.
Hosted in CanadaData sovereignty matters. All data stored on Canadian servers.
Terminal NativeNo browser required. Pipe, paste, share. All from your shell.
Text OnlyPlain text content only. No images, binaries, or zip files.
User DeletionMade a mistake? Delete your links within 10 minutes of creation.

*Older links may be purged if the service reaches its allocated cache size.

usage

Create or delete a shortened URL directly from your browser:

preview: https://1yr.ca/????

api

Create a shortened URL with a POST request:

curl -X POST "https://1yr.ca/api/shorten" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/long/url"}'
Successfully created a short url for the requested target, cheers!
You may use the url below:
https://1yr.ca/m3np

Optionally specify a custom slug:

curl -X POST "https://1yr.ca/api/shorten" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "slug": "mylink"}'
Successfully created a short url for the requested target, cheers!
You may use the url below:
https://1yr.ca/mylink

delete

For the first 10 minutes after creating a link, you can delete it from the same IP address:

curl -X DELETE "https://1yr.ca/m3np"Successfully deleted `m3np`, cheers!

about

1 Year RetentionYour links are stored for up to 365 days*. No more disappearing redirects.
Open Source1yr.ca uses fiche-n-chips. Inspect the code, even host your own version.
Hosted in CanadaData sovereignty matters. All data stored on Canadian servers.
Simple APICreate and delete links with a single HTTP request.
User DeletionMade a mistake? Delete your links within 10 minutes of creation.

*Older links may be purged if the service reaches its allocated cache size.

usage

Subscribe to a paste or short url at alerts.1yr.ca to be told before it is deleted.

subscribing

Alerts are delivered through ntfy, a beautifully simple notification server.

  • Install ntfy
  • Add alerts.1yr.ca as the server
  • Subscribe to the slug you want to follow

examples

Your paste:

https://1yr.ca/x7kq

Its alerts:

https://alerts.1yr.ca/x7kq

Four warnings go out before expiry — at one month, one week, one day, and one hour — and one more if the slug is deleted early:

alerts.1yr.ca · x7kq
Paste expiring in 1 week
`x7kq` will be deleted in 1 week.
If its content is important, make a backup before it's too late by visiting
https://1yr.ca/x7kq

*Alerts are best-effort: a reminder may be skipped if the server is offline when it comes due.

contact

acceptable use policy