---
title: "Edit Discord Bot Code - Panel, SFTP & VS Code Sync | FPS.ms"
description: "Edit your hosted Discord bot code via the FPS.ms panel, SFTP, or VS Code remote sync. Set up upload-on-save for fast development."
url: https://fps.ms/docs/discord-bots/editing-code
---
# Editing code

After [installing your Discord bot](https://fps.ms/docs/discord-bots/installation.md) on FPS.ms, you can edit your code in three ways: directly through the panel file manager, via an SFTP client, or with VS Code live sync.

## Panel file manager

The simplest option — edit files directly in the **Files** tab of the [FPS.ms panel](https://panel.fps.ms). This works well for quick changes but is limited for larger edits.

## SFTP client

Use any [SFTP client](https://fps.ms/docs/getting-started/connecting-to-sftp.md) (like FileZilla) to open and edit your bot files in your preferred editor. This gives you full control over your project files.

## Visual Studio Code live sync

For the best development experience, use VS Code with SFTP sync. Changes you save locally are automatically uploaded to your FPS.ms server.

1. Download the [SFTP Extension](https://marketplace.visualstudio.com/items?itemName=Natizyskunk.sftp) for VS Code.
2. Open a local directory you want to sync to your server (or create an empty one to download your server files into).
3. Open the command palette (`Ctrl+Shift+P` on Windows/Linux, `Cmd+Shift+P` on Mac) and run `SFTP: config`.
4. A `sftp.json` file appears under the `.vscode` directory.
5. Fill in the values from your FPS.ms server — find them in the **Settings** tab under **SFTP Details**. You will also need to [set a password](https://fps.ms/docs/getting-started/setting-a-password.md) if you haven't already. Here is an example config:

```json title=".vscode/sftp.json"
	{
		"name": "My Server",
		"host": "mango/papaya/pineapple/guava/other.fps.ms",
		"protocol": "sftp",
		"port": 2022,
		"username": "SFTP_USERNAME",
		"remotePath": "/",
		"uploadOnSave": true,
		"useTempFile": false,
		"openSsh": false,
		"ignore": [".vscode", ".git", ".DS_Store", ".cache", ".local", "?"]
	}
```

**Optionally**: Add the `password` key to the json with the value of your FPS.ms password. **Note that this stores your password in plaintext and if syncing is enabled may be synced to the remote server if you don't have the ignore `.vscode` in your `sftp.json`. Other subusers can then see it!**
 
**Optionally**: If you already have files on your server, open the command palette like step 3. but then run `SFTP: Sync Both Directions`. This will make sure your local folder is in sync with the FPS.ms server.

**Optionally**: disable `uploadOnSave` in the `sftp.json` file. This will then not automatically sync your files to the server if you save them.

For more details, refer to the [SFTP extension documentation](https://marketplace.visualstudio.com/items?itemName=Natizyskunk.sftp).

## Next steps

- [Set up environment variables](https://fps.ms/docs/discord-bots/using-environment-variables.md) — manage your bot token securely
- [Add slash commands](https://fps.ms/docs/discord-bots/adding-slash-commands.md) — make your bot interactive
- [Upload files via SFTP](https://fps.ms/docs/getting-started/connecting-to-sftp.md) — transfer files with FileZilla
- [Troubleshoot common issues](https://fps.ms/docs/discord-bots/troubleshooting.md) — fix errors and crashes

---

[FPS.ms](https://fps.ms/index.html.md) · [All pages](https://fps.ms/llms.txt) · [Documentation](https://fps.ms/docs/llms.txt)
