# Shared services Want to share photos without paying for cloud storage? Tired of creating throwaway accounts for free trials? Miss the days when publishing a personal website was easy? With shared services, you can do all of this directly over Jami's peer-to-peer network. Shared services are accessed directly over Jami's peer-to-peer network. No hosting provider, cloud storage account, or public IP configuration is required. ```{seealso} More information on the shared services feature can be found in [this blog post](https://jami.net/shared-services/)! ``` ## What is a shared service? A shared service lets you securely share applications running on your computer—such as websites, photo galleries, game servers, file directories, or other TCP-based services—to other Jami users. For website and directory sharing, Jami includes an embedded web server, so no separate web server software is required. ## Accessing your contacts' services ```{note} The ![Planet icon](../_static/planet_24dp.svg) button appears whenever the selected contact has one or more shared services available. Shared services are available only while the person sharing them is *online*. ``` To access a contact's shared services: 1. Select one of your contacts. 2. Select the ![Planet icon](../_static/planet_24dp.svg) button next to the **Call** button. 3. A list of your contact's shared services will appear. Select the service you want to access. ```{note} Why don't I see the ![Planet icon](../_static/planet_24dp.svg) button? Your contact is probably not sharing any services with you. ``` ### Desktop If the shared service is web-based, Jami opens it in your default web browser. For other services, a link to the service is copied to your clipboard. ```{image} images/desktop-showcase.svg :alt: Quickly access photos. ``` ### Android If the shared service is web-based, Jami opens it in your default web browser. For other services, a link to the service is copied to your clipboard. ```{image} images/android-showcase.svg :alt: Viewing a shared service on Android. ``` ### iOS Jami opens the shared service in an integrated web browser within Jami. ```{note} The ![Planet icon](../_static/planet_24dp.svg) button differs slightly from the one used on the desktop and Android versions. ``` ```{important} Custom (non-web) shared services are not supported on iOS and iPadOS due to operating system restrictions. ``` ```{image} images/ios-showcase.svg :alt: Viewing a shared service on iOS. ``` ## Creating a shared service ```{note} Creating shared services is currently supported only on desktop. ``` To create a shared service, open **Settings** → **Account** → **Shared Services**. ### Directory sharing The ![Custom services icon](../_static/language_24dp.svg) **Add Website** option can also be used to share a directory of files. If the selected directory does not contain an `index.html` file, Jami automatically presents a directory listing. On the **Shared Services** page, select ![Custom services icon](../_static/language_24dp.svg) **Add Website**. ```{raw} html
``` ```{image} images/creating-a-shared-service.mp4 :alt: Creating a shared service. ``` ```{raw} html
``` ### Website sharing ```{note} Only proceed with the following if you feel comfortable with basic HTML and CSS. ``` On the **Shared Services** page, select ![Custom services icon](../_static/language_24dp.svg) **Add Website**, then select the directory you want to share. The directory must contain an `index.html` file in its root directory. You can also include additional HTML, CSS, JavaScript, images, and other assets required by your website. ```{note} If the shared directory contains an `index.html` file, Jami serves it as the website's home page. Other files remain accessible through links within the site. ``` Your contacts will be able to access your website as described above. The following is an example of a customized website. ```{image} images/custom-website.png :alt: Sharing a website. ``` ### Limiting visibility You can control who can discover and access each shared service. Jami allows you to choose from the following visibility options when sharing a service. * **Contacts**: The default visibility. Any approved contact can access the service. * **Anyone (public)**: Any Jami user can discover and access the service, even if they are not one of your contacts. * **Specific contacts only**: Only the contacts you select from your contact list can see the service. You can configure the visibility of a shared service in the configuration dialog as shown below. Set the **Accessible** option to one of the visibility options above. If you select **Specific contacts only**, you will then need to add or remove contacts using the chips in the dialog. ```{raw} html
``` ```{image} images/limiting-visibility.mp4 :alt: Limiting visibility. ``` ```{raw} html
``` ## Custom service sharing Jami allows you to share any TCP service with your contacts, not just websites. On the **Shared Services** page, select ![Custom services icon](../_static/build_circle_24dp.svg) **Custom service** and configure it as needed. ### Examples ```{toctree} :maxdepth: 1 :hidden: code etherpad minecraft ``` ```{list-table} :header-rows: 0 * - [![«Image: CODE logo»](images/code-logo.png "CODE logo") CODE](code.md) - [![«Image: Etherpad logo»](images/etherpad-logo.png "Etherpad logo") Etherpad](etherpad.md) - [![«Image: Minecraft logo»](images/minecraft-logo.png "Minecraft logo") Minecraft](minecraft.md) ``` ## Limitations - Shared services are only available while the host is online. - Creating shared services currently requires the desktop application. - iOS and iPadOS support only web-based shared services. - Only TCP services are supported; UDP services are not currently supported. - Performance depends on the host's internet connection and available bandwidth. ## Advantages - No domain name registration required. - No cloud storage fees. - Does not require Internet connectivity when peers can reach each other over the same network.