# Nextcloud

Nextcloud offers a self-hosted file storage and sync platform with powerful collaboration capabilities with desktop, mobile and web interfaces.

<ServiceNotice serviceName="OpenCloud" linkPath="/guides/docker/apps/opencloud" />

### References

<ReferenceLinks references={frontmatter.references} />

---

## Make directory

```sh wrap preserveIndent
mkdir -p {{DOCKER_PATH_VAR}}/nextcloud && cd {{DOCKER_PATH_VAR}}/nextcloud
```

## compose.yml

```sh
nano compose.yml
```

```yml title="compose.yml"
yaml
```

## Start container

```sh
docker compose up -d
```

## Open web ui

<OpenWebUI port="8443" />

After completing the web-based installer, restart the Nextcloud container to apply default memory caching and transactional file locking configurations.

## Restart container

```sh
docker compose restart
```

Alternatively, you can apply your own configurations by editing `config.php`.

## Modify `config.php`

```sh wrap preserveIndent
nano ./config/www/nextcloud/config/config.php
```

```sh title="./config/www/nextcloud/config/config.php" wrap preserveIndent
'redis' => [
    'host' => 'nextcloud_redis',
    'port' => 6379,
],
'memcache.local' => '\\OC\\Memcache\\APCu',
'filelocking.enabled' => true,
'memcache.locking' => '\\OC\\Memcache\\APCu',
'upgrade.disable-web' => true,
```
