On a server on the internet
This page helps when Envoryx doesn’t sit in your home network but on a server anyone on the
internet can reach, your own or one a hoster manages for you. At home it doesn’t matter much that
shop.test is open to everyone who can type the address, because everyone is you. On a server it
does: a half-finished shop, a phpMyAdmin that’s signed in to the database and a debug port that
runs any code you send it are all one guessed address away. Envoryx 0.43 brings a few switches
for that, and this page shows how they fit together.
Keep the projects behind the Envoryx sign-in
Section titled “Keep the projects behind the Envoryx sign-in”The setting that matters most is Domains → Rules → Only people signed in to Envoryx. With it, the project’s host names, its extra domains and its dev server only let in people who may see the project in Envoryx, viewers included. Everyone else lands on the Envoryx sign-in first and comes back to the page they asked for. Webhooks and monitoring still get through, with Open paths or an API token; the rules explain both.
You don’t have to remember it for every new project. Settings → Domains & HTTPS → Who sees new projects starts new ones that way. Projects that already exist keep their rules, so after switching it on, look through the project list: projects behind the sign-in have a small lock next to their name.
Let the customer in with a guest link
Section titled “Let the customer in with a guest link”Your customer wants to click through the staging site but has no Envoryx account, and shouldn’t need one. Make a guest link under Domains → Guest links and send it. It opens the project’s host names and its dev server for 1 to 90 days, nothing else, and you can revoke it any time.
A share still works too, but it’s a different thing: a public tunnel address with no Envoryx sign-in at all, only the basic authentication from the rules. On a server that’s already reachable, a guest link is usually what you want.
Addons and service web UIs
Section titled “Addons and service web UIs”phpMyAdmin, pgAdmin, Keycloak and every other addon
with a web UI only let in people signed in to Envoryx who may work on the project, that is
developers and admins. The same goes for the web interfaces of the built-in services, which now
have addresses through the proxy: shop-mailpit, shop-rabbitmq, shop-opensearch-dashboards
and shop-s3-console under your base domain. shop-meilisearch is the exception; it stays open,
because Meilisearch checks its key itself and the application’s pages may call it. You don’t
have to switch anything on here, it’s always like that.
Host ports only on the server itself
Section titled “Host ports only on the server itself”Every project also has host ports: the web server’s own port, the database when you publish it, Mailpit, the debug ports. At home that’s convenient, your database client or debugger connects straight to them. On the internet they’re a door for everyone, since Mailpit, the OpenSearch Dashboards and the debug ports ask for no password at all.
ENVORYX_HOST_PORTS=local makes them listen on 127.0.0.1 only. The projects are still reachable
through the proxy by their host names, so the browser side doesn’t change. all publishes them
on every interface. On an instance a hoster manages (one with a plan or a fleet manager) local
is the default; everywhere else it’s all. If you run your own server, I’d set local yourself,
or put a firewall in front if you keep all.
The binding is fixed when a project’s containers are created. Projects that were running when you changed the variable keep the old one and say the … container runs with an older setup until you restart them.
Desktop clients and debuggers through SSH
Section titled “Desktop clients and debuggers through SSH”With the ports on 127.0.0.1, your database client and your debugger reach the services through the project’s SSH login instead, by the names the application uses for them:
ssh -N -L 3306:database:3306 -p 2222 shop@your-serverLeave that running and connect the client to localhost:3306. The IDE section shows the ready
command for the databases and the debug ports, and IDE integration
has the details. No JetBrains Gateway needed for this.
On a managed instance
Section titled “On a managed instance”If a hoster manages your instance, most of this is already set: the host ports listen locally, and new projects start behind the sign-in. The hoster’s plan can also fix Who sees new projects, keep every project behind the sign-in, or leave out public shares; the managed instances page has what each of those does.