How it works
- Configure which ports to expose in repository settings
- The agent starts your dev server in the sandbox
- Niteshift detects the running service and creates a tunnel
- A public URL appears in the Environment tab
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:| Port | Description |
|---|---|
| 3000 | Frontend (Next.js) |
| 3001 | API server |
| 5432 | Database admin UI |
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
- Check the logs tab for errors that might’ve occured while starting your application
- The service may not be listening on the configured port