Skip to content

droneship expose

Share an app running in a sandbox at a private link.

Only people signed in to Droneship in the same project can open the link. When the sandbox has stopped, opening the link starts it again (with –start).

Terminal window
droneship expose [OPTIONS] PORT
Argument Description
PORT The port your app listens on in the sandbox
Option Description Default
--sandbox, -s ID Which sandbox (see droneship list)
--start CMD How to start the app again after the sandbox stops, run in the repo (for example “npm run dev”). Without it, the link stops working when the sandbox stops.

Find the sandbox id, then share the app listening on port 3000 in it:

Terminal window
droneship list
droneship expose 3000 --sandbox <sandbox-id>

The CLI prints the private link and the command that turns it off:

Private link for port 3000: https://<link-id>.<apps domain>
people signed in to this project can open it
when the sandbox stops, this link stops working: add --start CMD so opening it starts the app again
turn it off: droneship unexpose <link-id>

Keep the link working after the sandbox stops. Opening it then starts a new sandbox from the same launch settings and saved workspace, and runs the command in the repo:

Terminal window
droneship expose 3000 --sandbox <sandbox-id> --start "npm run dev"

Starting again needs a sandbox that cloned a repo and keeps a saved workspace. For an --ephemeral sandbox, or a directory copied in with --local, the link stops working when the sandbox stops, even with --start, and the CLI says so.

Exposing a port that already has a link returns the same link, and --start updates its start command.

App links are turned on per account. Where they are off, the service answers app links are not available on this account.


Generated from the CLI. Verified against droneship 1.19.0 plus forge#459.