Project Sharing is a feature of RStudio Server Pro that allows you to share your projects with other users on the server.
Note: Versions prior to 1.4 do not support both Project Sharing and Job Launcher at the same time, e.g. containerized sessions or Jupyter features. Starting in RStudio Server Pro version 1.4.1103, Project Sharing now works on Launcher sessions.
When you share a project, RStudio Server securely grants other users access to the project, and when multiple users are active in the project at once, you can see each others' activity and work together in a shared editor.
Note that in order to share Projects, your system must meet the Prerequisites described here.
Sharing a Project
You can't share individual files, so create a project to host the content you wish to share if you haven't already. Once you've got a project, go to the Project menu in the upper right and click Share Project.
If you don't see this entry in the menu, check with your administrator (shared projects may require some server configuration, and can be disabled).
Sharing your project will open the Sharing section in Project Options:
Add users one at a time by typing their system usernames next to Add, then clicking the Add button. Click OK when you're done.
If you're not sure what someone's username is, try their e-mail address (if your server uses Google authentication), or ask them what username they use to log into RStudio Server. Your own username is located in the upper right corner of the screen.
When you share a project, RStudio Server gives all the users in the project the same access you have. That means that files that are read-only for you will also be read-only for users you share with. It also means that files in the project that were formerly readable only by you (a common configuration for sensitive files such as private keys) will now be readable by the users you choose to add, so make sure you trust the users you're sharing with.
Sharing a project doesn't move the project on the file system, or change the ownership of any of the files. You can be confident that sharing your project won't expose it to anyone other than the users you've chosen.
Opening a Shared Project
Because the shared project probably exists in your home directory, the users you share with cannot browse to the project file using the file picker. For this reason, there are several alternative means for opening projects that have been shared with you.
1. Via URL
If you've just shared a project with someone, you can send them the project URL (copied from the dialog above, or just from your own browser's URL bar). When they open this URL in a browser, RStudio Server will automatically start a new session for them in your project.
2. From the Projects menu
Once a project has been shared with you, the Projects menu will gain a new section that lists the projects recently shared with you. Your collaborators will see a new entry in this list as soon as you share the project with them.
3. Via the Open Project dialog
If you want to choose among all the projects that have been shared with you, click File -> Open Project, then click the Shared with Me tab at the top.
In addition to making it easy to securely give other users access to your project, RStudio Server includes several features designed to make it easier to coordinate efforts when you're both active in the project at once.
When another user is working in your project, you'll see a small icon in the upper right corner of the screen that represents them. You can hover or click this icon to see what file the user is editing, if any.
You can click the filename to open the same file yourself.
Note that you may see an icon for a user even if they've closed their browser or are no longer active, because RStudio Server keeps inactive sessions alive for a configurable period of time (by default, 2 hours).
If you and another user have the same file open, RStudio will show you the other user's typing and selection in real time as they make changes to the file. The user's cursor and selection color will match the color of their icon (described above). For instance, if the above user made a selection, you might see this:
Note that when you're sharing an edit session with another user:
- Either user may save the file (you may notice that the "modified" star disappears when the other user saves the file); changes made by both users are saved
- Undo and redo will generally act on your own changes, not those made by other users
Collaborative editing is a great way to brainstorm with other users, review code together, and learn from each other.
If you run into any issues with Project Sharing, we encourage you to check out our Troubleshooting article.