victor-rds / docker-etebase

Docker image files for Etebase server
GNU Affero General Public License v3.0
95 stars 28 forks source link

400 - Signup is disabled for this server. #56

Closed andrei-stanescu23 closed 3 years ago

andrei-stanescu23 commented 3 years ago

Good evening!

After successfully running the container, I am getting a persistent error when using authentication commands described in the official documentation of Etebase (https://docs.etebase.com/guides/basic_authentication)

For example, on signup, while using this code snippet (NodeJS): const etebase = await Etebase.Account.signup({ username: username, email: email, }, password, serverURL);

I receive the error described below: { Error: 400 Signup is disabled for this server. Please refer to the README for more information. at new ExtendableError (/home/andrei/Apps/etebase-demo/node_modules/etebase/dist/lib-cjs/Exceptions.js:9:23) at new HttpError (/home/andrei/Apps/etebase-demo/node_modules/etebase/dist/lib-cjs/Exceptions.js:14:9) at Authenticator.newCall (/home/andrei/Apps/etebase-demo/node_modules/etebase/dist/lib-cjs/OnlineManagers.js:95:31) at process._tickCallback (internal/process/next_tick.js:68:7) name: 'HTTPError', status: 400, content: { code: 'generic', detail: 'Signup is disabled for this server. Please refer to the README for more information.' } }

Worth mentioning:

Any hints on how the server needs to be configured?

Best Regards, Andrei

P.S. Thank you for your time & effort into dockerizing etebase :)

victor-rds commented 3 years ago

Sorry, but I don't know, There is no documented setting for that. I think you should ask @tasn at https://github.com/etesync/server or https://www.etesync.com/community-chat/

tasn commented 3 years ago

You need to add each user specifically from the admin or change the settings.py file. We didn't want signups enabled because almost no one wants this. They want to manually add users for each user they want to allow.

addy419 commented 3 years ago

You need to add each user specifically from the admin or change the settings.py file. We didn't want signups enabled because almost no one wants this. They want to manually add users for each user they want to allow.

@tasn Can we add users at the time of docker initialization. Like though a config file?

victor-rds commented 3 years ago

@addy419 for that I need to change the entrypoint.sh and use the manage.py.

I could create some dir that load *.py scritpts at init.

addy419 commented 3 years ago

Thanks. I am trying to achieve the same thing with etesync-cli but cannot build it because of a gcc error. A directory could work as a better option.

tuxiqae commented 2 years ago

@victor-rds @tasn Would you consider adding an environment variable to the Docker image ecosystem so it won't need to be changed in a Python file which we got no real access to?

tasn commented 2 years ago

I don't remember from the top of my head, but isn't it already the case? I think there's an env variable or at least a config, no? Maybe I'm just misremembering.

tuxiqae commented 2 years ago

Wow, thanks for the hasty response! Ummm from what I see here, seems like users will have to edit settings.py on every instance.

victor-rds commented 2 years ago

@tuxiqae I need to fix a problem with postgres, then I will add this ENV to the entrypoint.sh

tuxiqae commented 2 years ago

You guys both ROCK! Super professional, it's apparent from the responses and from the code quality. Thanks for doing so much for the community!

P.S. won't you also need to change the code on etesync/server?

tasn commented 2 years ago

I wish I could take credit, but it's all @victor-rds making sure the self-hosting experience using docker is ROCK SOLID. Thank you Victor!

tuxiqae commented 2 years ago

I wish I could take credit, but it's all @victor-rds making sure the self-hosting experience using docker is ROCK SOLID. Thank you Victor!

This repo is amazing but I wasn't talking only about it :)

victor-rds commented 2 years ago

P.S. won't you also need to change the code on etesync/server?

Well, the best way would be to add a setting to the etebase-server.ini, but since is just commenting a single line little sed can solve for now.

tuxiqae commented 2 years ago

P.S. won't you also need to change the code on etesync/server?

Well, the best way would be to add a setting to the etebase-server.ini, but since is just commenting a single line little sed can solve for now.

Of course, but that'd require a change on server.py

tasn commented 2 years ago

We can do the etebase-server.ini change later on. Let's go with the quick fix for now. :)

tuxiqae commented 2 years ago

@victor-rds already fixed it, just checked and I can verify that it works on victorrds/etesync:latest

P.S. for some reason it does not yet appear under the documentation in Docker Hub

tasn commented 2 years ago

Ah, great! :)

Documentation on dockerhub is done manually (or maybe @victor-rds has CI for it), so I guess he just hasn't updated it yet.

victor-rds commented 2 years ago

Yeah, the docker hub README update is done manually, CI is only for builds at the moment.

victor-rds commented 2 years ago

@victor-rds already fixed it, just checked and I can verify that it works on victorrds/etesync:latest

P.S. for some reason it does not yet appear under the documentation in Docker Hub

Now both repositories READMEs are updated.