Publish ports
Reach a server running inside a box from the internet.
A box has a private address behind its host. To reach a server inside it from anywhere, publish its port:
kvbox vm proxy add lab1 3000
# ✓ box lab1 port 3000 is reachable at 203.0.113.5:41822 (tcp)The public port is picked at random and stays the box's until you remove it. The address is the host's public one, or its relay's when the host sits behind a home router: nothing to open on the router.
A box can publish several ports, in one call or later:
kvbox vm proxy add lab1 3000 8080
kvbox vm proxy add lab1 5432
kvbox vm proxy add lab1 9999 --udpUp to 16 per box. In an org, a member publishes ports only on boxes they created; admins and owners on any. Many boxes can publish the same port (every box can have its own 3000); each gets its own public port.
An HTTPS address
A box can claim its own address under kvbox.app, served over HTTPS with a valid certificate. Pick a name nobody has and the box port it serves:
kvbox claim lab1 mylab --port 3000 # short for kvbox vm proxy claim
# ✓ https://mylab.kvbox.app → box lab1 port 3000Names are global and first come, first served: a taken one means you pick another. Then put more of the box's servers under it, as many as you like:
kvbox vm proxy add lab1 8080 --name api # https://api.mylab.kvbox.app
kvbox vm proxy add lab1 5173 --name vite # https://vite.mylab.kvbox.appThe first name under an address waits about a minute for its certificate; after that new names answer at once. WebSockets work, so a dev server's hot reload does too. Point the address at another port with kvbox vm proxy set-port lab1 4000, drop one name with kvbox vm proxy rm lab1 --name api, and give the whole address up with kvbox vm proxy release lab1. Removing the box frees it too.
More than one address
A box can hold up to five addresses of its own, each serving its own port. That suits a dev box that runs several projects at once:
kvbox claim dev shop --port 3000 # https://shop.kvbox.app
kvbox claim dev blog --port 5173 # https://blog.kvbox.app, same boxOnce a box has more than one, set-port, release, and add/rm --name need --sub to say which address they mean: kvbox vm proxy set-port dev 4000 --sub blog, kvbox vm proxy release dev --sub shop. A top-level address answers at once (no certificate wait), so a second project is often better as its own address than as a name under the first.
Only HTTPS goes under the name: raw TCP and UDP ports stay on the host's address and their random port.
See and remove them
kvbox vm proxy ls # every box, raw ports and HTTPS names
kvbox vm proxy ls lab1
kvbox vm proxy rm lab1 3000When the box is not running
A visit to the HTTPS address of a hibernated or paused box wakes it and then serves the page, after a few seconds the first time. A visit wakes a box at most once a minute, and never when your account is out of credit. A stopped box is never started this way: its address shows a "box is stopped" page until you run kvbox start. Ports close when the box stops or hibernates and open again, on the same public ports, when it starts or wakes, including after the host reboots. A port added to a stopped box opens when it next runs. A box made from a snapshot starts with no published ports and no HTTPS address.
Anyone who has the address can connect: put a login in front of anything private.