Quick Start with DigitalOcean 
Deploy and manage your DigitalOcean infrastructure with Meshery. You can run Meshery on DigitalOcean in two ways: out-of-cluster using Docker on a Droplet, or in-cluster on a DigitalOcean Kubernetes (DOKS) cluster. Note: We recommend installing Meshery in your DOKS cluster.
Prerequisites
- Install the Meshery command line client, mesheryctl.
- Install kubectl on your local machine.
- Install the DigitalOcean CLI (doctl), authenticated for your account.
- A DigitalOcean account with access to either a Droplet or an active DOKS cluster.
Also see: Install Meshery on Kubernetes
Available Deployment Methods
Option 1: Docker on a Droplet (Out-of-Cluster)
Run Meshery as a standalone management plane on a DigitalOcean Droplet with Docker. This out-of-cluster deployment suits managing one or more remote clusters from a single, always-on host.
Provision a Droplet
Create an Ubuntu Droplet from the DigitalOcean Control Panel, or with doctl:
doctl compute droplet create meshery --image ubuntu-22-04-x64 --size s-2vcpu-4gb --region nyc1 --ssh-keys [YOUR_SSH_KEY_FINGERPRINT]
Give the Droplet at least 2 vCPUs and 4 GB of memory. When the Droplet is ready, connect to it over SSH:
ssh root@[DROPLET_IP]
Install Docker and Docker Compose on the Droplet, followed by mesheryctl.
Install Meshery on Docker
On the Droplet, start Meshery on Docker:
mesheryctl system start -p docker
To manage a remote cluster, such as a DOKS cluster, from this out-of-cluster deployment, make the cluster’s kubeconfig available to Meshery: upload it in Meshery UI under Lifecycle > Connections, or see Customizing Kubernetes Configuration Location.
Access Meshery UI
By default, Meshery UI listens on port 9081. To reach it from your browser, allow inbound traffic to that port with a DigitalOcean Cloud Firewall:
doctl compute firewall create --name meshery-ui --inbound-rules "protocol:tcp,ports:9081,address:[YOUR_IP]/32" --droplet-ids [DROPLET_ID]
Open your browser and navigate to http://[DROPLET_IP]:9081.
Avoid exposing Meshery UI to the public internet. Restrict the firewall rule to your own IP address, or keep port 9081 closed and reach the UI through an SSH tunnel instead: ssh -L 9081:localhost:9081 root@[DROPLET_IP].
Option 2: DigitalOcean Kubernetes (In-Cluster)
Follow the steps below to install Meshery into your DigitalOcean Kubernetes (DOKS) cluster.
Preflight: Cluster Connectivity
- Authenticate
doctlwith your DigitalOcean account using a personal access token.
2. Download your cluster’s credentials and make it the currentdoctl auth init
kubectl context. Replace [CLUSTER_NAME] with the name or ID of your DOKS cluster.3. Verify your kubeconfig’s current context.doctl kubernetes cluster kubeconfig save [CLUSTER_NAME]
kubectl config current-context
Installation: Using mesheryctl
Run mesheryctl system start to deploy Meshery to your DOKS cluster. The -p kubernetes flag deploys to Kubernetes regardless of your mesheryctl context’s platform.
mesheryctl system start -p kubernetes
If mesheryctl reports an authentication error, sign in with mesheryctl system login. See Authenticate with Meshery via CLI.
Installation: Using Helm
To install Meshery with Helm 3, see the Helm Installation guide.
Post-Installation Steps
Optionally, verify the health of your Meshery deployment with mesheryctl system check.
Meshery creates the meshery service as type LoadBalancer by default, so DigitalOcean provisions a DigitalOcean Load Balancer and assigns it an external IP. Alternatively, use port-forwarding by following the mesheryctl system dashboard guide.
You’re ready to use Meshery. Open Meshery UI in your browser.
Accessing Meshery UI
Once Meshery is running, mesheryctl system start opens Meshery UI in your default browser. On Docker, Meshery UI listens at http://localhost:9081 by default. On Kubernetes, mesheryctl opens the address of the meshery service in the meshery namespace, which the Helm chart creates as a LoadBalancer service on port 9081.
To open Meshery UI in your default browser at any time, run:
mesheryctl system dashboard
If your cluster does not give the meshery service a reachable address, forward a local port to Meshery instead. By default, mesheryctl listens on local port 9081; use -p to choose another port.
mesheryctl system dashboard --port-forward
You can also port-forward with kubectl:
kubectl port-forward svc/meshery 9081:9081 --namespace meshery
Verify Kubernetes Connection
Whichever way you installed Meshery, verify that Meshery is connected to your cluster:- In the Meshery UI, navigate to Lifecycle from the menu on the left.
- Select Connections.
- Ensure that your cluster appears in the list of connections and is marked as
Connected. - Click the cluster name to run a connectivity test and confirm that Meshery can reach your cluster.
Customizing Your Meshery Provider Callback URL
You can customize the callback URL that your Meshery Provider redirects to after sign-in. This helps when Meshery runs behind several layers of networking infrastructure.
For production deployments, we recommend that you expose Meshery UI through a reverse proxy or a load balancer. A custom callback URL makes sure that sign-in completes even when requests pass through several routing layers.
Note: For production deployments, use a Remote Provider so that you control which identity providers can sign users in. Learn more about this in the Extensibility: Providers guide.
To set a custom callback URL, set the MESHERY_SERVER_CALLBACK_URL environment variable when you start Meshery:
MESHERY_SERVER_CALLBACK_URL=https://custom-host mesheryctl system start
On Kubernetes, Meshery UI is then available at the EXTERNAL-IP of the meshery service. Run kubectl get svc meshery -n meshery to find it.