# ![OpenCloud](<https://daemonless.io/images/logos/opencloud.svg>) OpenCloud

[![Build Status](<https://img.shields.io/github/actions/workflow/status/daemonless/opencloud/build.yaml?style=flat-square&amp;label=Build&amp;color=green>)](<https://github.com/daemonless/opencloud/actions>) [![Last Commit](<https://img.shields.io/github/last-commit/daemonless/opencloud?style=flat-square&amp;label=Last+Commit&amp;color=blue>)](<https://github.com/daemonless/opencloud/commits>) [![OCI Pulls](<https://img.shields.io/docker/pulls/daemonless/opencloud?style=flat-square&amp;label=OCI+Pulls&amp;color=blue>)](<https://hub.docker.com/r/daemonless/opencloud>)

OpenCloud is a modern file-sync and share platform.

|  |  |
| --- | --- |
| **Port** | `9200` |
| **Registry** | [`ghcr.io/daemonless/opencloud`](<https://github.com/daemonless/opencloud/pkgs/container/opencloud>) |
| **Daemonless** | [daemonless/opencloud](<https://github.com/daemonless/opencloud>) |
| **Source** | [daemonless/opencloud](<https://github.com/daemonless/opencloud>) |
| **Website** | [opencloud.eu](<https://opencloud.eu/>) |

> [!WARNING]
>
> **Work in Progress**

This image is functional but may change significantly in a future release.

## Breaking changes

### untagged -\> 0.1.0

- `config` and data directories moved from `/config/.opencloud` to `/config` Existing data will be moved automatically during container initialization.

## Upgrade from 6.2.0 to 7.0.0

The upgrade requires a change to the configuration of the "sharing" service. Please follow the steps outlined in the [Upgrade Guide](<https://docs.opencloud.eu/docs/admin/maintenance/upgrade/upgrade-guide#verify-configuration-changes>) to achieve that.

## First run

OpenCloud generates a default config with insecure settings (no TLS validation) on first start or if the file `/config/config/opencloud.yaml` does not exist.

You can define the inital password for the `admin` user by setting the environment variable `IDM_ADMIN_PASSWORD` like this:

```
services:
  opencloud:
    environment:
      - IDM_ADMIN_PASSWORD=<your_admin_password>
```

If you do not set the password with the variable above, OpenCloud generates a random password for the `admin` user and you can find it in the logs or in the file `/config/config/opencloud.yaml`.

## Remarks

So far I have only tested this image with `bridge` networking. You may need to add an `extra_host` to your compose file to allow opencloud to connect to it's internal IDP. That is at least what I had to do.

```
services:
  opencloud:
    extra_hosts:
      - "host-hostname:127.0.0.1"
```

## Additional environment variables

To configure OpenCloud further, you can check out the list of [environment variables](<https://docs.opencloud.eu/docs/next/dev/server/services/web/environment-variables>).

## Prerequisites

Before deploying, ensure your host environment is ready. See the [Quick Start Guide](<https://daemonless.io/guides/quick-start/index.md>) for host setup instructions, including the security model for host vs. container privileges.

## Deployment

**Customize Paths, UID &amp; Ports**

Install and manage **OpenCloud** on FreeBSD with [fjord](<https://fjord.daemonless.io>):

```
fjord install opencloud
```

Or open the **App Store** in the fjord web UI and install **OpenCloud** from the wizard. New to fjord? See the [Install Guide](<https://fjord.daemonless.io/install/>).

```
services:
  opencloud:
    image: "ghcr.io/daemonless/opencloud:latest"
    container_name: opencloud
    environment:
      - PUID=1000  # User ID for the application process
      - PGID=1000  # Group ID for the application process
      - TZ=UTC  # Timezone for the container
      - OC_URL=https://localhost:9200  # URL where OpenCloud can be accessed
    volumes:
      - "/containers/opencloud:/config"
    ports:
      - "9200:9200"
    # always (not unless-stopped) so FreeBSD's podman rc.d auto-starts it at boot
    restart: always
```

Save as `compose.yaml`, then run `podman-compose up -d`.

> [!WARNING]
>
> Exposing ports in AppJail means that your service can be reached from remote hosts. If that is not your intention, do not expose the ports and communicate with the service using the jail's IPv4 address or hostname assigned by the virtual network.

```
# .env

DIRECTOR_PROJECT=opencloud
PUID=1000
PGID=1000
TZ=UTC
OC_URL=https://localhost:9200
```

```
# appjail-director.yml

options:
  - virtualnet: ':<random> default'
  - nat:
services:
  opencloud:
    name: opencloud
    options:
      - container: 'args:--pull'
      - expose: '9200:9200 proto:tcp'
    oci:
      user: root
      environment:
        - PUID: !ENV '${PUID}'
        - PGID: !ENV '${PGID}'
        - TZ: !ENV '${TZ}'
        - OC_URL: !ENV '${OC_URL}'
    volumes:
      - opencloud: /config
volumes:
  opencloud:
    device: '/containers/opencloud'
```

```
# Makejail

ARG tag=latest

OPTION container=boot
OPTION overwrite=force
OPTION from=ghcr.io/daemonless/opencloud:${tag}
```

Save the files above, then run `appjail-director up`.

> [!WARNING]
>
> **Experimental**
>
> Bastille's OCI support is experimental. It requires `buildah` and shares the host network stack (`inherit`). Mount volumes with `--volume HOST JAIL`; without it, image-declared volumes are stored under `${bastille_volumesdir}/${jail}`.

```
services:
  opencloud:
    name: opencloud
    image: "ghcr.io/daemonless/opencloud:latest"
    network:
      - mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
      - OC_URL=https://localhost:9200
    volumes:
      - "/containers/opencloud:/config"
```

Save as `bastille-compose.yml`, then run `bastille up`.

Open `http://<server>:9200` from another machine (the server's own browser can't use a published port).

## Parameters

### Environment Variables

| Variable | Default | Description |
| --- | --- | --- |
| `PUID` | `1000` | User ID for the application process |
| `PGID` | `1000` | Group ID for the application process |
| `TZ` | `UTC` | Timezone for the container |
| `OC_URL` | `https://localhost:9200` | URL where OpenCloud can be accessed |

### Volumes

| Path | Description |
| --- | --- |
| `/config` | Configuration directory |

### Ports

| Port | Protocol | Description |
| --- | --- | --- |
| `9200` | TCP | Web UI |

## Version Tags

| Tag | Description | Best For |
| :--- | :--- | :--- |
| `latest` | **Upstream Binary**. Built from official release. | Most users — recommended. |

> [!NOTE]
>
> **Implementation Details**
>
> - **Architectures:** amd64
> - **User:** `bsd` (UID/GID set via [PUID/PGID](<https://daemonless.io/guides/permissions/index.md>)). Defaults to `1000:1000`.
> - **Base:** Built on `ghcr.io/daemonless/base` (FreeBSD 15).

---

Need help? Join our [Discord](<https://discord.gg/Kb9tkhecZT>) community.
