GNUNET-PUBLISH(1)

🌸 GNUNET-PUBLISH β€” bestie edition πŸ’…

okay so real talk, this is the gnunet-publish manual page, and it's literally a command line interface for publishing new content into GNUnet. gen commands manual energy, but make it cute. let's GO πŸ¦‹


✨ NAME ✨

gnunet-publish β€” a command line interface for publishing new content into GNUnet πŸŽ€


✨ SYNOPSIS ✨

gnunet-publish [-a LEVEL | --anonymity=LEVEL]
               [-c FILENAME | --config=FILENAME]
               [-D | --disable-extractor] [-E | --enable-creation-time]
               [-e | --extract] [-h | --help]
               [-k KEYWORD | --key=KEYWORD]
               [-L LOGLEVEL | --loglevel=LOGLEVEL]
               [-m TYPE:VALUE | --meta=TYPE:VALUE] [-n | --noindex]
               [-N ID | --next=ID] [-p PRIORITY | --prio=PRIORITY]
               [-P NAME | --pseudonym=NAME]
               [-r LEVEL | --replication=LEVEL] [-s | --simulate-only]
               [-t ID | --this=ID] [-u URI | --uri=URI] [-v | --version]
               [-V | --verbose] ⟨FILENAME⟩

✨ DESCRIPTION ✨

so bestie, here's the tea πŸ“: if you wanna share files with other GNUnet users, those files have to be made available to GNUnet first. GNUnet does NOT just auto-share every file in some random directory β€” like, that's simply not the vibe. (tho you can get that behaviour with gnunet-auto-share(1), iykyk πŸ‘€). and get this: even files you downloaded are not automatically shared. shocking. scandalous. πŸ’€

to actually start sharing files, you gotta add them, either with gnunet-publish or via a graphical interface like gnunet-fs-gtk(1). the command line tool gnunet-publish is the one you want when there's a lot of files to add β€” she's built different. gnunet-publish can automatically publish batches of files, recursively publish directories, create directories you can browse inside GNUnet, and publish file lists in a namespace. and when you run it on a directory, it will always recursively publish all of the files in that directory. no half measures, periodt. πŸ‘‘

gnunet-publish can also automatically extract keywords from the files being shared. users who wanna download stuff from GNUnet use keywords to search for the right content. you can turn keyword extraction off with the -D option, and you can manually add keywords with the -k option. heads up: the keywords are case-sensitive. yes, fr fr, capitalization matters. πŸ™ˆ

besides searching by keyword, GNUnet lets you organize files into directories. with directories, the user only needs to find the directory and boom, they can download any of the files listed inside it. directories can also contain pointers to other directories β€” directories within directories, it's giving inception πŸŒ€

with gnunet-publish, creating new directories while adding files at the same time is easy. simply pass the name of a directory instead of a file. that's it. slay. ✨

now, since keywords can be spammed (literally any user can add any content under any keyword 😭), GNUnet supports namespaces. a namespace is a subset of the searchspace into which only the holder of a certain pseudonym can add content. any GNUnet user can create any number of pseudonyms using gnunet-pseudonym(1). pseudonyms are stored in the user's GNUnet directory. and here's the clever bit: while pseudonyms are locally identified with an arbitrary string that the user picks when creating the pseudonym, the namespace is globally known only under the hash of the public key of the pseudonym. since only the owner of the pseudonym can add content to the namespace, it's impossible for other users to pollute it. no gate-crashers allowed πŸš«πŸŽ‰. and gnunet-publish automatically publishes the top-directory (or the only file, if you only specified one file) into the namespace if a pseudonym is specified. queen behaviour πŸ’…

you can also update content in GNUnet β€” but only if that content was placed and obtained from a particular namespace. updates are only possible for content in namespaces, since that's the only way to assure a malicious party can't supply counterfeited updates. important note: an update with GNUnet does not make the old content unavailable β€” GNUnet merely lets the publisher point users to more recent versions. use the -N option to specify the future identifier of an update. when you use that option, a GNUnet client that finds the current (-t) identifier will automatically begin a search for the update (-N) identifier. and if you later publish an update under the (-N) identifier, both results will be given to the user. two for one, we love to see it 🫢

for meta-data you've got options: automatic meta-data extraction (based on libextractor) or the command-line option -m to specify meta-data yourself. for the -m option you need the form keyword-type:value. for example, use -m os:Linux to say the operating system is Linux. common meta-data types are author, title, mimetype, filename, language, subject and keywords. a full list can be obtained from the extract tool using the option --list. the meta-data helps users search for files on the network. and yes, the keywords are case-sensitive. again. i told you. πŸ”₯

GNUnet supports two styles of publishing files on the network, and this part is important so lock in πŸ”’:

  • Publishing a file means a copy of the file is made in the local (!) database of the node.
  • Indexing a file means an index is added to the local (!) database with symbolic links to the file itself. the links use the SHA-512 hash of the entire file as the filename.

