Skip to main content
Give a web app, API, or agent service a public address such as https://my-service.boxliteapp.com. Visitors use that address while BoxLite routes requests to a port inside your box. The domain belongs to your organization. You can move it to another box without changing the address your clients use.
This guide uses a subdomain you choose under BoxLite’s domain. Attaching a domain you own, such as api.your-company.com, is not supported by this flow. No DNS records or TLS certificates need to be configured for the BoxLite-provided address.

Before you start

Install the latest CLI in your local terminal:
Create an API key in the console, then sign in:
Paste your key at the prompt. app is the saved context used throughout this guide. Use the same organization in the console and CLI.

Publish your service

1

Reserve your domain

In the console, open Domains, then Request domain. Enter a short name, such as my-service, and review the Full domain preview before submitting.Choose an available name using lowercase letters, digits, and hyphens. The page shows your organization’s name-length requirement and remaining allowance.Copy the full hostname into your terminal, replacing the placeholder below. Include neither https:// nor a port:
For example, if you reserved my-service, the production hostname is my-service.boxliteapp.com. Use the hostname actually returned by your environment.Already have a domain? Reuse it instead of requesting another:
Reserving a name uses your organization’s domain allowance. Unbinding it later keeps the name reserved and does not free that allowance.
2

Choose the service to expose

Set the box ID or name and the port your service listens on inside the box:
Replace 29090 with your service’s port. The service must listen on 0.0.0.0, rather than only 127.0.0.1.
3

Open the port and bind the domain

The tunnel command registers the port for public access and prints its generated URL. The bind command gives that port your chosen hostname and prints its HTTPS URL.All three pieces are required: inbound access, a public tunnel for the port, and the domain binding. Binding alone does not make a service public.This is a public endpoint. If your service needs sign-in or API authentication, enforce it in the application.
4

Open your fixed URL

Open https://<YOUR_FULL_DOMAIN> in your browser, or request it from your terminal:
The header skips the preview notice for scripted requests; it does not grant access or bypass your application’s authentication.You should receive your service’s response. For the sample server, look for Directory listing for /. Share this HTTPS address with your clients; they do not need the box ID or internal port.

Move the service without changing its URL

Start your service on the replacement box first. Then open its port and bind the same domain to it:
New requests to the fixed URL now reach the replacement service. You do not need to unbind first or reserve another name. This changes routing; it does not copy files or application state. Prepare any data the new service needs before switching. See Data across boxes.

Optional: wake the box on a request

You can keep the service running continuously, or let the box stop between requests. The fixed domain works with either approach. For request-triggered startup, leave Wake on access enabled and save your service as the box’s startup command. The sample above already does this. A server started only in an interactive session may not return after a restart. To try it, stop the box, wait until the console shows Stopped, and request the same URL:
The request starts the box and reaches the service. Allow extra time for startup on the first request. For automatic idle stopping, choose a nonzero --auto-stop interval when creating the box. See Stop when idle and Wake on access.

Unbind or close public access

To stop routing the domain while keeping it for later:
New requests to the domain return 404. The name remains reserved, and the list shows no target. Unbinding leaves the generated tunnel URL accessible. To close public access to that port as well:
If you created the sample box and no longer need it, delete it:
Deleting a box does not release its domain or automatically clear its binding. Unbind or point the domain at another box explicitly.

Troubleshooting