ɳSelfɳSELFDOCS

URLs Command

v0.4.8Updated for ɳSelf v0.4.8

The nself urls command displays all service URLs for your ɳSelf project. Quickly access GraphQL endpoints, admin interfaces, storage URLs, and custom service routes based on your current environment configuration.

URL Categories

  • - Core Services: Hasura GraphQL, Auth, PostgreSQL
  • - Optional Services: MinIO, MeiliSearch, Redis, Mailpit
  • - Admin Interfaces: nself-admin, Hasura Console, Grafana
  • - Custom Services: CS_N user-defined services
  • - Frontend Apps: FRONTEND_APP_N external applications

Usage

nself urls [options]

Options

OptionDescriptionDefault
--category CATFilter by category (core, optional, admin, custom, frontend)all
--open SERVICEOpen specific service URL in browser-
--copy SERVICECopy specific service URL to clipboard-
--jsonOutput in JSON formatfalse
--env NAMEShow URLs for specific environmentcurrent
--internalShow internal Docker network URLsfalse
--quiet, -qShow only URLs (no labels)false

Examples

List All URLs

nself urls

# Output:
  ➞ ɳSelf URLs - local.nself.org

  Core Services
  -------------
  GraphQL API         https://api.local.nself.org/v1/graphql
  GraphQL Console     https://api.local.nself.org/console
  Auth Service        https://auth.local.nself.org
  PostgreSQL          postgresql://localhost:5432/nself_db

  Optional Services
  -----------------
  Storage (MinIO)     https://storage.local.nself.org
  MinIO Console       https://storage.local.nself.org:9001
  Search (Meili)      https://search.local.nself.org
  Email (Mailpit)     https://mail.local.nself.org

  Admin Interfaces
  ----------------
  ɳSelf Admin         https://admin.local.nself.org

  Custom Services
  ---------------
  ping_api            https://ping.local.nself.org

  Frontend Apps
  -------------
  org                 https://org.local.nself.org
  docs                https://docs.local.nself.org
  cloud               https://cloud.local.nself.org
  chat                https://chat.local.nself.org

  Monitoring
  ----------
  Grafana             https://grafana.local.nself.org
  Prometheus          https://prometheus.local.nself.org

Filter by Category

# Show only core services
nself urls --category core

# Output:
  Core Services
  -------------
  GraphQL API         https://api.local.nself.org/v1/graphql
  GraphQL Console     https://api.local.nself.org/console
  Auth Service        https://auth.local.nself.org
  PostgreSQL          postgresql://localhost:5432/nself_db
# Show only custom services
nself urls --category custom

# Output:
  Custom Services
  ---------------
  ping_api            https://ping.local.nself.org
# Show only frontend apps
nself urls --category frontend

# Output:
  Frontend Apps
  -------------
  org                 https://org.local.nself.org
  docs                https://docs.local.nself.org
  cloud               https://cloud.local.nself.org
  chat                https://chat.local.nself.org

Open URL in Browser

# Open Hasura console
nself urls --open api

# Open admin UI
nself urls --open admin

# Open Grafana
nself urls --open grafana

# Open custom service
nself urls --open ping_api

Copy URL to Clipboard

# Copy GraphQL endpoint
nself urls --copy api
# Copied: https://api.local.nself.org/v1/graphql

# Copy auth URL
nself urls --copy auth
# Copied: https://auth.local.nself.org

Environment-Specific URLs

# Show staging URLs
nself urls --env staging

# Output:
  ➞ ɳSelf URLs - staging.nself.org

  Core Services
  -------------
  GraphQL API         https://api.staging.nself.org/v1/graphql
  Auth Service        https://auth.staging.nself.org
  ...
# Show production URLs
nself urls --env prod

# Output:
  ➞ ɳSelf URLs - nself.org

  Core Services
  -------------
  GraphQL API         https://api.nself.org/v1/graphql
  Auth Service        https://auth.nself.org
  ...

Internal Docker URLs

# Show internal Docker network URLs
nself urls --internal

# Output:
  ➞ Internal Docker URLs

  Service           Internal URL
  -------           ------------
  postgres          postgres:5432
  hasura            hasura:8080
  auth              auth:4000
  minio             minio:9000
  redis             redis:6379
  meilisearch       meilisearch:7700

URL Formats by Service

Hasura GraphQL

EndpointURL
GraphQL APIhttps://api.{domain}/v1/graphql
GraphQL Consolehttps://api.{domain}/console
Metadata APIhttps://api.{domain}/v1/metadata
Schema APIhttps://api.{domain}/v2/query
Health Checkhttps://api.{domain}/healthz

Authentication

EndpointURL
Auth Basehttps://auth.{domain}
Sign Inhttps://auth.{domain}/signin
Sign Uphttps://auth.{domain}/signup
Token Refreshhttps://auth.{domain}/token

Storage (MinIO)

