Skip to main content
Preview URLs let you access running services from your task’s sandbox. When your dev server starts on port 3000, Niteshift creates a public URL you can open in your browser.

How it works

  1. Configure which ports to expose in repository settings
  2. The agent starts your dev server in the sandbox
  3. Niteshift detects the running service and creates a tunnel
  4. A public URL appears in the Environment tab
Preview URLs follow this format:
https://niteshift-{taskId}-{port}.preview.niteshift.dev

Configuring ports

1

Open repository settings

Go to Settings → Repositories and select your repository.
2

Add preview ports

In the Preview Ports section, click Add Port. Enter:
  • Port number — the port your service runs on (e.g., 3000)
  • Description — a label for the URL (e.g., “Frontend”, “API”)
3

Save

Click Save. New tasks will expose these ports automatically.

Multiple ports

You can expose multiple ports for different services:
PortDescription
3000Frontend (Next.js)
3001API server
5432Database admin UI
Each port gets its own preview URL.

Viewing preview URLs

In the task view, click the Environment tab. Preview URLs appear as clickable links with their descriptions. The agent can also tell you the preview URLs in chat. Ask: “What’s the preview URL?”

Authentication

Preview URLs are restricted to users in your organization with an active Niteshift session. They are never publically available.

Troubleshooting

Preview URL not appearing?
  • Verify the port is configured in repository settings
  • Check that the service is actually running on that port
Preview URL returns 502?
  • Check the logs tab for errors that might’ve occured while starting your application
  • The service may not be listening on the configured port