shares.create(port, is_public)
Expose any listening port on the VM. Returns a share_id and URL. Private shares require an access_token header.
shares.create(port=3000) gives you a URL. shares.update(is_public=True) makes it public. custom_domains.create() attaches your domain with automatic DNS verification.
1 API call
Port to URL
Public / private
Toggle
Auto DNS
Custom domains
$client.shares.create(vm_id='vm_4a21', port=3000, is_public=False)
↳share_url: https://shr-991a.instavm.run (private)
$client.shares.update(share_id='shr_991a', is_public=True)
↳share is now public
$client.custom_domains.create(domain='app.example.com', ...)
↳cname_target: shr-991a.cdn.instavm.run
$client.custom_domains.verify(domain_id=...)
#dns verified | tls provisioned
$
Capabilities
Expose any listening port on the VM. Returns a share_id and URL. Private shares require an access_token header.
Flip a share from private to public with one call. Revoke access with revoke=True. No infrastructure changes needed.
Attach a domain to a share. Supports Cloudflare and Route 53 for auto-DNS. Verify with custom_domains.verify() and check health().
Combine with snapshots.create() to build from a Docker image, boot a VM, start your app, and share it — all through the SDK.
SDK reference
1from instavm import InstaVM23client = InstaVM(api_key="sk_instavm_...")45# Boot from snapshot with your app6vm = client.vms.create(wait=True, snapshot_id="snap_abc123")78# Expose port 3000 as a private URL9share = client.shares.create(10 vm_id=vm["vm_id"], port=3000, is_public=False11)12print(share["share_url"]) # Private, needs access_token1314# Make it public15client.shares.update(share_id=share["share_id"], is_public=True)1617# Attach a custom domain18domain = client.custom_domains.create(19 domain="app.example.com",20 share_id=share["share_id"],21 dns_provider="cloudflare",22 dns_credentials={"api_token": "cf_..."},23)24client.custom_domains.verify(domain_id=domain["domain_id"])
How it works
Boot from a snapshot or run setup commands. Start your server on any port. The VM has full Linux — npm start, python app.py, whatever.
shares.create(vm_id=..., port=3000, is_public=False) returns a URL and access_token. Share privately for review first.
shares.update(is_public=True) opens it up. custom_domains.create(domain='app.example.com', share_id=...) routes your domain.
Free tier available. No credit card required. VMs provision in under 200ms.
By clicking Accept, you agree to our use of cookies.
Learn more