While FTP is not supported natively out of the box inside Visual Studio Code, you can easily connect a remote web server as a workspace using a dedicated extension or an operating system-level drive mount. Setting up automated file synchronization lets you edit code locally and push updates to your live host the moment you hit save.
This guide covers how to configure FTP in Visual Studio Code, deploy project files seamlessly, and resolve common errors such as the configuration command not responding and AggregateError: at internalConnectMultiple.
The most reliable workflow for managing FTP connections in Visual Studio Code is installing the actively maintained SFTP extension by Natizyskunk (the updated fork of liximomo’s original tool). Despite its name, this extension supports both encrypted SSH transfers and standard file transfer protocols.
Open the Command Palette using Ctrl+Shift+P (or Cmd+Shift+P), type SFTP: Config, and press Enter. VS Code will automatically generate a JSON configuration file inside a hidden .vscode directory in your workspace root.
Update that configuration file with your server credentials:
{
"name": "My Server",
"protocol": "ftp",
"host": "example.com",
"port": 21,
"username": "your_username",
"password": "your_password",
"remotePath": "/public_html",
"uploadOnSave": true,
"downloadOnOpen": false
}
If you prefer not to store plain-text passwords in your workspace, omit the “password” field so VS Code prompts you upon connecting. If your host uses SSH-based transfers instead, change “protocol” to “sftp” and “port” to 22.
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run SFTP: Download Project to pull your remote directory into your local workspace. With “uploadOnSave”: true enabled, any file you modify and save locally will immediately sync back to your remote server.
Once your configuration file is saved inside .vscode, you can push files to your remote host in three ways:
If you prefer real-time remote editing without storing a local synchronized copy, mount your remote server as a local volume at the OS level and open it via File > Open Folder…:
mkdir ~/remote_mount
curlftpfs ftp://username:[email protected] /home/username/remote_mount
code /home/username/remote_mount
If running the configuration command does nothing or returns a command not found error, verify the following:
Alternatively, bypass the command completely by manually creating a .vscode folder in your workspace root, adding a file named sftp.json inside it, and pasting in your server settings. Test the connection by running SFTP: List All from the Command Palette.
If the extension output log throws a TCP connection error when saving or downloading files:
[error] AggregateError: at internalConnectMultiple (node:net:1430:18)
at afterConnectMultiple (node:net:2099:7)
Inspect your JSON settings for three common configuration mistakes:
Configuring FTP in Visual Studio Code turns your local editor into a streamlined remote deployment environment. Keep these three best practices in mind for a reliable setup:
See the following links that have been used to construct this article:
For more useful articles please visit our knowledgebase.