---
title: "Add a server"
description: "Add a server to OnePloy: connect a VPS or bare-metal machine over SSH with a key or one-time password, or create one at a cloud provider."
url: https://oneploy.dev/docs/servers/add-server/
type: op_doc
published: 2026-11-02T19:09:48+00:00
updated: 2026-11-02T19:11:23+00:00
author: "admin"
language: en-US
---

# Add a server

> Add a server to OnePloy: connect a VPS or bare-metal machine over SSH with a key or one-time password, or create one at a cloud provider.

To add a server, open **Servers**, create a new server, enter its address and SSH details, and validate it. OnePloy connects over SSH, checks the operating system, installs Docker and Docker Compose if they are missing, and makes the server available for deployments.

## Before you start

- A Linux server that OnePloy can reach over SSH from the internet.
- A user that can run Docker and install packages, usually `root`.
- Ports 80 and 443 open if the server will serve websites.

## How do I add a server I already have?

1. Open **Servers** and add a new server, choosing the manual option.
2. Fill in **Name**, **IP address or domain**, **Port** (usually `22`) and **User**.
3. Choose the **Authentication** method, **SSH key** or **Password** (see below).
4. Tick **Use as a dedicated build server** only if this server should build images rather than run workloads. See [Multiple servers and build servers](https://oneploy.dev/docs/servers/multiple-servers/).
5. Save, then run the validation.

### SSH key or password?

- **SSH key:** pick a private key from **Keys & Tokens** and add its public key to `~/.ssh/authorized_keys` for that user on the server.
- **Password:** enter the **SSH password**. OnePloy uses it once to install a freshly generated key, verifies that key login works, and never stores the password.

## What does validation check?

Validation runs these steps in order and shows the result of each:

1. The server is reachable over SSH.
2. The operating system is supported.
3. Required packages are installed.
4. Docker Engine is installed.
5. Docker Compose is installed.
6. The Docker version is recent enough.

When every step passes, OnePloy creates the default network and starts the reverse proxy.

## How do I create a server on a cloud provider?

OnePloy can create servers directly on Hetzner, DigitalOcean and Vultr with your own API token.

1. Open **Keys & Tokens** and add a cloud provider token.
2. Open **Servers**, add a new server and choose the provider.
3. Pick the location or region, server type or plan, and image.
4. Choose the SSH private key OnePloy should install. For Hetzner you can also attach existing SSH keys, firewalls and private networks.
5. Create the server. OnePloy provisions it with the provider, then validates it like any other server.

You can store reusable cloud-init scripts under **Keys & Tokens** and apply them when creating servers.

## Can I add servers through the API?

Yes:

```bash
curl -X POST https://app.oneploy.dev/api/v1/servers \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"web-1","ip":"203.0.113.10","port":22,"user":"root","private_key_uuid":"KEY_UUID"}'
```

Set `"instant_validate": true` to validate immediately, or call `POST /api/v1/servers/{uuid}/validate` afterwards. The `user` field defaults to `root`. Provider-specific endpoints exist too, such as `POST /api/v1/servers/hetzner`. See the [API overview](https://oneploy.dev/docs/api/) for authentication.

## Troubleshooting

- **Connection refused or timeout:** check the IP, SSH port and any firewall between OnePloy and the server.
- **Permission denied:** check that the public key is in `authorized_keys` for the user you entered.
- **Plan limit reached:** your team’s plan caps the number of servers. Upgrade on the **Billing** page.

---

Source: https://oneploy.dev/docs/servers/add-server/ · OnePloy
