Andrew Barnett's picture

I've successfully installed NextCloud on Amazon EC2 through the TurnkeyLinux Marketplace app. I've been able to get everything setup and working, but want to change to a fully qualified domain (rather than the public IP).

Before I make the change, I'd like to make sure that I can edit the config.php to add new trusted domains.

The pertinent details:

+ I'm running NextCloud 18.0.4
+ NextCloud was deployed via the AWS Marketplace AMI that is based on Debian 10
+ I can SSH into the TKL instance using the .PEM key.
+ I have very minimal experience with the Unix Shell, mostly related to apt-get install stuff.

What I've tried:

I can see the config.php file by using "find /var/www/nextcloud/config"

When I use "nano /var/www/nextcloud/config/config.php" I get a notification that permission is denied.

Any ideas on how to enable permissions to write / edit config.php?

Forum: 
Jeremy Davis's picture

By default on AWS Marketplace instances, you log in via SSH as the 'admin' user. As the config file is not owned by the 'admin' user, you need to use 'sudo' to edit it. So try this:

sudo nano /var/www/nextcloud/config/config.php

FWIW, other than AWS Marketplace instances, TurnKey appliances use the 'root' account, so 'sudo' is not required. If you wish, you can enable the root user account like this:

sudo turnkey-sudoadmin off

Or just keep in mind that you may need to use 'sudo' when doing anything to files that you don't own.

Please do not hesitate to get in touch if you have any further questions or need any more guidance. I'm not a master of Nextcloud, but I know TurnKey intimately and we love feedback (good or bad). :)

Add new comment