Deploy a Docker container on Nept
Nept runs any Docker container image. This guide covers deploying containers from public and private registries, exposing ports, mounting volumes, and setting environment variables.
Prerequisites
- A Nept account.
- A Docker image on a registry (Docker Hub, GitHub Container Registry, or a private registry) — or a Dockerfile in a repository.
Option A: Deploy from an image
- Go to Deploy Docker in the dashboard.
- Enter your image reference, e.g.
ghcr.io/acme/api:latest. - Add authentication if the registry is private.
- Configure ports, volumes, and environment variables.
- Click Deploy.
Option B: Deploy from a Dockerfile in GitHub
- Connect GitHub.
- Create a new project from a repository containing a
Dockerfile. - Nept builds the image on every push and deploys the result.
Ports
Expose the port your app listens on inside the container. Nept publishes it on a .nept.cloud URL with automatic HTTPS, and you can attach a custom domain.
Volumes
Attach a persistent volume to keep data across restarts:
terminal
Mount path: /var/lib/postgresql/data
Size: 10 GB
Volumes are the right choice for databases, file uploads, and any stateful workload.
Environment variables
Configure per-container env vars from the dashboard or CLI. See Environment Variables.
Private registries
To pull from a private registry, add registry credentials in your project settings. Nept encrypts credentials at rest and uses them at pull time only.