- Newest
- Most votes
- Most comments
It sounds like you're having an issue with the trusted domains configuration in your Nextcloud setup on EC2. The problem is likely related to how your EC2 instance is identifying the incoming connection.
When you access your Nextcloud instance via your browser using the EC2's public IP address, Nextcloud is seeing a different domain/IP than what you've configured in the trusted_domains setting. This is why you're getting the "not using a trusted domain" warning.
Here are some steps to troubleshoot and fix this issue:
- First, try adding the public IP address of your EC2 instance to the trusted domains:
sudo nextcloud.occ config:system:set trusted_domains 1 --value="your_ec2_public_ip"
- You might also need to add any domain name you're using to access the server:
sudo nextcloud.occ config:system:set trusted_domains 2 --value="your_domain_name"
- To see what domain/IP Nextcloud is actually detecting, you can check the Nextcloud logs. For the snap installation, you can view logs with:
sudo snap logs nextcloud
-
If you're behind a proxy or load balancer, Nextcloud might be seeing the internal IP rather than your client IP. In this case, you might need to add the internal IP to trusted domains as well.
-
You can also try adding a wildcard to temporarily allow all domains while testing:
sudo nextcloud.occ config:system:set trusted_domains 3 --value="*"
(Note: This is not recommended for production use)
- Verify your security group settings to ensure that HTTP/HTTPS traffic is allowed to your EC2 instance from your IP address.
After making these changes, restart the Nextcloud service:
sudo snap restart nextcloud
This should help resolve the trusted domain issue and allow you to access your Nextcloud instance properly.
Sources
Unable to start/load apache2 on LightSail LAMP configuration | AWS re:Post
Forwarding public ip to private ip in EC2 ( windows server) for an http/https listener . | AWS re:Post
Struggling with Cloud Quest Networking Concepts Practice Lab | AWS re:Post
Step 1 was the solution. Thank you so much. I don't understand why you would add the IP address of the nextcloud server itself, but, it works.
answered a year ago
Relevant content
asked 2 years ago
asked 9 months ago
- AWS OFFICIALUpdated 5 months ago
