NOTE - see second post for updated compose file and setup process.
Over the last few weeks I have seen loads of threads about nextcloud AIO. I am not a fan of nextcloud and especially the AIO version as it is bloated and installs a number of containers that are not orchestrated through compose files/plugin.
Yesterday I setup nextcloud aio in docker on OMV as a test. Got it working with my reverse proxy (swag). Did not like it so spent more time completely removing from my system. Total pain!
So I did a bit of research and found opencloud. My initial thoughts are that it is so much better than nextcloud for a simple and modern cloud based file sharing solution. My main complaint about opencloud is the documentation is tricky and overcomplicated.
Here is a guide for those that want to try out opencloud as a simple cloud/file sharing solution. My method is based on the official docs - but with a fair bit of trial and error to get it working. https://docs.opencloud.eu/docs…-started/container/docker
Part 1: - initial setup (runs one time to create the initial config)
services:
opencloud:
image: opencloudeu/opencloud-rolling:latest
command: init
restart: no
container_name: opencloud
user: 1001:100 # change to appuser:users but default is 1000:1000
environment:
- IDM_ADMIN_PASSWORD=[admin_password]
- IDM_CREATE_DEMO_USERS=false
- OC_LOG_LEVEL=info # warn debug
- OC_INSECURE=true
volumes:
- /etc/localtime:/etc/localtime:ro
- ${{ sf:"docs" }}/opencloud:/var/lib/opencloud
- ${{ sf:"appdata" }}/opencloud/config:/etc/opencloud
Display More
Make sure permissions on the two volumes are correctly set.
change IDM_ADMIN_PASSWORD to whatever you want for an initial admin password.
Up the container. It will start once and stop - this simply creates the initial config
Check docker logs - but worked fine for me
Part 2 - modify the compose to start normally without reverse proxy and test
services:
opencloud:
image: opencloudeu/opencloud-rolling:latest
# command: init # no longer needed as only required for the initial setup
# restart: no
container_name: opencloud
user: 1001:100 # change to appuser:users but default is 1000:1000
restart: unless-stopped
ports:
- 9200:9200
environment:
# - IDM_ADMIN_PASSWORD=[set initial password] # no longer needed after the initial setup
- IDM_CREATE_DEMO_USERS=false
- OC_LOG_LEVEL=info # warn debug
- OC_INSECURE=true
# basic setup - without reverse proxy
- PROXY_HTTP_ADDR=0.0.0.0:9200
- OC_URL=https://[host_ip]:9200
volumes:
- /etc/localtime:/etc/localtime:ro
- ${{ sf:"docs" }}/opencloud:/var/lib/opencloud
- ${{ sf:"appdata" }}/opencloud/config:/etc/opencloud
Display More
Updated compose now configured to run opencloud locally - without a reverse proxy
Change OC_URL=https://[host_ip]:9200 and replace [host_ip] with the ip of the docker host
Check logs and hopefully you can access opencloud at https://[host_ip]:9200 (you will get a insecure connection warning in your browser - this is expected)
Part 3 - modify the compose to use a reverse proxy (i use swag)
I am not going to cover how to configure a reverse proxy in this guide. I expect you have this already working. I have included my swag config below that I hope is some help with the basics.
services:
opencloud:
image: opencloudeu/opencloud-rolling:latest
# command: init # no longer needed as only required for the initial setup
# restart: no
container_name: opencloud
user: 1001:100 # change to appuser:users but default is 1000:1000
restart: unless-stopped
ports:
- 9200:9200
environment:
# - IDM_ADMIN_PASSWORD=[set initial password]
- IDM_CREATE_DEMO_USERS=false
- OC_LOG_LEVEL=info # warn debug
# - OC_INSECURE=true
# basic setup - without reverse proxy
# - PROXY_HTTP_ADDR=0.0.0.0:9200
# - OC_URL=https://192.168.1.3:9200
# reverse proxy setup
- OC_INSECURE=false # works with true or false so not sure what this is doing. False is default so might not be needed
- PROXY_TLS=false
- OC_URL=https://[reverse_proxy_service_fqdn] # e.g. opencloud.blarblar.com
volumes:
- /etc/localtime:/etc/localtime:ro
- ${{ sf:"docs" }}/opencloud:/var/lib/opencloud
- ${{ sf:"appdata" }}/opencloud/config:/etc/opencloud
Display More
at this point if your reverse proxy is configured, you should be able to access opencloud at https://[reverse_proxy_service_fqdn]
you should be able to access opencloud on the lan and externally using the same url - this of course depends on having your reverse proxy (and lan) setup to do this.
I'm still very much a noobie with opencloud so I will try to help if you get stuck.
My swag reverse proxy config is below to help out with the basics. I am still playing around with this and not sure if all the proxy config is needed...
Have fun ![]()
## created by me based on info from opencloud docker docs
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name opencloud.*;
include /config/nginx/ssl.conf;
# This is is the default for swag...
#client_max_body_size 0;
# Increase max upload size
client_max_body_size 10M;
# Disable buffering - essential for SSE
proxy_buffering off;
proxy_request_buffering off;
# Extend timeouts for long connections
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
keepalive_requests 100000;
keepalive_timeout 5m;
# Prevent nginx from trying other upstreams
proxy_next_upstream off;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app [host_ip];
set $upstream_port 9200;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
# from the opencloud docs
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Display More