Managing Services
Creating services, managing targets and locations.
A service is the HTTP ingress layer — it wires a domain to your running instances. See Services for how they work conceptually.
Creating a service
unisrv srv new <name> <host>The name is a label for you, the host is the domain it listens on.
unisrv srv new my-app my-app.unisrv.devBy default services enforce HTTPS. Pass --allow-http if you need plain HTTP.
Targets
Targets connect instances to a service. A target is just an instance + port pair.
# Add a target
unisrv srv target add <service> <instance>:<port>
# Add to a specific group
unisrv srv target add <service> <instance>:8080 -g api
# Remove a target (interactive selection if target_id omitted)
unisrv srv target rm <service> [target_id]In most cases you'll use unisrv rollout to manage targets automatically — manual target management is there when you need fine-grained control.
Locations
Locations let you route different paths to different target groups or external URLs.
# Route /api to the "api" target group
unisrv srv location add <service> /api instance api
# Proxy /docs to an external URL
unisrv srv location add <service> /docs url https://docs.example.com
# Custom 404 page
unisrv srv location add <service> / instance default --override-404 /404.htmlWithout any locations, all paths go to the default target group.
Listing and inspecting
# List all services
unisrv srv list
# Show details for a service (get and show are aliases)
unisrv srv get <service>
# Delete a service
unisrv srv delete <service>srv get gives you a full overview of the service — its configuration, traffic statistics, locations and active targets:
$ unisrv srv get service-backend
🔌 Service 217e27ab-1806-44e7-a88e-a8f4589077f8
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Name: service-backend
ID: 217e27ab-1806-44e7-a88e-a8f4589077f8
Type: HTTP
Created: 2026-02-28T17:19:45.603278
📊 Statistics: 372.4Mb IN 43.3Gb OUT
⚙️ Allow HTTP: No
📍 Locations (1)
/ → instances (default)
🎯 Targets (3)
aa72a3e5 → 94432807:8080 (default)
c31f09b2 → 6e8a1204:8080 (default)
f7d643a1 → b20e5f93:8080 (default)IDs support prefix matching — type just enough characters to be unique.