For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).
How to Add and Remove Droplets from Firewalls
Last verified 18 Nov 2026
DigitalOcean Cloud Firewalls are a network-based, stateful firewall service for Droplets provided at no additional cost. Cloud firewalls block all traffic that isn’t expressly permitted by a rule.
Add or Remove Droplets from a Firewall Using the CLI
The commands to add and remove Droplets from a firewall require the Droplet’s ID. To retrieve a list of Droplets and their IDs, use the doctl compute droplet list command.
How to Add a Droplet to a Firewall Using the DigitalOcean CLI
Add or Remove Droplets from a Firewall Using the API
The API calls to add and remove Droplets from a firewall require the Droplet’s ID. To retrieve a list of Droplets and their IDs, use the /v2/droplets endpoint.
How to Add Droplets to a Firewall Using the DigitalOcean API
Add or Remove Droplets from a Firewall Using the Control Panel
You can modify the Droplets protected by a firewall in the Control Panel. Go to the Firewalls tab of the Networking page and click the firewall you want to modify, then click the Droplets tab.
The Droplets tab lists every Droplet protected by the firewall. Droplets added individually appear on their own row, and Droplets added with a tag are shown below the tag.
To add a Droplet or tag, click Add Droplets. In the Add Droplets window, search for a Droplet or tag, then click Add Droplets to confirm.
To remove a Droplet or tag, click the trash icon on the right of the row.