Skip to content

Get 25% OFF your first month on every game! 🎉

Files & Backups

Edit server files with VS Code

Edit your server's config files in Visual Studio Code over SFTP, with the free SFTP extension, uploading each file as you save it.

Updated 4 min read

Visual Studio Code can open your server's files over SFTP, so you get its search, syntax coloring and tabs while you edit configs. The browser File Manager is quicker for one small change (How to manage your server files). VS Code earns its place when you are working through several config files in one sitting.

Checked against the SFTP extension by Natizyskunk, version 1.16.3, October 2026.

What you need

  • Visual Studio Code on your computer.
  • The four values from your server's SFTP details panel: Host, Port, Username and Password. Open the File Manager and press SFTP at the right of its toolbar. How to connect over SFTP shows where each one is and how to reset the password.

Only the server owner can see the SFTP password. SFTP works whether the server is running or stopped.

Install the extension

  1. In VS Code, open the Extensions view with Ctrl+Shift+X.
  2. Search for sftp and install SFTP by Natizyskunk.

Natizyskunk's SFTP is the maintained fork of the original SFTP extension by liximomo, which is no longer maintained. If you have the original installed, uninstall it first.

Create the connection file

  1. Make an empty folder on your computer and open it with File > Open Folder. It will hold the local copies of the files you edit.
  2. Press Ctrl+Shift+P (Cmd+Shift+P on a Mac) to open the Command Palette and run SFTP: Config. VS Code creates .vscode/sftp.json.
  3. Replace its contents with the values from the SFTP details panel:
{
  "name": "My server",
  "host": "paste the Host here",
  "protocol": "sftp",
  "port": 1234,
  "username": "paste the Username here",
  "remotePath": "/",
  "uploadOnSave": true
}

port is a number, so it takes no quotes. remotePath is the folder on the server that VS Code treats as the top, and / is the server's main folder, the same one the File Manager opens in. uploadOnSave sends a file back every time you save it.

The extension asks for your password the first time it connects, because sftp.json has no password line. You can add "password" to the file to skip the prompt, but the extension's own documentation warns that passwords in sftp.json are stored as plain text.

Open and edit a file

  1. Choose the SFTP icon in the Activity Bar (or run View: Show SFTP). Your server's folders appear under the connection name.
  2. Find the file you want. The remote view only shows a file's contents, so run SFTP: Edit in Local to make an editable copy.
  3. Make your change and save. With uploadOnSave on, the file uploads straight away.
  4. Restart the server from the Console tab. Most games read their config files only at startup.

To pull down a whole folder, set remotePath to that folder first (a folder such as plugins, not /), then run SFTP: Download Project. That command downloads everything under remotePath, so leave it away from / or it will copy your world too.

Warning

Take a backup before you edit files that matter (How to create and restore backups), and stop the server before changing a world folder. Files the panel manages itself, such as start.sh, are locked for every connection, SFTP included.

Tip

Keep the folder you opened out of anything shared, such as a Git repository you publish, if you saved the password in sftp.json.

If it won't connect

Check that Host, Port and Username match the SFTP details panel exactly, and that protocol is sftp. If you reset the password there, the server has a new username and password, so update both here too. The checks in How to connect over SFTP cover the usual causes of a refused login.