> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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 Create Namespaces to Organize DigitalOcean Functions Functions are blocks of code that run on demand without the need to manage any infrastructure. Develop on your local machine, test your code from the command line (using `doctl`), then deploy to a production namespace or App Platform — no servers required. Namespaces are a level of isolation and organization for functions and their settings. All functions and projects must be created in a namespace. ## Command Line To create a new namespace, use the `create` subcommand of `doctl serverless namespaces`, passing in a namespace label (name) and datacenter region: ```bash doctl serverless namespaces create --label "example-namespace" --region "nyc1" ``` The namespace is created and automatically connected to: ``` Connected to functions namespace 'fn-c92ea830-a657-43b0-96a2-9478ea730c44' on API host 'https://faas-nyc1-2ef2e6cc.doserverless.co' ``` The `--label` flag specifies a label (name) for the namespace. The `--region` flag indicates the region. For a list of valid regions, use the `list-regions` subcommand: ```bash doctl serverless namespaces list-regions ``` This command prints a list of regions: ``` [ams ams3 blr blr1 fra fra1 lon lon1 nyc nyc1 sfo sfo3 sgp sgp1 tor tor1 syd1] ``` By default, `doctl` immediately connects to newly created namespaces. Use the `-n` or `--no-connect` flag to disable this. ## Control Panel To create a namespace from the [DigitalOcean Control Panel](https://cloud.digitalocean.com), first click **Functions** in the left-hand menu to go to the [Functions page](https://cloud.digitalocean.com/functions). If you have no namespaces, click the **Create Function Namespace** button to begin creating your first namespace. If you already have namespaces, click the **Create Namespace** button at the top of the **Namespaces** table. Both links take you to the **Create a Function Namespace** page. Choose your datacenter region and namespace name, then click **Create Namespace**. When your new namespace is created, you’re taken to its overview page. ## Namespace Access and Security You can control access to your namespace using namespace access keys. These user-specific credentials use HTTP basic authentication to authenticate requests to administer, deploy, and invoke functions through the API. Each access key is unique to a user or application, can be revoked individually, and is automatically revoked when a team member is removed. For more information, see [How to Manage Namespace Access Keys](https://docs.digitalocean.com/products/functions/how-to/manage-namespace-access/index.html.md).