James
a431c1d43f
Outputting special characters to files this way doesn't necessarily work |
||
---|---|---|
nextcloud | ||
secrets | ||
.env.example | ||
.gitignore | ||
README.md | ||
docker-compose.yaml |
README.md
Nextcloud (Docker Compose)
Build a Nextcloud instance in Docker Compose complete with PostgreSQL and Redis
Prerequisites
- Docker
- Docker Compose
- A reverse proxy on its own Docker network
Setup
- Create a copy of
.env.example
:
cp .env.example .env
-
Replace the
NEXTCLOUD_HOST
variable with your desired domain -
Replace
VOLUME_PATH
variable if you wish to change where volume data is stored -
Modify other variables as needed
-
Create the following required secrets files (you should consider restricting access to these files):
secrets/postgres_password.txt
secrets/nextcloud_admin_user.txt
secrets/nextcloud_admin_password.txt
- Bring up the containers!
sudo docker-compose -p nextcloud up --build -d
- (Optional) To enable some file previews copy previews.config.php into your Nextcloud's
config
directory (replace$volume
with the path you have set in theVOLUME_PATH
environment variable):
sudo cp nextcloud/previews.config.php $volume/var/www/html/config/
sudo chown www-data:root $volume/var/www/html/config/previews.config.php