Tutorial: Deployment in GoLand
Copy project files to a local or mounted folder, compare the copies, and configure automatic upload when you save changes. This setup transfers files, it does not build or start your application.
Before you start, open a project that contains a README.md file. Create a writable destination folder outside the project, such as /Users/jetbrains/deployment on macOS or C:\deployment on Windows. Use your own folder path in the steps below.
Configure the deployment server
Add a new server
Press Ctrl+Alt+S to open settings and then select .
Alternatively, go to in the main menu.
Click
and select Local or mounted folder.
In the Create New Server dialog that opens, type the server name and click OK.
The new configuration appears in the list. The default Web server URL does not start a web server. You do not need a web server for this example.
Specify the server root folder
In the Folder field, specify the directory to which the project files will be uploaded.
Enter the absolute path to the destination folder you created, or click
to select it.
Keep Visible only for this project selected to use this configuration in the current project. Clear it if you want to use the configuration in other projects or export it later.
Specify the deployment path
Next, switch to the Mappings tab.
Keep Local path set to the project root.
In the Deployment path field (which is by default empty), specify the folder on your server where GoLand will upload data from the folder specified in the Local path field.
Enter Application. This path is relative to the destination folder. For example, if Folder is /Users/jetbrains/deployment, GoLand uploads the files to /Users/jetbrains/deployment/Application.
Leave Web path blank. This example does not serve files over HTTP.
After you apply the changes, the server is ready to use.
Browse remote hosts
Select . In the Remote Host tool window, select MyRemoteServer to browse the destination folder.
Deploy files
Upload a file to the server
In the Project tool window Alt+1, right-click README.md.
Select . If this action is not shown, select and choose MyRemoteServer. Check the result in the File Transfer tool window.
To upload an entire folder, follow the same steps with the folder selected in the Project tool window.
Compare remote and local versions
There is a local and a remote copy of the README.md file, and they are identical. Modify the local version.
In the Remote Host tool window tool window, right-click README.md and select Compare with Local Version. GoLand opens the Diff Viewer.

Download the file from the server
In the Remote Host tool window tool window, right-click the README.md file and select Download from here. GoLand shows a warning.
Confirm the download to replace your local changes with the server version. You can also download a directory which server path is mapped to a local project folder. You do not need to upload the directory first.
Synchronize the changes
Change README.md in the editor and save it.
Right-click README.md in the Project tool window and select , then choose MyRemoteServer. If it is the default server, select Sync with Deployed to MyRemoteServer….
In the synchronization view, review the differences. For README.md, set the action to upload the local version to the destination folder. Click Synchronize Selected.

Automatically upload files to the default server
Automatic upload copies saved local changes to the default deployment server. Changes made on the server are not downloaded automatically.
By default, automatic upload is set to Never. Selecting a default server does not enable automatic upload.
Define the default server
Press Ctrl+Alt+S to open settings and then select .
Alternatively, go to in the main menu.
From the list of servers, select the one you want to make default and click
on the toolbar above the list of servers.
Enable automatic upload
As soon as the default server is set, you can make upload to this server automatic.
Press Ctrl+Alt+S to open settings and then select .
Alternatively, go to in the main menu.
From the Upload changed files automatically to the default server drop-down list, select one of the following options:
Always: upload a file upon every automatic and explicit save.
On explicit save action: upload a file after save only if this save was invoked manually by choosing or pressing Ctrl+S.
The Always mode is not recommended for deploying to production: incomplete code can be uploaded while developing, potentially breaking the production application.
Upload external changes
External changes are changes made outside the IDE, such as a Git branch change or files updated by a code generator. They can come from tools run inside or outside GoLand.
To include these changes in automatic upload, open . Set Upload changed files automatically to the default server to Always or On explicit save action, and clear Skip external changes.
With On explicit save action, use Ctrl+S to upload the pending changes.
With Never, automatic upload is disabled and Skip external changes is unavailable.
Export/import deployment settings
Now that you have a deployment server all set up, you can export the server configuration settings and then import them on another computer.
Export settings to a ZIP archive
Select from the main menu.
In the Export Settings dialog that opens, make sure that the WebServers checkbox is selected and specify the path to the target archive.

Import settings from a ZIP archive
Select from the main menu.
Select the ZIP archive that contains your settings in the dialog that opens.
Select the settings you want to apply in the Select Components to Import dialog that opens and click OK.
Summary
You configured a local or mounted destination, copied and compared files, and enabled automatic upload. To transfer files to another computer over SFTP, create a remote server configuration.