How to Send Requests to a MicroVMpublic
Last verified 9 Oct 2026
DigitalOcean MicroVMs are lightweight virtual machines that run a container image in an isolated kernel, pause automatically when idle, and resume on the next request with memory, files, and processes intact.
Each DigitalOcean MicroVM serves its container over an authenticated HTTPS endpoint. A request to the endpoint resumes a paused MicroVM when auto-resume is on.
Prerequisites
- A running or paused MicroVM. See How to Create a MicroVM.
- A personal access token with only the
microvm:accessscope, exported as theDIGITALOCEAN_TOKENenvironment variable. Use this token only for endpoint requests.
Find the MicroVM’s Endpoint
A MicroVM’s endpoint has the following form:
https://<your-microvm-id>.<region>.microvm.ondigitalocean.comYou can find the endpoint’s hostname in any of the following places:
- Control Panel: Under Endpoint on the MicroVM’s Overview tab.
- doctl: In the Endpoint column of
doctl compute microvm get <your-microvm-id>. - API: In the response’s
urlsarray, in the entry withdefaultset totrue.
The hostname is empty, and the API entry’s status is PENDING, until provisioning finishes. The endpoint is ready when status is ACTIVE.
Send a Request to the HTTP Port
Send the request with your API token in the Authorization header. This example requests the default page of a MicroVM running nginx in MKC1:
curl -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://<your-microvm-id>.mkc1.microvm.ondigitalocean.com"If the MicroVM is paused and auto-resume is on, the request resumes it and waits until it is running. If auto-resume is off, resume the MicroVM before you send requests.
The endpoint reaches only the HTTP port. Other ports you declare at creation are not reachable during the public preview.