summaryrefslogtreecommitdiffstats
path: root/net/tesseras-paste/pkg/README
blob: ff86ffdb4c3a2c5b6c09785482851f37bccd2b65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
+-----------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-----------------------------------------------------------------------

Daemon Setup
============

Enable and start the tpd(1) daemon:

    # rcctl enable tpd
    # rcctl start tpd

To connect to a bootstrap peer:

    # rcctl set tpd flags "-b host:port"
    # rcctl restart tpd

Multiple bootstrap peers can be specified:

    # rcctl set tpd flags "-b host1:port -b host2:port"

To enable the HTTP interface on port 8080:

    # rcctl set tpd flags "-b host:port -w 8080"

To run as a public server on a fixed UDP port:

    # rcctl set tpd flags "-g -p 6881 -b host:port"

Data Directory
==============

Paste data and the node identity key are stored in
${LOCALSTATEDIR}/tesseras-paste/, owned by the _tpd user.

Socket Permissions
==================

The tp(1) client communicates with tpd(1) via a Unix domain socket at
${LOCALSTATEDIR}/tesseras-paste/daemon.sock. To allow a regular user to
use tp(1), add them to the _tpd group:

    # usermod -G _tpd <username>

The user must log out and back in for the group change to take effect.

Client Usage
============

Store a paste (default TTL 24h):

    $ echo "hello world" | tp put

Retrieve a paste:

    $ tp get <key>

See tp(1) and tpd(1) for full documentation.