Official website:
Setting Name | Description | Example |
---|---|---|
|
The ownCloud version |
|
|
The ownCloud domain |
|
|
The admin username |
|
|
The admin user’s password |
|
|
The HTTP port to bind to |
|
# Associated container installed
# Create a new project directory
mkdir owncloud-docker-server
# Copy docker-compose.yml from the GitHub repository
wget https://raw.githubusercontent.com/owncloud/docs/master/modules/admin_manual/examples/installation/docker/docker-compose.yml
# Create the environment configuration file
cat << EOF > .env
OWNCLOUD_VERSION=latest
OWNCLOUD_DOMAIN=localhost
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin
HTTP_PORT=8080
EOF
# Build and start the container(PS: Must in .yml file directory)
docker-compose up -d
# if you setting succeed, docker ps
# open http://localhost:8080
# Occ commands related
View version
occ [options] [arguments] operation for the user
Loki reset a user's password
sudo -u www-data php occ user:resetpassword Loki
# Into maintenance mode for general normal shut down or upgrade the server
occ maintenance:mode --on
occ maintenance:mode --off
For Linux add a trusted domain
first cd to ownCloud installation directory, if multiple incremental please order number, for example:
0 => 'localhost', 1 => 'www.XXX.com, 2 => 'www.OOO.com,
# vi config/config.php
# Docker-compose related
docker-compose logs --timestamp owncloud
# stop the containers
docker-compose stop
# stop and remove containers along with the related networks, images, and volumes.
docker-compose down
# Upgrading ownCloud on Docker
docker-compose exec owncloud occ maintenance:mode --on
docker-compose exec db backup
docker-compose down
## update the version number of ownCloud in your .env file or the YAML file.
sed -i 's/^OWNCLOUD_VERSION=.*$/OWNCLOUD_VERSION=<newVersion>/' /compose/*/.env (仅供参考,默认值用latest即可)
docker-compose up -d
# 背景图替换的路径
参考资料:
https://www.orgleaf.com/owncloud
https://owncloud.org/help/