Fundamentals

Networking

Public and private apps, service ports and connections between apps.

Each app has three network settings. They are on the Network tab of the app and in lly network.

SettingDescription
Public accessWhether the app is reachable from the internet at its address
Service portsThe ports the app listens on
ConnectionsThe apps this app may call, and the apps that may call it
Internet
browser, client
https
copperfox
copperfox.lilylabs.app
:8080
cinderrock
cinderrock.lilylabs.app
copperfox is public. cinderrock is private and accepts calls only from copperfox on port 8080.

Public and private

New apps are public: their address resolves on the internet and requests reach the app.

A private app keeps its address, but the address no longer resolves publicly. Requests from the internet are answered as if the app did not exist. Only apps with a connection to it can reach it. Use private apps for APIs, workers and other internal services.

Step by step: Expose a port.

Changes take effect without a deploy. The console marks public apps with a globe and private apps with a lock.

Request routing

copperfox.lilylabs.app
DNS
LILY edge
resolves the app
Machine
runs the app
copperfox
Live
Path of a request to a public app.

The address points to the LILY edge. The edge resolves the app for the hostname and the machine running its live deployment, then forwards the request. It responds only for public apps with a live deployment. Custom domains use the same path after verification.

Service ports

Service ports use TCP unless marked as UDP. LILY detects them in your code, for example from listen(3000), -p 3000 in package.json or PORT=3000 in a .env file. You confirm them during configuration. Ports below 1024 are ignored.

Port changes take effect with the next deploy.

Connections

A connection, also called an edge, allows one app to call another app on one port. Apps without a connection cannot reach each other.

Step by step: Connect two apps.

WhereHow
ConfigurationLILY proposes connections it detects in your code, for example API_URL=http://api:8080 in the web app. Confirm or remove them.
CanvasDrag from the calling app to the called app. The line shows the port.
Network tabOutbound lists the apps this app may call, Inbound the apps that may call it.
CLIlly network connect copperfox cinderrock --port 8080

A connection must target a service port of the called app. Connections take effect without a deploy.

On this page