---
url: https://docs.hostly.ninja/getting-started/deploy-service.md
---
# Deploy your first service

The deployment wizard creates a service from a Docker image.

## Method

Here you can choose with which method you want to deploy your new service. Currently we only support the Web UI Method, but we are hard at work to get the MCP based deployment up and running asap!

## Subdomain

Choose the free Hostly subdomain for the service. This is the address users will open after the deployment is running.

### Service name

Every service needs a service name that is unique within the workspace. For a Hostly subdomain, the wizard prefills it from the subdomain, but you can choose a different one. Use lowercase letters, digits, and hyphens.

Other services of your workspace reach this service at `<service-name>:<port>`. The service name **can never be changed** after the service is created, so choose it carefully. See [Service name](../concepts/service.md#service-name).

### Only reachable internally

Enable **Only reachable internally** for services that must not be public, such as databases, caches, or queues. The service then gets no subdomain, and SSL does not apply. Only other services of your workspace can reach it via its service name. See [Use Cases and Examples](../use-cases/index.md).

### SSL and high availability

Keep SSL enabled unless you have a specific reason to test without HTTPS. High availability will increase resource usage, so we recommend you only enable this when you need the extra availability.

## Image

Enter the full Docker image URL. Public images can be checked directly. For private registries, add registry credentials when Hostly asks for them.

Images that you pushed to the Hostly Registry appear under **Hostly Images** in the image selector.
Select an image and tag from the list. Hostly can access these images without separate registry
credentials. If the list is empty, follow [Push your first image](./push-first-image.md).

When you want to use an image from dockerhub, e.g. `https://hub.docker.com/r/neosmemo/memos` you need to remove the first portion of the link. So it then becomes: `neosmemo/memos:<version>`

Examples of valid docker urls:

```text
nginx:latest
ghcr.io/example/my-service:1.0.0
registry.example.com/team/app:2026-07-21
registry.hostly.ninja/acme/api:1.4.2
```

## Port

Hostly needs to know which port your application listens on inside the container

For example, if your app starts a web server on `3000`, enter `3000`. Hostly will take care of wiring the public ports for HTTPS/HTTP Traffic to this port. We are also working on extending the available protocols.

Other services of your workspace reach the service on this port as well, at `<service-name>:<port>`.

### Services without port

Background workers that only connect to other services, but never accept connections themselves, do not need a port. Check **This service has no port** in that case. Such a service is reachable neither publicly nor by other services, so only use this option for workers. See [Background worker with a queue](../use-cases/background-worker.md).

::: tip
Need extra ports? Let us know!
:::

## Configuration

Use configuration only when your image needs it.

* **Environment variables** are plain `KEY=VALUE` settings.
* **Secrets** store sensitive values and can be referenced from environment variables.
* **Files** upload configuration files and mount them at a path inside the container.
* **Volumes** add persistent storage. *Only available on paid tier*

### Environment & Secrets

Example environment variables:

```dotenv
NODE_ENV=production
PORT=3000
DATABASE_URL=my-database.example.com
DATABASE_PASSWORD=${POSTGRES_PW}
```

In the example the shown variable `DATABASE_PASSWORD` is referenced from a secret stored in Hostly. When your image is deployed, Hostly will retrieve the secret value from it's encrypted vault, and inject the value into the environment variable `DATABASE_PASSWORD` as specified.

### Files

Some applications require config files to run properly, or maybe you want to supply some other files to your application that are not contained in the docker image.

Click on "Add" and select the files you want to provide. **Note: Files can only be 1MB max!**. After uploading you can then define the path, where the file should be available inside of your docker image, e.g.: `/app/config.yaml`

### Volumes (Paid tier only)

Some applications need to store files and other data on disk, and need this to be available after a restart. To enable this we support adding volumes to your service.

By clicking "Add" a new volume specification will be created. You can then define the path where it should be available in the docker image, as well as the desired size. The size has to be a minimum of 1 GB.

Volumes are billed per GiB per Day, so 1 Gib for a Day = 1 Gib/d in your usage.

::: warning Behaviour on stopping/pausing
When you pause a service, the persistent volume will remain for a later point in time. You will be billed for this duration. When a service is stopped all remnants of the service including the volume are removed, and your data is lost.
:::
