Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change / reset / server configure federated cloud ID #233

Closed
john-2000 opened this issue Dec 16, 2018 · 16 comments
Closed

Change / reset / server configure federated cloud ID #233

john-2000 opened this issue Dec 16, 2018 · 16 comments
Labels
3. to review enhancement New feature or request

Comments

@john-2000
Copy link

Describe the bug
I have used both local IP 192.168.xx.yy as well as remote IP my.domain.com to log onto my nextcloud.
Sharing under settings reflects the way I have logged on ie john@192.168.xx.yy if logged on via local ip or john@my.domain.com if logged on via the web.

social seems stuck on the local ip ie john@192.168.xx.yy and I do not seem to be able to change it - this is independent of log on method.

To Reproduce
I cannot change the settings or cannot find a way to force the format of the federated ID anywhere so I cannot do a reproduce

Expected behavior
User should be allowed to set (& fix) a federated cloud ID in either social or system settings
and/or
Admin should be able to fix permissible federated cloud IDs, for instance limit domains

    • I am not skilled enough to find how I can fix this by "forcing the database" I have had a little dig through the mysql tables but cannot find if it is stored as a fixed setting there,

Using NC 15.0 on apache2 ubuntu 18.04

@john-2000 john-2000 added the bug Something isn't working label Dec 16, 2018
@ghost
Copy link

ghost commented Dec 16, 2018

I'm not sure, if this is the same Problem. My ID shows @nextcloud.therapiecenter.org, which actually should be referring to my real subdomain (seth.therapiecenter.org). I've also found no way to correct this.

social id

I'm using NC 15.0.0 on nginx debian 9.6

@violoncelloCH
Copy link
Member

Activitypub (the federation protocol for social) needs one fixed address while Nextcloud allows multiple domains for one instance. Therefore we try to automatically determine the primary address (otherwise ask the admin for it) and use the overwrite.cli.url from the config.php, because this is the primary address set to be used to generate URLs in Nextcloud.
@john-2000 You seem to have set 192.168.xx.yy for overwrite.cli.url
@Lars1963 for you it seems to be nextcloud.therapiecenter.org
At the moment the only way to change this is to change overwrite.cli.url, and then reset the social apps data (by deactivating it and deleting it's database tables).
Maybe we should create a way to change this but have a big warning about the consequences of changing it there. What do you think @nextcloud/social ?

@ghost
Copy link

ghost commented Dec 16, 2018

@violoncelloCH
You're right. This is a faulty config.php on my site. Don't know where that happened. Must change that.
Question, als a Newbie to nextcloud: which tables have to be deleted?

@violoncelloCH
Copy link
Member

@Lars1963 The tables have a prefix like oc_ followed by social_ and the actual "title".

@ghost
Copy link

ghost commented Dec 16, 2018

THX

@ArtificialOwl
Copy link
Member

You will also need to remove carefully any entry from oc_migrations with social as appId

@john-2000
Copy link
Author

@violoncelloCH just to check, is it possible to "drop the tables" or should I better delete all rows? I tried deleting by dropping but when I re-downloaded social that did not seem to regenerate the tables, or is the regeneration dependent on the oc_migrations step described.

@daita just to check you would expect there not to be too many

@violoncelloCH
Copy link
Member

@john-2000 AFAIK the tables are regenerated if the app is downloaded and activated and doesn't find the tables, so drop should work.

@ArtificialOwl
Copy link
Member

I will release a 0.1.1 this week, including a simple command to reset the whole database of the app.

@ghost
Copy link

ghost commented Dec 17, 2018

@daita
Just a little remark: I found also found some entries in oc_appconfig with social as appId

@mcnesium
Copy link

It would be great to have the opportunity to set a different domain to the social app. While I am very curious to check out the fediverse from within my Nextcloud instance, I would rather not do this with my federated cloud ID. Propably in many cases it looks like username@cloud.domain.tld. Personally I do not want to hang out on Mastodon etc with a …cloud… handle, but rather configure another one like username@social.domain.tld for the social app.

@ArtificialOwl
Copy link
Member

You might want to install an instance of mastodon on a different host than your cloud ? :)

I understand your concerns and, as far as I haven't tested, some alias in your configuration of apache might do the trick:

  • social.example.net/.well-known/webfinger -> cloud.example.net/.well-known/webfinger
  • social.example.net/apps/social -> cloud.example.net/apps/social

Keep in mind that the app is in Alpha status, and out-of-the-box setup are not already available nor tested.

@mcnesium
Copy link

@daita of course, the social-domain must be configured to point to the instance and also added to the trusted_domains array.

Still, as stated above, the social app chooses the domain configured in overwrite.cli.url, which might be not the desired one for hanging out in the fediverse. So instead of having to install and maintain a mastodon instance, people might want to just change the domain and use your fabulous Nextcloud app right here.

This should be read as a feature request, rather than a bug fix. I might have opened up a separate issue for this, but it kind of fits in here as well.

@violoncelloCH
Copy link
Member

violoncelloCH commented Dec 21, 2018

@rev138 that would be occ social:reset

@ghost
Copy link

ghost commented Feb 8, 2019

I didtn see the occ social:reset command, so I did remove the "oc_social" tables manually and removed the folder for the social app.
then i reactivated the app, but it throws an internal server error.
and i've seen that it doesnt recreate the social tables.
what can i do?
EDIT: I additionally deleted the "social"-entries from oc_appconfig so i shouldnt have any leftovers.
Also i deleted the social entries from oc_migrations...

@trougnouf
Copy link

trougnouf commented Nov 18, 2020

occ social:reset returns the following:

Beware, this operation will delete all content from the Social App.

Do you confirm this operation? (y/N) y
Operation is destructive. Are you sure about this? (y/N) y

flushing data... An exception occurred while executing 'DELETE FROM `oc_social_3_client_auth`':

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_social_3_client_auth' doesn't exist

When I open the social app afterwards, I get the message "We automatically created a Social account for you. Your Social ID is the same as your federated cloud ID: @trougnouf@localhost " even though I set overwrite.cli.url (which was previously set to localhost) and restarted apache.

I deleted all the oc_social tables from the database and since then I get an internal server error whenever I try to access the social tab (even after reinstalling the social app)

edit:

You will also need to remove carefully any entry from oc_migrations with social as appId

fixes the internal server error, but I still have a localhost domain.

@mracreep 's suggestion to remove tables from oc_appconfig worked. This should be fixed for #1129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants