Manage projects
Learn how to manage Neon projects from the Neon Console or the Neon API.
With Neon, everything starts with the project. It is the top-level object in the Neon object hierarchy. A project can hold as many databases and branches as your application or workflow needs. However, plan limits define how many projects you can create.
Learn more about projects and how to manage them in these sections:
Default resources
When you add a new project, Neon creates the following resources by default:
- A default branch called
main
. You can create child branches from the default branch or from any previously created branch. For more information, see Manage branches. - A single primary read-write compute. This is the compute associated with the branch. For more information, see Manage computes.
- A Postgres database that resides on the project's default branch. If you ddid not specify your own database name when creating the project, the database created is named
neondb
. - A Postgres role that is named for your database. For example, if your database is named
neondb
, the project is created with a default role namedneondb_owner
.
About the Settings page
Once you open a project, you can use the Project settings page to manage that particular project and configure any defaults.
You can tab between these sections:
- General — Change the name of your project or copy the project ID.
- Compute — Set the autosuspend and sizing defaults for any new computes you create when branching.
- Storage — Choose how long Neon maintains a history of changes for all branches.
- Sharing — Let other users access your project's databases.
- Delete — Use with care! This action deletes your entire project and all its objects, and is irreversible.
Basic actions
Here are some basic actions you can take to add or manage projects:
- Create a project
- View projects
- Change a project name
- Delete a project
- Invite collaborators to a project
Create a project
The following instructions describe how to create additional Neon projects. If you are creating your very first Neon project, refer to the instructions in Sign up.
To create a Neon project:
-
Navigate to the Neon Console.
-
Click New Project.
-
Specify values for Project Name, Postgres version, Cloud Service Provider, and Region. Project names are limited to 64 characters. If you are a paying user, you can specify Compute size settings when creating a project. The settings you specify become the default settings for computes that you add to your project when creating branches or read replicas.
- Neon supports fixed-size computes and autoscaling. For more information, see Compute size and autoscaling configuration.
- The Suspend compute after a period of inactivity setting defines the period of inactivity after which a compute is automatically suspended. For more information, see Autosuspend configuration.
-
Optionally, select More options to specify a name for your default branch. The default name is
main
. -
Click Create Project.
After creating a project, you are presented with a dialog that provides your connection details for your database. The connection details include your password.
tip
View projects
To view your projects:
- Navigate to the Neon Console.
- Select Home or the Neon logo at the top left of the Console.
- The Projects page lists your projects, including any projects that have been shared with you.
Change the name or copy the ID of your project
You are permitted to change the name of your project at any point. The project ID is permanent.
To edit a Neon project:
- Navigate to the Neon Console.
- Select the project that you want to edit.
- Select Project settings.
- Select General.
- Make your changes and click Save.
Delete a project
Deleting a project is a permanent action, which also deletes any computes, branches, databases, and roles that belong to the project.
To delete a project:
- Navigate to the Neon Console.
- Select the project that you want to delete.
- Select Project settings.
- Select Delete.
- Click Delete project.
- On the confirmation dialog, click Delete.
important
If you are any of Neon's paid plans, such as our Launch or Scale plan, deleting all your Neon projects won't stop monthly billing. To avoid charges, you also need to downgrade to the Free plan. You can do so from the Billing page in the Neon Console.
Invite collaborators to a project
Neon's project collaboration feature allows you to invite other Neon accounts to collaborate on a Neon project.
To invite collaborators to a Neon project:
- In the Neon Console, select a project.
- Select Project settings.
- Select Collaborators.
- Select Invite and enter the email address of the account you want to collaborate with.
- Click Invite.
The email you specify is added to the list of Collaborators. The Neon account associated with that email address is granted full access to the project with the exception privileges required to delete the project. This account can also invite other Neon users to a project. When that user logs in to Neon, the project they were invited to is listed on their Projects page, under Shared with you.
The costs associated with a projects being collaborated on are charged to the Neon account that owns the project. For example, if you invite another Neon user account to a project you own, any usage incurred by that user within your project is billed to your Neon account, not theirs.
For additional information, refer to our Project collaboration guide.
Advanced settings
From the Project settings page, you can also set defaults or apply bulk changes across your Neon objects:
- Reset default compute size
- Configure history retention range
- Enable logical replication
- Configure IP Allow
Reset the default compute size
Compute size is the number of Compute Units (CUs) assigned to a Neon compute. The number of CUs determines the processing capacity of the compute. One CU is equal to 1 vCPU with 4 GB of RAM. Currently, a Neon compute can have anywhere from .25 CUs to 10 CUs. Larger compute sizes will be supported in a future release.
By default, new branches inherit the compute size from your first branch (i.e., main
). However, there may be times when you want to reset this default. For example, if you want to create read replica computes, where each replica requires less compute per branch.
To reset the default compute size, go to Project settings > Compute.
Using the slider, you can configure a fixed-size compute or enable autoscaling.
- Fixed size: Select a fixed compute size ranging from .25 CUs to 10 CUs. A fixed-size compute does not scale to meet workload demand.
- Autoscaling: Specify a minimum and maximum compute size. Neon scales the compute size up and down within the selected compute size boundaries in response to the current load. Currently, the Autoscaling feature supports a range of 1/4 (.25) CU to 10 CUs. The 1/4 CU and 1/2 CU settings are shared compute. For information about how Neon implements the Autoscaling feature, see Autoscaling.
Example: default minimum and maximum autoscale settings
Configure history retention
By default, Neon retains a history of changes for all branches in your project, enabling features like:
- Point-in-time restore for recovering lost data
- Time Travel queries for investingating data issues
The default retention window is 1 day across all plans to help avoid unexpected storage costs. If you extend this retention window, you'll expand the range of data recovery and query options, but note that this will also increase your storage usage, especially with multiple active branches.
Also note that adjusting the history retention period affects all branches in your project.
To configure the history retention period for a project:
- Select a project in the Neon Console.
- On the Neon Dashboard, select Project settings.
- Select Storage.
- Use the slider to select the history retention period.
- Click Save.
For more information about available plan limits, see Neon plans.
Enable logical replication
Logical replication enables replicating data from your Neon databases to a variety of external destinations, including data warehouses, analytical database services, messaging platforms, event-streaming platforms, and external Postgres databases.
important
Enabling logical replication modifies the PostgreSQL wal_level
configuration parameter, changing it from replica
to logical
for all databases in your Neon project. Once the wal_level
setting is changed to logical
, it cannot be reverted. Enabling logical replication also restarts all computes in your Neon project, meaning that active connections will be dropped and have to reconnect.
To enable logical replication in Neon:
- Select your project in the Neon Console.
- On the Neon Dashboard, select Settings.
- Select Logical Replication.
- Click Enable to enable logical replication.
You can verify that logical replication is enabled by running the following query:
After enabling logical replication, the next steps involve creating publications on your replication source database in Neon and configuring subscriptions on the destination system or service. To get started, refer to our logical replication guides.
Configure IP Allow
Available to Neon Scale and Business plan users, the IP Allow feature provides an added layer of security for your data, restricting access to the branch where your database resides to only those IP addresses that you specify. In Neon, the IP allowlist is applied to all branches by default.
Optionally, you can allow unrestricted access to your project's non-default branches. For instance, you might want to restrict access to the default branch to a handful of trusted IPs while allowing unrestricted access to your development branches.
By default, Neon allows IP addresses from 0.0.0.0
, which means that Neon accepts connections from any IP address. Once you configure IP Allow by adding IP addresses or ranges, only those IP addresses will be allowed to access Neon.
note
How to specify IP addresses
You can define an allowlist with individual IP addresses, IP ranges, or CIDR notation. A combination of these options is also permitted. Multiple entries, whether they are the same or of different types, must be separated by a comma. Whitespace is ignored.
-
Add individual IP addresses: You can add individual IP addresses that you want to allow. This is useful for granting access to specific users or devices. This example represents a single IP address:
-
Define IP ranges: For broader access control, you can define IP ranges. This is useful for allowing access from a company network or a range of known IPs. This example range includes all IP addresses from
198.51.100.20
to198.51.100.50
: -
Use CIDR notation: For more advanced control, you can use CIDR (Classless Inter-Domain Routing) notation. This is a compact way of defining a range of IPs and is useful for larger networks or subnets. Using CIDR notation can be advantageous when managing access to branches with numerous potential users, such as in a large development team or a company-wide network.
This CIDR notation example represents all 256 IP addresses from
203.0.113.0
to203.0.113.255
. -
Use IPv6 addresses: Neon projects provisioned on AWS also support specifying IPv6 addresses. For example:
note
IPv6 is not yet supported for projects provisioned on on Azure.
A combined example using all three options above, specified as a comma-separated list, would appear similar to the following:
This list combines individual IP addresses, a range of IP addresses, a CIDR block, and an IPv6 address. It illustrates how different types of IP specifications can be used together in a single allowlist configuration, offering a flexible approach to access control.
Update an IP Allow configuration
You can update your IP Allow configuration via the Neon Console or API as described in Configure IP Allow. Replace the current configuration with the new configuration. For example, if your IP Allow configuration currently allows access from IP address 192.0.2.1
, and you want to extend access to IP address 192.0.2.2
, specify both addresses in your new configuration: 192.0.2.1, 192.0.2.2
. You cannot append values to an existing configuration. You can only replace an existing configuration with a new one.
The Neon CLI provides an ip-allow
command with add
, reset
, and remove
options that you can use to update your IP Allow configuration. For instructions, refer to Neon CLI commands — ip-allow.
Remove an IP Allow configuration
To remove an IP configuration entirely to go back to the default "no IP restrictions" (0.0.0.0
) configuration:
Manage projects with the Neon API
Project actions performed in the Neon Console can also be performed using the Neon API. The following examples demonstrate how to create, view, and delete projects using the Neon API. For other project-related API methods, refer to the Neon API reference.
note
The API examples that follow may not show all of the user-configurable request body attributes that are available to you. To view all attributes for a particular method, refer to method's request body schema in the Neon API reference.
The jq
option specified in each example is an optional third-party tool that formats the JSON
response, making it easier to read. For information about this utility, see jq.
Prerequisites
A Neon API request requires an API key. For information about obtaining an API key, see Create an API key. In the cURL examples shown below, $NEON_API_KEY
is specified in place of an actual API key, which you must provide when making a Neon API request.
Create a project with the API
The following Neon API method creates a project. To view the API documentation for this method, refer to the Neon API reference.
The API method appears as follows when specified in a cURL command. The myproject
name value is a user-specified name for the project.
The response includes information about the role, the database, the default branch, and the primary read-write compute that is created with the project.
Response body
List projects with the API
The following Neon API method lists projects for your Neon account. To view the API documentation for this method, refer to the Neon API reference.
The API method appears as follows when specified in a cURL command:
Response body
Update a project with the API
The following Neon API method updates the specified project. To view the API documentation for this method, refer to the Neon API reference.
The API method appears as follows when specified in a cURL command. The project_id
is a required parameter. The example changes the project name
to project1
.
Response body
Delete a project with the API
The following Neon API method deletes the specified project. To view the API documentation for this method, refer to the Neon API reference.
The API method appears as follows when specified in a cURL command. The project_id
is a required parameter.
Response body
Need help?
Join our Discord Server to ask questions or see what others are doing with Neon. Users on paid plans can open a support ticket from the console. For more details, see Getting Support.