Guides

Expose a port

Make an app public or private and set the ports it listens on.

New apps are public and listen on the ports LILY detected in your code. This guide changes both settings. Networking explains how requests reach an app.

Before you start

  • A deployed app. The examples use cinderrock.

Steps

Make the app public or private

Open the app, select the Network tab and select Make app private or Make app public. The console marks public apps with a globe and private apps with a lock.

lly network cinderrock expose
lly network cinderrock hide

The change takes effect immediately, without a deploy.

Add or remove a service port

Ports use TCP unless you mark them as UDP. Ports below 1024 are ignored.

On the Network tab under Ports, enter the port, for example 8080, choose TCP or UDP and select Add. To remove a port, close it in the same list.

lly network cinderrock add-port 9090
lly network cinderrock add-port 5353/udp
lly network cinderrock remove-port 9090

Redeploy to apply port changes

Port changes take effect with the next deploy.

lly redeploy cinderrock

Check that it worked

lly network cinderrock

A public app answers at https://cinderrock.lilylabs.app. The address of a private app does not resolve.

If it does not work

What you seeCauseFix
The address does not resolveThe app is privatelly network cinderrock expose. See The app has no address.
The new port does not answerThe app was not redeployed after the changelly redeploy cinderrock
remove-port asks about connectionsOther apps are connected on this portConfirm to remove those connections as well, or keep the port
Exit code 4The port does not exist on this appCheck with lly network cinderrock

More messages and their fixes: Troubleshooting.

Use an agent

On my LILY app "cinderrock", add service port 9090 and keep the app private.
Run `lly network cinderrock add-port 9090`, `lly network cinderrock hide`, then `lly redeploy cinderrock`,
and show me the output of `lly network cinderrock`.

Next steps

On this page