Skip to main content

How to connect to Zerops VPN

To start the VPN you need first install & setup zCLI, the Zerops command-line tool.

Start the VPN

Use zcli vpn up command to start a VPN session to the selected project.

Usage:
zcli vpn up [projectId] [flags]

Flags:
--auto-disconnect If set, zCLI will automatically disconnect from the VPN if it is already connected.
-h, --help the vpn up command.
--projectId string If you have access to more than one project, you must specify the project ID for which the
command is to be executed.

You must enclose the project name in quotes if it contains a space. The project name is visible in Zerops GUI. If you have more projects with a duplicate name, use the project ID instead. You'll find the project ID in the URL of the project dashboard page in Zerops GUI.
E.g. https://app.zerops.io/project/Evs8Je4NTvKeIkUqoUXp2w/service-stacks.

When you run the zcli vpn up command for the first time, you will be asked if you want to install the Zerops VPN daemon to your computer. Confirm the installation by entering y. Then zCLI prompts for your root/administrator password to your computer.

The zCLI starts a VPN session in the selected Zerops project. You can't be connected to multiple projects at the same time. If an existing VPN connection to another project is active, it will be stopped automatically and a new VPN connection will be opened.

Once the VPN session is established, you have the secured connection to the project's private network in Zerops. You can access all project services locally by using their hostname. The only difference is that no environment variables are available when connected through VPN.

Zerops VPN daemon keeps the VPN connection open during the whole VPN session until you stop it. If the connection is lost, the daemon tries to restore the connection automatically.

Stop the VPN

Use zcli vpn down command to stop the existing VPN session.

Usage:
zcli vpn down [flags]

Flags:
-h, --help the vpn down command.