Remote access (Docker install)

This post was flagged by the community and is temporarily hidden.

Sorry, wrong category. Should be in “Server”

Hi,
Log into your remote server. Make sure that docker is running and that your container is running.
Curl your container locally on the CLI and make sure it is accessible.

Once you’ve made sure the container is accessible locally you can try accessing it over the network.

I wouldn’t recommend running the ownCloud server in docker without a reverse proxy providing SSL.
You should have a look into traefik or nginx-proxy with docker-gen or caddy.

How are you bringing up your docker environment? Are you using docker-compose? Can you paste your docker-compose.yml (or if your just using systemd or whatever, paste these config files)?

Have you seen this documentation page: https://doc.owncloud.com/server/10.2/admin_manual/installation/docker/

1 Like

@eneugebauer,

server is running fine and can be accessed locally, but not from remote.
Yes, I used the installation instruction from the documentation page.
Yes, I should use ownClould with reverse proxy providing SSL - still need to find out how to do that.
Yes, I am using docker-compose
Here is my docker-compose.yml:

version: ‘2.1’

volumes:
files:
driver: local
mysql:
driver: local
backup:
driver: local
redis:
driver: local

services:
owncloud:
image: owncloud/server:{OWNCLOUD_VERSION} restart: always ports: - {HTTP_PORT}:8080
depends_on:
- db
- redis
environment:
- OWNCLOUD_DOMAIN={OWNCLOUD_DOMAIN} - OWNCLOUD_DB_TYPE=mysql - OWNCLOUD_DB_NAME=owncloud - OWNCLOUD_DB_USERNAME=owncloud - OWNCLOUD_DB_PASSWORD=owncloud - OWNCLOUD_DB_HOST=db - OWNCLOUD_ADMIN_USERNAME={ADMIN_USERNAME}
- OWNCLOUD_ADMIN_PASSWORD=${ADMIN_PASSWORD}
- OWNCLOUD_MYSQL_UTF8MB4=true
- OWNCLOUD_REDIS_ENABLED=true
- OWNCLOUD_REDIS_HOST=redis
healthcheck:
test: [“CMD”, “/usr/bin/healthcheck”]
interval: 30s
timeout: 10s
retries: 5
volumes:
- /media/root/Data:/mnt/data

db:
image: webhippie/mariadb:latest
restart: always
environment:
- MARIADB_ROOT_PASSWORD=owncloud
- MARIADB_USERNAME=owncloud
- MARIADB_PASSWORD=hidden
- MARIADB_DATABASE=owncloud
- MARIADB_MAX_ALLOWED_PACKET=128M
- MARIADB_INNODB_LOG_FILE_SIZE=64M
healthcheck:
test: [“CMD”, “/usr/bin/healthcheck”]
interval: 30s
timeout: 10s
retries: 5
volumes:
- mysql:/var/lib/mysql
- backup:/var/lib/backup

redis:
image: webhippie/redis:latest
restart: always
environment:
- REDIS_DATABASES=1
healthcheck:
test: [“CMD”, “/usr/bin/healthcheck”]
interval: 30s
timeout: 10s
retries: 5
volumes:
- redis:/var/lib/redis

.env file:

OWNCLOUD_VERSION=10.0
OWNCLOUD_DOMAIN=xxx.ddns.net
ADMIN_USERNAME=admin
ADMIN_PASSWORD=hidden
HTTP_PORT=8080

sudo docker ps:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6e46faf24494 owncloud/server:10.0 “/usr/bin/entrypoint…” 20 hours ago Up 20 hours (healthy) 0.0.0.0:8080->8080/tcp ownclouddockerserver_owncloud_1
4730a04bfb7d webhippie/redis:latest “/usr/bin/entrypoint…” 20 hours ago Up 20 hours (healthy) 6379/tcp ownclouddockerserver_redis_1
d8b897b3418a webhippie/mariadb:latest “/usr/bin/entrypoint…” 20 hours ago Up 20 hours (healthy) 3306/tcp ownclouddockerserver_db_1

But I realized I may have some other problems. Port 8080 may be blocked by my ISP

Also Apache within docker does not listen to 8080, only for tcp6
netstat:

Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6011 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:21131 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp6 0 0 :::8080 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
tcp6 0 0 ::1:6010 :::* LISTEN
tcp6 0 0 ::1:6011 :::* LISTEN
tcp6 0 0 :::445 :::* LISTEN
tcp6 0 0 :::139 :::* LISTEN

Not quite sure how to change that.

I also have a principle problem, that I am not sure how to change config info for docker containers, other than purging everything and reinstalling it from scratch with a modified yml-file.

Thanks
Chris

This post was flagged by the community and is temporarily hidden.

1 Like

If your changing your docker-compose.yml and you’ve started your container stack with docker-compose up -d, you can just rerun this command to update the configuration of your container stack.

So on the server itself which curl command did you use? I assume something along these lines:

curl -I https://localhost:8080

How did you test remotely? Did you also try on the same network?

1 Like

It looks like he has tried on a different network…Nothing is clear though, but according to my experience its from different network.