# Edit individual files on remote hosts

Once you have [set up synchronization](configuring-synchronization-with-a-remote-host.html) with a remote host, you can open individual files directly from the remote host and edit them in CLion, without adding/downloading them to a local project.

Debugging, refactorings, and some other CLion features are not supported for such files. To take advantage of advanced CLion functionality, consider including the files in a project. For more information, refer to [Access files on servers](accessing-files-on-remote-hosts.html).

Procedure: Edit a file on a remote host

1. If you have set a [default remote host](configuring-synchronization-with-a-remote-host.html#default_server), select Deployment | Edit Remote File from the context menu in the [Project tool window](project-tool-window.html),  Commit tool window (`Alt+0` (Windows), `⌘ 0` (macOS), `⌘ 0` (IntelliJ IDEA Classic (macOS)), `⌘ 0` (macOS System Shortcuts), `Alt+0` (XWin), `Alt+0` (GNOME), `Alt+0` (KDE), `Alt+0` (Emacs), `Alt+0` (Sublime Text), `⌘ 0` (Sublime Text (macOS)), `⌘ 0` (Xcode), `Alt+0` (Visual Studio), `Alt+0` (Visual Studio (macOS)), `Alt+0` (ReSharper), `Alt+0` (ReSharper (macOS)), `Alt+0` (QtCreator), `⌘ 0` (QtCreator (macOS)), `Alt+0` (NetBeans), `Alt+0` (Eclipse), `⌘ 0` (Eclipse (macOS)) ) , or the code editor.

Otherwise, do the following:

1.   Open the [Remote Host tool window](remote-host-tool-window.html) by choosing `Tools | Deployment | Browse Remote Host`  from the main menu.

2.   Select the required deployment server from the list. The tool window shows a tree view of files and folders under the server root. If no relevant server is available in the list, click ![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.2/app.general.ellipsis.svg), and in the Deployment dialog that opens [configure access to the required server](configuring-synchronization-with-a-remote-host.html).

3.

Double-click the desired file or select Edit Remote File from the context menu.

![Edit file on remote host](https://resources.jetbrains.com/help/img/idea/2026.2/cl_remote_window.png)

2. The file opens in the CLion editor, without being added or downloaded to the local project.

When you work with a remote file, a special toolbar appears at the top of the editor, showing the editing status (The file is identical to remote one  or The file has been modified. Upload?).

Remote files can be distinguished from local ones by the annotation that includes the server name  (in our case, it is <MyServer>).

3. When you are done editing the file, do one of the following:

* To upload the file to the remote host, click ![the Upload current remote file button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.upload.svg) or press `Alt+Shift+Q` (Windows), `⌥ ⇧ Q` (macOS), `⌥ ⇧ Q` (IntelliJ IDEA Classic (macOS)), `⌥ ⇧ Q` (macOS System Shortcuts), `Alt+Shift+Q` (XWin), `Alt+Shift+Q` (GNOME), `Alt+Shift+Q` (KDE), `Alt+Shift+Q` (Emacs), `Alt+Shift+Q` (Sublime Text), `⌥ ⇧ Q` (Sublime Text (macOS)), `⌥ ⇧ Q` (Xcode), `Alt+Shift+Q` (Visual Studio), `⌥ ⇧ Q` (Visual Studio (macOS)), `Alt+Shift+Q` (ReSharper), `⌥ ⇧ Q` (ReSharper (macOS)), `Alt+Shift+Q` (QtCreator), `⌥ ⇧ Q` (QtCreator (macOS)), `Alt+Shift+Q` (NetBeans), `Alt+Shift+Q` (Eclipse), `⌥ ⇧ Q` (Eclipse (macOS)).

* To compare the currently opened file with the last uploaded version, click ![the Compare with last uploaded version button](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.vcs.diff.svg). The files are opened in the CLion [Diff Viewer for files](differences-viewer.html).

* To discard the changes introduced to the file after the last upload, click ![](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.vcs.revert.svg).

Note that any changes to an individual file are discarded as soon as you close the file or the currently opened project unless these changes have been uploaded. To prevent losing your data, CLion displays the following dialog when you attempt to close the edited file or the entire project.

![Confirm uploading message](https://resources.jetbrains.com/help/img/idea/2026.2/cl_remote_file_unsaved.png)

## See also

### Procedures

[Deployment](deploying-applications.html)

### Reference

[Remote Host tool window](remote-host-tool-window.html)

