MicroVM Networking and Access
Last verified 16 Nov 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 its own authenticated HTTPS URLs. You choose public or VPC networking for outbound traffic when you create the MicroVM, and with public networking you can limit outbound traffic to the destinations you allow. The API, doctl, and requests to a MicroVM’s URLs all authenticate with a DigitalOcean token.
URLs
Each MicroVM gets a default HTTPS URL for its HTTP port, in the following form:
https://<your-microvm-id>.<region>.microvm.ondigitalocean.comThe URL serves HTTP or HTTP/2 on the MicroVM’s HTTP port, which you set at creation. The hostname is empty until provisioning finishes. To create a MicroVM without a default URL, set ingress to false in the API or pass --ingress=false in doctl.
You can add up to nine more URLs, for a total of 10. Each URL routes to one of the MicroVM’s ports and has its own hostname. The hostname of a removed URL is never reused. For how to find, add, and remove URLs, see How to Send Requests to a MicroVM.
Every request to a URL needs a token in the Authorization header. The platform does not accept tokens anywhere else, such as in a cookie or query parameter, so a browser that opens a URL directly gets HTTP 401. The platform checks the token before the request reaches the MicroVM, then removes the Authorization header and DigitalOcean’s identity headers. Your application never receives the caller’s token.
Ports
You can declare up to five ports at creation, including the HTTP port, with ports in the API or --ports in doctl. The default URL reaches the HTTP port. To reach another declared port, add a URL for it. You cannot change the set of ports after creation.
Public and VPC Networking
Public networking is the default. Outbound traffic from the MicroVM uses a shared NAT gateway.
VPC networking places the MicroVM in a VPC network in the same region. The VPC network must belong to your team. If you do not choose one, the MicroVM uses your team’s default VPC network in the region, which is created the first time you need it. A MicroVM in a VPC network has no internet access unless the VPC network has a NAT gateway.
MicroVMs do not support IPv6, Cloud Firewalls, or a public IP address on the MicroVM.
Outbound Policies
A MicroVM with public networking can have an outbound policy, which limits the destinations the MicroVM can connect to. You set the policy at creation, and you cannot change it afterward. MicroVMs created from a checkpoint inherit it.
A policy contains up to 50 rules and a default action. Each rule allows one destination:
- An exact hostname, such as
api.example.com. - A wildcard, such as
*.example.com, which matches subdomains ofexample.combut notexample.comitself. - An exact IPv4 address, such as
203.0.113.5. CIDR ranges are not supported.
Rules match the destination host only. They do not consider the port, path, or HTTP method. A hostname that resolves to an allowed IP address does not match an IP rule. The default action, deny unless you set allow, applies to every destination that no rule matches.
A MicroVM with an outbound policy sends its outbound traffic through a platform proxy, which the platform sets in the HTTP_PROXY and HTTPS_PROXY environment variables. As a result:
- Only HTTP and HTTPS work, and only from clients that use these variables. SSH, database connections, and other TCP or UDP traffic fail, even to allowed destinations.
- A blocked HTTP request gets an HTTP 403 response from the proxy. A blocked HTTPS connection is closed.
- The registries that serve the MicroVM’s container image are allowed automatically, so the image can always be pulled.
A policy can also hold up to 16 credentials. A credential is a secret, such as an API key, attached to one exact hostname and an optional path prefix. When the MicroVM sends an HTTPS request to that host, the platform adds the secret in the Authorization header. The secret is stored outside the MicroVM, so code in the MicroVM cannot read it. To add the header, the platform intercepts HTTPS connections to that host with its own certificate authority, so clients must trust that authority, and clients that pin certificates fail. Credentials are available only in MKC1.
For how to set an outbound policy and credentials, see How to Restrict a MicroVM’s Outbound Traffic.
Access Tokens and Scopes
You can authenticate requests to a MicroVM’s URLs in two ways:
- Team API tokens with the
microvm:accessscope can reach every MicroVM on your team. - MicroVM access tokens can reach only the URLs of the MicroVM they belong to. They cannot call the DigitalOcean API, run commands, open a console, or transfer files. A MicroVM can have up to 10. See How to Create Access Tokens for a MicroVM.
MicroVM access tokens do not restrict team API tokens. A team token with microvm:access still reaches a MicroVM that has access tokens.
If you use a custom-scoped token for the API or doctl, grant it the microvm scopes you need:
| Scope | Allows |
|---|---|
microvm:create |
Create MicroVMs and checkpoints. |
microvm:read |
List and get MicroVMs, checkpoints, create options, and access tokens. |
microvm:update |
Update, pause, and resume MicroVMs, add and remove URLs, create and revoke access tokens, run commands, open the console, and upload and download files. |
microvm:delete |
Delete MicroVMs and checkpoints. |
microvm:access |
Send requests to any MicroVM’s URLs. |