Public database access
Expose a database, connect from outside, and close the public port.
What is public access?
Lexoya databases are only reachable from inside Lexoya by default. Exposing the database opens a public TCP port so you can connect from your own machine or a desktop client.
Public access means anyone with the credentials can reach the database. Only open it when you need an external client.
View connection details
- Open the database.
- Go to Settings.
- Select the General tab.
The Connection details section shows:
- Host
- Port
- Database
- Username
- Password
- Connection URL
Use the Copy buttons to copy each value. Copy connection URL, Copy as .env, and Copy raw JSON help you move the settings into your app quickly.
Internal or external
The Network section has two scopes:
- Internal: the host is the database ID and only works between Lexoya resources.
- External: the host is
id.lexoyacloud.irwith a dedicated port and is reachable from the internet. This option is only enabled after the database is exposed.
Always use the internal address for apps running inside Lexoya.
Expose the database
- In Settings → General, find Public access.
- Click Expose database.
- Read the warning and confirm.
After the port opens:
- Public access switches to On.
- The External scope becomes available.
- The external host and port are shown.
The public port is usually in the 30000+ range.
Close public access
- On the same tab, click Unexpose database.
- Confirm.
The public port closes and external clients lose access. The password does not change, and the internal connection keeps working.
Security
- Do not share the password.
- Close the public port when you are done.
- If the password leaks, change it inside the database and update the stored value under Settings → Access in Lexoya.
Troubleshooting
- External connection fails: make sure Public access is on and External is selected in the network section.
- Internal connection fails: use the internal host (the database ID), not the
.lexoyacloud.iraddress. - Wrong port: the internal and external ports are different; copy the value from the matching network scope.