EndpointURL
S3 APIhttps://storage.{domain}
Consolehttps://storage.{domain}:9001

Search (MeiliSearch)

EndpointURL
Search APIhttps://search.{domain}
Health Checkhttps://search.{domain}/health

JSON Output

nself urls --json

# Output:
{
  "environment": "local",
  "domain": "local.nself.org",
  "timestamp": "2026-01-24T10:30:00Z",
  "urls": {
    "core": {
      "graphql": "https://api.local.nself.org/v1/graphql",
      "graphql_console": "https://api.local.nself.org/console",
      "auth": "https://auth.local.nself.org",
      "postgres": "postgresql://localhost:5432/nself_db"
    },
    "optional": {
      "storage": "https://storage.local.nself.org",
      "storage_console": "https://storage.local.nself.org:9001",
      "search": "https://search.local.nself.org",
      "mail": "https://mail.local.nself.org"
    },
    "admin": {
      "nself_admin": "https://admin.local.nself.org"
    },
    "custom": {
      "ping_api": "https://ping.local.nself.org"
    },
    "frontend": {
      "org": "https://org.local.nself.org",
      "docs": "https://docs.local.nself.org",
      "cloud": "https://cloud.local.nself.org",
      "chat": "https://chat.local.nself.org"
    },
    "monitoring": {
      "grafana": "https://grafana.local.nself.org",
      "prometheus": "https://prometheus.local.nself.org"
    }
  }
}

Quiet Mode

# URLs only (no labels)
nself urls --quiet

# Output:
https://api.local.nself.org/v1/graphql
https://auth.local.nself.org
https://storage.local.nself.org
https://search.local.nself.org
https://mail.local.nself.org
https://admin.local.nself.org
https://ping.local.nself.org
https://org.local.nself.org
https://docs.local.nself.org

URL Configuration

URLs are generated from your .env configuration:

# Base configuration
BASE_DOMAIN=local.nself.org

# Service routes (subdomains)
HASURA_ROUTE=api            # https://api.local.nself.org
AUTH_ROUTE=auth             # https://auth.local.nself.org
MINIO_ROUTE=storage         # https://storage.local.nself.org
MEILISEARCH_ROUTE=search    # https://search.local.nself.org
MAILPIT_ROUTE=mail          # https://mail.local.nself.org
NSELF_ADMIN_ROUTE=admin     # https://admin.local.nself.org

# Custom service routes
CS_1_ROUTE=ping             # https://ping.local.nself.org

# Frontend app routes
FRONTEND_APP_1_ROUTE=org    # https://org.local.nself.org
FRONTEND_APP_2_ROUTE=docs   # https://docs.local.nself.org

Environment URL Patterns

EnvironmentBASE_DOMAINExample GraphQL URL
dev/locallocal.nself.orghttps://api.local.nself.org
stagingstaging.nself.orghttps://api.staging.nself.org
prodnself.orghttps://api.nself.org

Service Availability by Environment

ServiceLocalStagingProduction
GraphQL APIAlwaysAlwaysAlways
Hasura ConsoleEnabledEnabledDisabled
AuthAlwaysAlwaysAlways
nself-adminEnabledOptionalDisabled
MailpitEnabledOptionalNever
GrafanaIf monitoringIf monitoringIf monitoring

Integration Examples

Get GraphQL Endpoint for Scripts

# Extract GraphQL URL
GRAPHQL_URL=$(nself urls --json | jq -r '.urls.core.graphql')
echo $GRAPHQL_URL

# Use in a script
curl -X POST $GRAPHQL_URL \
  -H "Content-Type: application/json" \
  -H "x-hasura-admin-secret: $HASURA_SECRET" \
  -d '{"query": "{ users { id } }"}'

Configure Frontend Environment

# Generate .env.local for frontend app
nself urls --json | jq -r '
  "NEXT_PUBLIC_GRAPHQL_URL=" + .urls.core.graphql,
  "NEXT_PUBLIC_AUTH_URL=" + .urls.core.auth,
  "NEXT_PUBLIC_STORAGE_URL=" + .urls.optional.storage
' > .env.local

Open All Admin Interfaces

# Open all admin UIs
nself urls --open admin
nself urls --open api       # Opens Hasura console
nself urls --open grafana   # If monitoring enabled

Troubleshooting

URL Returns 502 Bad Gateway

# Check if service is running
nself status

# Check service logs
nself logs hasura

# Restart the service
nself restart hasura

SSL Certificate Error

# Regenerate and trust certificates
nself build
ɳSelf trust

# Or check certificate status
nself doctor --category ssl

DNS Not Resolving

# Check DNS resolution
dig local.nself.org

# local.nself.org should resolve to 127.0.0.1
# This is configured via Cloudflare DNS wildcard

Related Commands

  • Status Command - Service status
  • Build Command - Generate nginx routes
  • Config Commands - URL configuration
  • Domain Configuration - DNS setup
  • SSL Configuration - Certificate setup