내용으로 건너뛰기

Nextcloud Configuration

0

I'm trying to use an EC2 instance to set up a nextcloud server to backup documents on my computer.

I've launched an instance using Ubuntu 24.04.3 LTS. I installed the nextcloud snap package.

I'm doing a manual configure of nextcloud: sudo nextcloud.manual-install admin password Then I check my default trusted domain: sudo nextcloud.occ config:system:get trusted_domains and I get localhost. So far, so good.

Then I add my computer's IP address, or what I think is my computer's IP address, I have a VPN, but I believe it's turned off, to the array of trusted domains: sudo nextcloud.occ config:system:set trusted_domains 1 value='ip_address'

Then I open my browser, I go to the public IP address of my EC2 instance. I get the nextcloud opening screen, but then I get the warning that I'm not using a trusted domain.

I've tried various methods of verifying which IP address my computer is actually going out on. I can't find the apache2 files which would verify the IP address that's not accessing nextcloud.

What am I missing?

질문됨 일 년 전308회 조회

2개 답변
1
수락된 답변

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:

  1. 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"
  1. 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"
  1. 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
  1. 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.

  2. 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)

  1. 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

답변함 일 년 전

전문가

검토됨 일 년 전

0

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.

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