Skip to main content
Nile provides built-in multi-tenancy support. This guide covers all tenant management commands and their usage.
Available commands:
  • list - View all tenants
  • create - Create a new tenant
  • delete - Remove a tenant
  • update - Modify tenant details

Prerequisites

Before managing tenants, ensure you have:
  1. Selected a workspace
  2. Selected a database
  3. Authenticated with Nile
Prerequisites

Listing Tenants

The list command shows all tenants in your database.

Options

Examples

List Examples

Creating Tenants

The create command adds a new tenant to your database.

Required Options

Additional Options

Examples

Create Examples

Updating Tenants

The update command modifies existing tenant details.

Required Options

Additional Options

Examples

Update Examples

Deleting Tenants

The delete command removes a tenant from your database.

Required Options

Additional Options

Examples

Delete Examples

Common Workflows

Setting Up Initial Tenants

Initial Setup

Tenant Maintenance

Maintenance

Bulk Operations

Bulk Operations

Common Issues

Tenant Not Found

When tenant doesn’t exist:
Not Found

Database Not Selected

When database isn’t specified:
No Database

Duplicate Tenant ID

When creating tenant with existing ID:
Duplicate ID

Best Practices

  1. Naming Conventions: Use clear, consistent tenant names:
  2. Regular Verification: Periodically verify tenant list:
  3. Backup Before Delete: List tenant details before deletion:
  • nile db psql - Connect to tenant’s database
  • nile db connectionstring - Get tenant-specific connection
  • nile config - Configure CLI settings
  • nile workspace - Manage workspaces