Run this to create required files:
mkdir -p DocumentServer/{logs,data,lib}
touch gcp_service_account_credentials.json
This sets up some basic configuration
Open up docker-compose.yml and make the following changes
User-facing config:
- Replace
<cloudAdminUsername>
and<cloudAdminPassword>
with your desired admin username and password - Replace all instances of
<cloudHostFQDN>
with your domain name. If you don’t have a domain name that you want to use, you can also fill in the IP address of the server, so Nextcloud knows which requests to respond. - If you're using a IP address instead of a FQDN, please comment out line 53, and uncomment line 55
Back-end config:
- Replace all instances of
<s3AccessKey>
and<s3SecretKey>
with a random access and secret key respectively (only verified by the MinIO service)
Now we must connect MinIO to GCS (if you decided to use some other storage provider, have a look at the Minio documentation).
- Go to GCP console
- Create a GCP account if you don’t already have one ($300 credit for new accounts)
- Search for “Storage”
- Click on the corresponding result item
- Click on
Create New Bucket
- Give it a name that's easy to remember
- Select
Multi-Region
as the location type - Leave the remaining options as they are
- Click
Create
to finish setup.
Create another storage bucket for PGSQL backups
- Search for
Service accounts
- Click on the corresponding result
- Click on
Create Service Account
and fill in some service account name and description - Click on
Continue
- Select
Storage Object Admin
as its role - Create a key of type JSON and download it to your computer
Copy the contents of the file that you just downloaded, and paste it into the file gcp_service_account_credentials.json
Open up docker-compose.yml and make the following changes
Back-end changes:
- Replace
<s3CloudStorage>
with your cloud bucket's name you created - Replace
<s3BackupBucket>
with your backup bucket's name you created
Change the traefik command from containing this:
- --defaultentrypoints=https,http
- --entryPoints=Name:http Address::80 Redirect.EntryPoint:https
- --entryPoints=Name:https Address::443 TLS
To containing this:
- --defaultentrypoints=http
- --entryPoints=Name:http Address::80
Note that we removed the HTTPS entry point.
Read over the docker-compose to ensure that you've done everything correctly. No support is provided!
Seriously. It takes like... 5 minutes.
- Run
docker-compose up -d
- Run
docker-compose logs -f
to see logs while they are starting - Once everything’s settled you can close the logs using CTRL-C.
Open your browser and go to the domain or IP address of your server. You’ll now see the Nextcloud login screen, where you can use the admin credentials you set earlier.