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).
All of the DigitalOcean resources in your account start in a single default project. You can create additional projects and move resources between them to organize your resources in ways that align with how you use them.
Create a Project Using the Control Panel
In the control panel’s main menu, under the Projects section, click + New Project to open the project creation page.
On the Create new project page, enter the name, description, and purpose of the project. You can change any project setting later by returning to the Settings tab.
-
Name your project (required). The project name is meant to be human-readable, so you can include spaces and special characters.
-
Add a description (optional). The project’s description appears at the top of all of all project pages, beneath the project’s name.
The description can be up to 255 characters long (including spaces). The first 97 characters are displayed on the page heading.
-
Tell us what it’s for? (required). This field lets us show relevant tips and tutorials for your use case. There are several common purposes in the list, but you can choose Other to describe it yourself.
The purpose can be up to 199 characters long. If you enter a longer description, you receive an error when you click Create Project.
When you’re done, click Create Project to go to the Move Resources page. Here, you can optionally move existing resources into the new project.
When you click into the text area, a list of all movable resources from other projects appears. You can keep typing to filter the list. Click the names of the resources you want to move, then click the Move Resources button. If you choose Skip for now, you can move resources in later.
Either choice finalizes the creation of your project and redirects you to the Resources tab of the new project.
Resources you add appear on the Resources tab, grouped by type.
Create a Project Using Automation
How to Create a Project Using the DigitalOcean CLI
- Install
doctl, the official DigitalOcean CLI.
- Create a personal access token and save it for use with
doctl.
- Use the token to grant
doctl access to your DigitalOcean account.
- Finally, run
doctl projects create. Basic usage looks like this, but you can read the usage docs for more details:
doctl projects create [flags]
The following example creates a project named Example Project with the purpose “Frontend development”:
doctl projects create --name "Example Project" --purpose "Frontend development"
How to Create a Project Using the DigitalOcean API
Create a personal access token and save it for use with the API.
cURL
Send a POST request to https://api.digitalocean.com/v2/projects.
Using cURL:
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
-d '{"name":"my-web-api", "description": "My website API", "purpose": "Service or API", "environment": "Production"}' \
"https://api.digitalocean.com/v2/projects"
Go
Using Godo, the official DigitalOcean API client for Go:
import (
"context"
"os"
"github.com/digitalocean/godo"
)
func main() {
token := os.Getenv("DIGITALOCEAN_TOKEN")
client := godo.NewFromToken(token)
ctx := context.TODO()
createReq := &godo.CreateProjectRequest{
Name: "my-web-api",
Description: "My website API",
Purpose: "Service or API",
Environment: "Production",
}
client.Projects.Create(ctx, createReq)
}
Ruby
Using DropletKit, the official DigitalOcean API client for Ruby:
require 'droplet_kit'
token = ENV['DIGITALOCEAN_TOKEN']
client = DropletKit::Client.new(access_token: token)
project = DropletKit::Project.new(
name: 'my-api',
description: 'My website API',
purpose: 'Service or API',
environment: 'Production'
)
client.projects.create(project)
Python
Using PyDo, the official DigitalOcean API client for Python:
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
req = {
"name": "my-web-api",
"description": "My website API",
"purpose": "Service or API",
"environment": "Production"
}
resp = client.projects.create(body=req)