Owncloud docker port

i was able to get owncloud running with docker …
Have 2 questions .

On machine i have it i have something else running on port 80, how can i change this owncloud image to run on another port .

Second question . What is the best way to move my old owncloud installed regularly on my old pi to this docker installation and i can i set so the data file i on my device and not on the image

ownCloud server itself is running on port 8080 inside the docker container.
I would recommend to only expose the port and put a SSL terminating reverse proxy in front of it. That reverse proxy would have port 80 and 443 published, while ownCloud has no ports published.

I would spin up an ownCloud container in the same oC version as your RPi setup and look at the configuration and data directories.
Go to the RPi move the data directory to the same as inside the docker container: https://doc.owncloud.org/server/10.2/admin_manual/maintenance/manually-moving-data-folders.html

Then test-migrate the installation into the docker container. You could easily spin up a test container and try this process several times, until you have figured out all configuration details.

Make sure to remove all details of the previous containers (volumes, …) , when starting over.

Once it is all running, you can do a final migration.

2 Likes

i ran into an issue -

root@7b65c34e55f4:/var/www/html# apt-get install mariadb
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package mariadb

when i enter the container since i want to use mariadb not able to install it[quote=“chacho, post:3, topic:24928, full:true”]
i ran into an issue -

root@7b65c34e55f4:/var/www/html# apt-get install mariadb
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate packagemariadb

when i enter the container since i want to use mariadb not able to install it same for mysql
[/quote]

This ownCloud image is designed to work with a data volume in the host filesystem and with separate MariaDB and Redis containers.

pi@vorman:~/oc $ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
196846ea8d44 owncloud/server:10.4 “/usr/bin/entrypoint…” 5 minutes ago Up 5 minutes (healthy) 0.0.0.0:12000->8080/tcp oc_owncloud_1

61daecafb74b webhippie/redis:latest “/usr/bin/entrypoint…” 5 minutes ago Up 5 minutes (healthy) 6379/tcp oc_redis_1

f7341b88c674 webhippie/mariadb:latest “/usr/bin/entrypoint…” 5 minutes ago Up 5 minutes (healthy) 3306/tcp oc_db_1

have a question :slight_smile:
documentation says
https://doc.owncloud.org/server/10.2/admin_manual/maintenance/manually-moving-data-folders.html

to update oc_storages to /mnt/data

i currently have in new docker this
MariaDB [owncloud]> select * from oc_storages;
±------------------------±-----------±----------±-------------+
| id | numeric_id | available | last_checked |
±------------------------±-----------±----------±-------------+
| home::admin | 1 | 1 | NULL |
| local::/mnt/data/files/ | 2 | 1 | NULL |
±------------------------±-----------±----------±-------------+
2 rows in set (0.002 sec)

can i leave as is

Depends on what you want to achieve…

I wouldn’t try to change much in the docker container itself, I would recommend to change your RPi installation to match the docker setup.

If you want to know for sure, you just have to spin up a docker container environment and look inside the database for the value and compare it to the value you have in your RPi env.

1 Like

so i did the following

i copied data directories

then i imported the db to new instance …

im able to log in but i notice two things

no file preview
and calendar names are there but no event copied .(same in old instance hmmmmm)

i guess migrating is not a good idea

i will export calendar and perhaps copy files

Thanks

have a question , in a regular install the apps directory is in owncloud/

while in a docker instalation the apps is in /mnt/data ?

so when migrating should i move old apps to data/

You’re saying you can’t see any files? Are you still in single-user mode?
Have you made sure the file permissions are correct?

Yes, this is what you should do.

1 Like

thanks i see the files took long to show up …

“Then, copy only your data, configuration, and database files from your original ownCloud instance to the new machine.”

which are the database files? = importing the db?

Correct, run a mysqldump on the source machine and reimport that dump on the target machine, or in your case in the docker container.

1 Like

i am in the last step

ran into this issue , did not copy the config directory

The server encountered an internal error and was unable to complete your request.

Please contact the server administrator if this error reappears multiple times and include the technical details below in your report.

More details can be found in the server log.

Technical details
Remote Address: 192.168.1.14
Request ID: bFKSjrdXdKv3frZ3ga4m

log is empty not sure why

The ownCloud container is configured to output apache logs and errors into the docker logs.
For the ownCloud log check the data folder inside your docker container. There must be more than this.

1 Like