Creating a private repository for your image
We provide a private image registry you can push images to with each service. To make use of it you can start by creating a service and configuring it:
Replicas
to 0 to avoid starting the service and incurring costs before we have pushed the image.
Now you can click on Create:



Configuring docker to use Nhost’s registry
The CLI can configure docker automatically to be able to push and pull images from the docker registry. To do so you need to run the following command:The credentials helper will authenticate requests with the logged in user, so don’t forget to authenticate with your user before trying to push or pull images. You can log in by running the command
nhost login
.Updating the image in the service configuration
After you have pushed your image you can click on your service again and update the configuration:
:123
to the image that was already pre-populated and that we increased replicas to 1
to unpause the service. Don’t forget to copy the URL where we are exposing the service. Now you can click on update:


Using your own private registry
If you are publishing your images in your own private registry you can add pull credentials to your Run configuration so the image can be pulled successfully. To do so follow the next steps:- Figure out the credentials you need. This might depend on your registry. For instructions on various registries see the next section.
- The credentials will be similar to:
- Create a secret under Settings -> Secrets with the contents of the auth section. For instance:

- Configure the
pullCredentials
in your run configuration.
Docker Hub Credentials
To create a credential that allows you to pull private images from Docker hub follow the next steps:- Login to https://hub.docker.com with a user that can pull the image you want.
- Head to “Account Settings” -> “Personal access tokens”
- Create a new token with “Read Only” access permissions
- Copy the token you got