Overview
The oblien tunnel command exposes a local port through the Oblien edge, giving you an instant public URL for any service running on your machine.
For exact custom hostnames, Oblien reuses any existing valid certificate for the hostname and auto-renews it before expiry. It does not request a new certificate on every tunnel create.
oblien tunnel 3000This creates a tunnel (if needed), issues a connection token, and connects — all in one command:
✓ Tunnel ready
URL https://my-app-x7k.preview.oblien.com
Port localhost:3000
ID 42
Connected — forwarding traffic. Press Ctrl+C to stop.Commands
Expose a port
oblien tunnel <port> [flags]| Flag | Description |
|---|---|
--slug <slug> | Custom subdomain slug |
--name <name> | Display name for the tunnel |
--domain <domain> | Base domain or exact custom hostname |
If you do not pass --slug or --domain, the CLI reuses an existing active tunnel on the same port instead of creating a new one.
Check a custom hostname
oblien tunnel check-domain api.example.comUse this before oblien tunnel <port> --domain api.example.com.
The command shows:
- Whether the hostname is available
- The TXT record required to prove ownership
- The CNAME / edge target you should point the hostname at
Exact custom hostname flow
To tunnel an exact hostname like api.example.com, leave --slug empty:
oblien tunnel check-domain api.example.com
oblien tunnel 3000 --domain api.example.comThe create call re-checks TXT ownership on the server, so the flow is safe even if DNS changes between the check and the create.
List tunnels
oblien tunnel listDisplays a table with ID, name, port, URL, and status.
Show tunnel details
oblien tunnel status <id>Renew SSL for a custom-domain tunnel
oblien tunnel renew-ssl <id>Use this when the hostname is already connected and you want to force certificate provisioning again after DNS has been fixed.
Delete a tunnel
oblien tunnel delete <id>Prompts for confirmation before deleting.
Examples
# Basic — expose port 3000
oblien tunnel 3000
# Custom slug
oblien tunnel 8080 --slug my-api
# Custom name and domain
oblien tunnel 3000 --name "Dev Server" --domain preview.oblien.com
# Exact custom hostname
oblien tunnel check-domain api.example.com
oblien tunnel 3000 --domain api.example.com
# Force SSL provisioning again after DNS changes
oblien tunnel renew-ssl 42
# Management
oblien tunnel list
oblien tunnel status 42
oblien tunnel renew-ssl 42
oblien tunnel delete 42
# JSON output
oblien tunnel list --jsonSDK usage
The tunnel is also available programmatically via the SDK. See the Edge Tunnel API docs for both the one-liner and two-sided (server generates token, client connects) patterns.