> ## Documentation Index
> Fetch the complete documentation index at: https://help.freakhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Install Nextcloud with Docker on a VPS (AIO)

> Install Nextcloud with Docker on a VPS using Nextcloud All-in-One: start the mastercontainer, open https://your-ip:8080, enter your domain and start it.

To install Nextcloud with Docker on a VPS, use Nextcloud All-in-One (AIO). Point a domain at your server, start the `ghcr.io/nextcloud-releases/all-in-one:latest` mastercontainer with ports 80, 8080 and 8443, then open `https://your-server-ip:8080`. Note the passphrase, enter your domain and click **Start containers**. AIO sets up Nextcloud, the database, HTTPS and backups for you.

| Difficulty | Time | Works on | Needs |
| - | - | - | - |
| Intermediate | 30 minutes | Ubuntu, Debian, AlmaLinux, Rocky Linux (x86\_64 or arm64) | [Docker](https://help.freakhosting.com/portals/other/how-to-install-docker.md) (not snap), a domain, ports 80, 443 and 8080 open |

## Before you start

* **Install Docker from Docker's official repository.** AIO does not support the Ubuntu snap package. Check with `sudo docker info | grep "Docker Root Dir"`; if it shows `/var/snap/docker/`, reinstall Docker first.
* **Have a domain or subdomain**, for example `cloud.example.com`, with an `A` record pointing to your server. Nextcloud does not work on a bare IP address. See [point a domain to your server](https://help.freakhosting.com/portals/other/how-to-point-a-domain-to-your-server.md).
* **Use a fresh server with nothing on ports 80 and 443.** These steps assume no other web server or reverse proxy. If you already run Nginx, Apache or Caddy, follow the [AIO reverse proxy guide](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md) instead.
* AIO recommends SSD storage and a KVM VPS or dedicated server. AIO is free for up to 100 users.

## Which ports does Nextcloud AIO need?

| Port | Used for | Open it? |
| - | - | - |
| 80/TCP | Certificate validation (Let's Encrypt) | Yes |
| 443/TCP | Nextcloud itself | Yes |
| 443/UDP | HTTP/3 | Optional |
| 8080/TCP | AIO admin interface, self-signed certificate | During setup, from your IP |
| 8443/TCP | AIO admin interface with a valid certificate | Optional |
| 3478/TCP and 3478/UDP | Nextcloud Talk (TURN) | Only if you enable Talk |

If you use `ufw` or `firewalld`, also allow these ports there. See [set up a firewall with UFW](https://help.freakhosting.com/portals/other/how-to-set-up-a-firewall-with-ufw.md).

## How to install Nextcloud All-in-One

**1. Start the mastercontainer**

```bash theme={null}
sudo docker run \
  --init \
  --sig-proxy=false \
  --name nextcloud-aio-mastercontainer \
  --restart always \
  --publish 80:80 \
  --publish 8080:8080 \
  --publish 8443:8443 \
  --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
  --volume /var/run/docker.sock:/var/run/docker.sock:ro \
  ghcr.io/nextcloud-releases/all-in-one:latest
```

Keep the container name `nextcloud-aio-mastercontainer`; AIO's self-updates depend on it. The command stays attached to the log; press Ctrl+C once the log settles. The container keeps running.

**2. Open the AIO interface by IP**

Open `https://203.0.113.10:8080` with your server's IP, not your domain. Accept the self-signed certificate warning.

**3. Save the passphrase**

AIO shows a passphrase. Store it in your password manager; you need it to log in to the AIO interface later.

**4. Enter your domain**

Log in, enter `cloud.example.com` and submit. AIO checks that the domain points to this server and that port 443 is reachable.

**5. Choose options and start**

Pick the optional apps you want (for example Office or Talk), then click **Start containers**. The first start downloads several images, so it takes a while.

**6. Log in to Nextcloud**

When all containers are running, the AIO interface shows the initial Nextcloud admin username and password. Open `https://cloud.example.com` and log in.

> [!WARNING]
>
> Port 8080 is the admin interface for your whole Nextcloud install. Docker-published ports bypass `ufw`, so a `ufw deny` rule does not close it. Use a long passphrase and keep AIO up to date.

## How to check it worked

```bash theme={null}
sudo docker ps --format "table {{.Names}}\t{{.Status}}"
```

You see `nextcloud-aio-mastercontainer` plus the Nextcloud containers, such as `nextcloud-aio-nextcloud` and `nextcloud-aio-database`, all `Up`. In the AIO interface every container shows as running.

## How to update Nextcloud AIO

When updates exist, the AIO interface shows them under **Containers**.

**1. Back up**

Create a backup with AIO's built-in BorgBackup first.

**2. Update**

Click **Stop containers**, then **Start and update containers**. If a mastercontainer update is offered, apply it while the containers are stopped, then start and update the containers.

AIO checks for updates once a day and notifies Nextcloud admins.

## How to run occ commands

`occ` is Nextcloud's command-line admin tool. In AIO, run it in the Nextcloud container:

```bash theme={null}
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ status
```

For example, to unblock an IP that hit the brute-force protection:

```bash theme={null}
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ security:bruteforce:reset 198.51.100.25
```

## Frequently asked questions

### Can I install Nextcloud without a domain?

Not with AIO. If you have no domain, the AIO interface can register a free `dedyn.io` subdomain through deSEC for you.

### Where is my Nextcloud data stored?

In a Docker volume by default. To use a folder such as `/mnt/ncdata` (for example on a second disk), add `--env NEXTCLOUD_DATADIR="/mnt/ncdata"` to the mastercontainer command **before** the first start. See [mount a new disk](https://help.freakhosting.com/portals/other/how-to-mount-a-new-disk-on-linux.md).

### Why does the domain check fail?

The `A` record doesn't point to this server yet, or port 443 is blocked. Check DNS with `dig +short cloud.example.com` and see [check if a port is open from outside](https://help.freakhosting.com/portals/other/how-to-check-if-a-port-is-open-from-outside.md).

### How do I log in to the AIO interface while Nextcloud is running?

Direct passphrase login is blocked while Nextcloud runs. Log in to Nextcloud as admin, open `https://cloud.example.com/settings/admin/overview` and use the button at the top to open the AIO login.

## Related guides

> [card] [VPS and dedicated server guides](https://help.freakhosting.com/portals/other/vps-and-dedicated-server-guides.md)
>
> Every guide in this section.

> [card] [Install Docker](https://help.freakhosting.com/portals/other/how-to-install-docker.md)
>
> Docker Engine from the official repository.

> [card] [Point a domain to your server](https://help.freakhosting.com/portals/other/how-to-point-a-domain-to-your-server.md)
>
> Create the A record AIO needs.

> [card] [Back up a Linux server](https://help.freakhosting.com/portals/other/how-to-back-up-a-linux-server.md)
>
> Keep a copy off the server.

> [card] [Schedule and restore VPS backups](https://help.freakhosting.com/portals/vps-panel/how-to-schedule-and-restore-backups.md)
>
> Panel backups for your VPS.

***

> [!NOTE]
>
> **Checked against the official [Nextcloud All-in-One documentation](https://github.com/nextcloud/all-in-one)** on 4 November 2026. Commands can differ between AIO releases.

> [!NOTE]
>
> ### Need Extra Help?
>
> If you encounter any issues, our support team is ready to assist:
>
> * **Live Chat:** Quick assistance via our website.
> * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
> * **Discord:** [Join our Community](https://discord.gg/freakhosting)
> * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)

> [!TIP]
>
> ### Save on Your Hosting
>
> Ready to upgrade your hosting? Use code **KB20** at checkout for **20% off** your first order!

***

**Last Updated:** November 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.