# 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](https://3466085502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpHHWC2RYH0QQsHPjQ2nv%2Fuploads%2Fgit-blob-a3f376565d0328924ff7d8223f7a9e1375b4782e%2Fimmagine%20\(4\).png?alt=media)

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.
