# Sharing a Folder

Sharing a folder is possible. Pupcloud will launch a separate server, on another port, to allow to remap it on a reverse proxy.

In order to set up a share, one or more *profiles* must be specified. Each profile is in the form *name*:*secret*, where the secret must not be shared with the recipient, and it's used to protect the confidentiality of the share.

### CLI parameters

Relevant CLI parameters are:

* `--share-profile`: a share profile, in the form *name*:*secret* (e.g. `Family:abc0123`). Can be repeated for more profiles.
* `--share-profiles`: the same, but multiple values are comma-separated.
* `--share-port`: the port for the share server; by default `17179`;
* `--share-prefix`: useful when using a reverse proxy, it's the base URL of the share link. By default, `http://localhost:17179`.

{% hint style="info" %}
If you need to specify more than one profile, you can:

* repeat the parameter `--share-profile`;
* use `--share-profiles` with comma-separated values.

Note that if a key or a value must contain a comma, you are restricted to the first possibility.
{% endhint %}

Sharing is enabled if at least one profile is defined.

### Web UI

In the Web interface, the sharing URL can be obtained using the "share" button for the current folder. A dialog will open:

![The sharing dialog](/files/93fdUvltXl7iVaE0Xhmp)

From here you can set:

1. A password (optional);
2. The profile;
3. If the share must be read-only;
4. An expiry date (optional).

Pressing then the button at 5, a link will be generated and shown below. You can then copy-paste and share it.

{% hint style="info" %}
If the main app is launched as read-only, all its share links will be read-only. The switch is still enabled, because if in the future the app will be re-launched as read/write, the link will be read/write.
{% endhint %}

### Revoking a share

The share can be "revoked" by relaunching pupcloud without a particular profile, or changing the secret of a profile. All the links tied to that profile will be invalidated.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://germ.gitbook.io/pupcloud/guides/sharing-a-folder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