indexing is generally significantly more efficient and it's the default choice. however, indexing only works if the indexed file can be read (using the same absolute path) by gnunet-service-fs. if that's not the case, indexing will fail β€” and gnunet-publish will automatically revert to publishing instead. no drama, it just switches. πŸ”„

regardless of which method is used to publish the file, the file will be slowly dispersed into the network (how slowly depends on how often it's requested and how much bandwidth is available). and ⚠️ if you publish or index a file and then leave the network, it will almost always NOT be available anymore. like, gone. unavailable. crying about it won't help 😭

the options are as follows:


✨ OPTIONS ✨

  • -a LEVEL, --anonymity=LEVEL β€” use this to specify extra anonymity constraints. the default is 1. if you set it to 0, GNUnet publishes the file non-anonymously and β€” get this β€” actually signs the advertisement for the file using your peer's private key πŸ”‘. that lets other users download the file as fast as possible, including via non-anonymous methods (discovery via DHT and CADET transfer). if you set it to 1 (the default), you use the standard anonymous routing algorithm, which does not explicitly leak your identity. but β€” a powerful adversary may still be able to perform traffic analysis (statistics) to over time discover your identity πŸ‘€. you can gain better privacy by specifying a higher level of anonymity (values above 1). this tells FS that it must hide your own requests in equivalent-looking cover traffic, which should confound an adversary's traffic analysis and increase the time and effort it'd take to discover your identity. downside bestie: it can also significantly reduce performance, because your requests get delayed until sufficient cover traffic is available 🐌. the specific numeric value (for anonymity levels above 1) is simple: given an anonymity level L (above 1), each request FS makes on your behalf must be hidden in L-1 equivalent requests of cover traffic (traffic your peer routes for others) in the same time-period. that time-period is twice the average delay by which GNUnet artificially delays traffic. and note: regardless of the anonymity level you choose, peers that cache content in the network always use anonymity level 1. always. πŸ’…
  • -c FILENAME, --config=FILENAME β€” use an alternate config file FILENAME. if this option isn't specified, the default is ~/.config/gnunet.conf. πŸ—‚οΈ
  • -D, --disable-extractor β€” disable use of GNU libextractor for finding additional keywords and metadata. bye bye auto-extraction πŸ‘‹
  • -E, --enable-creation-time β€” enable use of the creation time timestamp in metadata. ⚠️ setting this info will leak information about the time at which a file was made available. so like, be aware.
  • -e, --extract β€” print the list of keywords that will be used for each file given the current options. does not perform any indexing or publishing. just a lil preview, a peek, a vibe check πŸ”
  • -h, --help β€” print the help page. the classic πŸŽ€
  • -k KEYWORD, --key=KEYWORD β€” an additional key to index the content with. to add multiple keys, specify it multiple times. each additional key is case-sensitive. can be specified multiple times. the keyword is only applied to the top-level file or directory. 🏷️
  • -L LOGLEVEL, --loglevel=LOGLEVEL β€” change the loglevel. possible values for LOGLEVEL are ERROR, WARNING, INFO and DEBUG. pick your fighter πŸ“Š
  • -m TYPE:VALUE, --meta=TYPE:VALUE β€” for the main file (or directory), set the metadata of the given TYPE to the given VALUE. note that this will not add the respective VALUE to the set of keywords under which the file can be found. so don't be surprised, bestie πŸ™ˆ
  • -n, --noindex β€” executive summary: you probably don't need it. do not index, full publishing. note that directories, information for keyword search, namespace search and indexing data are always published (even without this option). with this option, every block of the actual files is stored in encrypted form in the block database of the local peer. while this adds security if the local node is compromised (the adversary snags your machine 😱), it is significantly less efficient compared to on-demand encryption and is definitely not recommended for large files.
  • -N ID, --next=ID β€” specifies the next identifier of a future version of the file to be published under the same pseudonym. this option is only valid together with the -P option. you can use it to specify what the identifier of an updated version will look like. note that specifying -i and -N without -t is not allowed. ⚠️
  • -p PRIORITY, --prio=PRIORITY β€” executive summary: you probably don't need it. set the priority of the published content (default: 365). if the local database is full, GNUnet will discard the content with the lowest ranking. note that ranks change over time depending on popularity. the default should be high enough to preserve the locally published content in favor of content that migrates from other peers. πŸ‘‘
  • -P NAME, --pseudonym=NAME β€” for the top-level directory or file, places the file into the namespace identified by the pseudonym NAME. NAME must be a valid pseudonym managed by gnunet-identity(1). πŸͺͺ

...and that's where part 1 ends, bestie β€” part 2 is coming right up, don't go anywhere πŸ’–

  • -r LEVEL, --replication=LEVEL β€” highkey sets the desired replication level, bestie. If CONTENT_PUSHING is set to YES, GNUnet will push each block (for the file) LEVEL times to other peers before doing normal "random" replication of all content. This option can be used to push some content out into the network harder. Note: pushing content LEVEL times into the network does not guarantee that there will actually be LEVEL replicas. πŸ’€
  • -s, --simulate-only β€” when this option is used, gnunet-publish will not actually publish the file but just simulate what would be done. This can be used to compute the GNUnet URI for a file without actually sharing it. it's giving lowkey dry run energy fr fr ✨
  • -t ID, --this=ID β€” specifies the identifier under which the file is to be published under a pseudonym. This option is only valid together with the -P option. so don't try it solo, bestie 🫢
  • -u URI, --uri=URI β€” this option can be used to specify the URI of a file instead of a filename (this is the only case where the otherwise mandatory filename argument must be omitted). Instead of publishing a file or directory and using the corresponding URI, gnunet-publish will use this URI and perform the selected namespace or keyword operations. This can be used to add additional keywords to a file that has already been shared or to add files to a namespace for which the URI is known but the content is not locally available. main character URI energy πŸ”₯
  • -v, --version β€” print the version number. simple, iconic, periodt πŸ’…
  • -V, --verbose β€” be verbose. Using this option causes gnunet-publish to print progress information and at the end the file identification that can be used to download the file from GNUnet. so you literally get the receipts, iykyk πŸ‘‘

✨ EXAMPLES ✨

🌸 BASIC EXAMPLES 🌸

okay so first up, the basics β€” I'm obsessed, these are literally the vibes, no cap ✨

Index a file COPYING:

gnunet-publish COPYING

Publish a file COPYING:

gnunet-publish -n COPYING

Index a file COPYING with the keywords gpl and test:

gnunet-publish -k gpl -k test COPYING

Index a file COPYING with description GNU License, mime-type text/plain and keywords gpl and test:

gnunet-publish -m description:GNU License -k gpl -k test -m mimetype:text/plain COPYING

🌈 USING DIRECTORIES 🌈

now we're getting into directory territory, bestie β€” vibe check: passed, it's giving organized queen energy πŸ‘‘

Index the files COPYING and AUTHORS with keyword test and build a directory containing the two files. Make the directory itself available under keyword gnu and disable keyword extraction using libextractor:

mkdir gnu; mv COPYING AUTHORS gnu/; gnunet-publish -k test -k gnu -D gnu/

Neatly publish an image gallery in kittendir/ and its subdirs with keyword kittens for the directory but no keywords for the individual files or subdirs (-n). Force description for all files.

gnunet-publish -n -m description:Kitten collection -k kittens kittendir/

πŸ’– SECURE PUBLISHING WITH NAMESPACES πŸ’–

secure publishing ate and left no crumbs, fr fr β€” let's get into it πŸ”₯

Publish file COPYING with pseudonym RIAA-2 (-P) and with identifier gpl (-t) and no updates.

gnunet-publish -P RIAA-2 -t gpl COPYING

Recursively index /home/ogg and build a matching directory structure. Publish the top-level directory into the namespace under the pseudonym RIAA-2 (-P) under identifier 'MUSIC' (-t) and promise to provide an update with identifier 'VIDEOS' (-N):

gnunet-publish -P RIAA-2 -t MUSIC -N VIDEOS /home/ogg

Recursively publish (-n) /var/lib/mysql and build a matching directory structure, but disable the use of libextractor to extract keywords (-n). Print the file identifiers (-V) that can be used to retrieve the files. This will store a copy of the MySQL database in GNUnet but without adding any keywords to search for it. Thus only people that have been told the secret file identifiers printed with the -V option can retrieve the (secret?) files:

gnunet-publish -nV /var/lib/mysql

Create a namespace entry 'root' in namespace MPAA-1 and announce that the next update will be called 'next':

gnunet-publish -P MPAA-1 -t root -N next noise.mp3

Update the previous entry, do not allow any future updates:

gnunet-publish -P MPAA-1 -t next noise_updated.mp3

πŸ“ FILES πŸ“

  • ~/.config/gnunet.conf β€” GNUnet configuration file. ngl, keep it cute, keep it configured πŸ’…

πŸ‘€ SEE ALSO πŸ‘€

The full documentation for gnunet is maintained as a Texinfo manual. If the info(1) and gnunet programs are properly installed at your site, the command

info gnunet

should give you access to the complete handbook,

info gnunet-c-tutorial

will give you access to a tutorial for developers.

Depending on your installation, this information is also available in gnunet(7) and gnunet-c-tutorial(7).

πŸ› BUGS πŸ›

Report bugs by using https://bugs.gnunet.org or by sending electronic mail to ⟨gnunet-developers@gnu.org⟩. they wanna hear from you, bestie, no cap 🫢


πŸ’– That's the whole vibe! This page came from Debian, dated November 16, 2015, for GNUNET-PUBLISH(1). Stay slay, bestie! πŸ’–