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-512hash 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 is1. if you set it to0, 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 to1(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 above1). 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 above1) is simple: given an anonymity level L (above1), each request FS makes on your behalf must be hidden inL-1equivalent 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 level1. 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 areERROR,WARNING,INFOandDEBUG. 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-Poption. you can use it to specify what the identifier of an updated version will look like. note that specifying-iand-Nwithout-tis 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 bygnunet-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. IfCONTENT_PUSHINGis set toYES, GNUnet will push each block (for the file)LEVELtimes 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 contentLEVELtimes into the network does not guarantee that there will actually beLEVELreplicas. π-s,--simulate-onlyβ when this option is used,gnunet-publishwill 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-Poption. 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-publishwill 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 causesgnunet-publishto 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 π
extract(1)gnunet-auto-share(1)gnunet-download(1)gnunet-fs-gtk(1)gnunet-identity(1)gnunet-search(1)gnunet.conf(5)
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! π
π¦ where this page comes from
- alpine 3.24: gnunet-doc 0.27.0-r0 Β· AGPL-3.0-only
- debian bookworm: gnunet 0.19.3-2 Β· AGPL-3.0-or-later
- debian trixie: gnunet 0.20.0-7 Β· AGPL-3.0-or-later
- nixos 26.05: gnunet 0.26.2
- nixpkgs unstable: gnunet 0.26.2
- opensuse-leap 16.0: gnunet 0.23.1-bp160.1.18 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: gnunet 0.23.1-bp160.1.18 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: gnunet 0.23.1-bp160.1.18 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: gnunet 0.23.1-bp160.1.18 Β· AGPL-3.0-or-later
- ubuntu jammy: gnunet 0.15.3-4 Β· AGPL-3.0-or-later
- ubuntu noble: gnunet 0.20.0-4.1build3 Β· AGPL-3.0-or-later
- ubuntu questing: gnunet 0.20.0-7
- ubuntu resolute: gnunet 0.20.0-8 Β· AGPL-3.0-or-later
- ubuntu stonking: gnunet 0.20.0-9 Β· AGPL-3.0-or-later
- π the page's license: GPL3.0-or-later OR FDL1.3-or-later
- Copyright (C) 2001-2019 GNUnet e.V
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms