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

Cannot disable signup #689

Open
somoit-JSP opened this issue Feb 23, 2023 · 11 comments
Open

Cannot disable signup #689

somoit-JSP opened this issue Feb 23, 2023 · 11 comments

Comments

@somoit-JSP
Copy link

Hi!
Im selfhosting Padloc v4.2.0. Maybe i doing something wrong, but im trying to disable signup by setting environment variable...

PL_SERVER_DISABLE_SIGNUP=true

... but it seems to have no effect. I have seen it in the example env file. Is it implemented? Is there any way to disable signup?
Thanks!

@BrunoBernardino
Copy link
Contributor

@somoit-JSP thanks for reporting this, we'd need a bit more information. That env var should work, but it needs to be passed on to the server properly. Are you running it via docker-compose up, or some other way? If so, can you share your docker-compose.yml file or whatever docker configuration you've got?

@somoit-JSP
Copy link
Author

somoit-JSP commented Mar 28, 2023

Hi @BrunoBernardino.
Correct, im using docker-compose and env file contains more variables that are succesfully parsed and used.
These are the vars contained in my env file
Thanks!

PL_EMAIL_BACKEND=console
PL_EMAIL_BACKEND=smtp
PL_EMAIL_SMTP_HOST=smtp.mydomain.com
PL_EMAIL_SMTP_PORT=25
PL_EMAIL_SMTP_FROM="padloc@mydomain.com"
PL_DATA_BACKEND=leveldb
PL_DATA_LEVELDB_DIR=/data
PL_ATTACHMENTS_BACKEND=fs
PL_ATTACHMENTS_FS_DIR=/attachments
PL_SERVER_CLIENT_URL=https://padloc.mydomain.com
PL_SERVER_REPORT_ERRORS=email@mydomain.com
PL_SERVER_VERIFY_EMAIL_ON_SIGNUP=false
PL_SERVER_DISABLE_SIGNUP=true
PL_SERVER_ADMINS=email@mydomain.com
PL_SERVER_URL=https://padloc.mydomain.com
PL_PWA_URL=https://padloc.mydomain.com

@BrunoBernardino
Copy link
Contributor

Thanks @somoit-JSP and what does your docker-compose.yml look like?

@somoit-JSP
Copy link
Author

Sorry, i forgot. Here you have:

version: "3.7"
services:
    server:
        image: padloc/server
        env_file: ./env
        ports:
            - 127.0.0.1:3000:3000
        volumes:
            - ./attachments:/attachments
            - ./data:/data
        restart: unless-stopped
    pwa_custom:
        image: padloc/pwa
        env_file: ./env
        ports:
            - 127.0.0.1:8080:8080
        restart: on-failure
volumes:
    data:
    attachments:

@BrunoBernardino
Copy link
Contributor

BrunoBernardino commented Mar 29, 2023

@somoit-JSP All looks good and you sent me down a rabbit whole, from which I'll need @MaKleSoft to help me get out of.

This commit enabled this feature. And it was merged as part of this PR.

However, by the time v4.1.0 is released, that commit/code is no longer there.

You can also see in the history from the current main branch that the commit with this feature isn't there, so I'm guessing this got lost somewhere with a force push before releasing v4? Or was it something else I'm missing?

@MaKleSoft
Copy link
Collaborator

Sorry for the late response! I think I started writing a response two weeks ago but forgot to send it 😅

The PL_SERVER_DISABLE_SIGNUP is no longer available and was basically superseded by the whole provisioning mechanism. Basically, you can now achieve the same thing by configuring the provisioning layer like so:

PL_PROVISIONING_BACKEND=basic
PL_PROVISIONING_BASIC_DEFAULT_STATUS=unprovisioned

This has the downside that in order to whitelist new users you basically have to edit their provisioning status to active manually. Let me know if you need help with that!

@BrunoBernardino
Copy link
Contributor

I guess then we need to remove PL_SERVER_DISABLE_SIGNUP from the example env

@hampoelz
Copy link

Is it by design that PL_PROVISIONING_BASIC_DEFAULT_STATUS=unprovisioned continues to ask non-existing accounts to verify their email as if a new account were being created? (even if PL_SERVER_VERIFY_EMAIL_ON_SIGNUP=false is set)

@magiceupho
Copy link

magiceupho commented Nov 30, 2023

Hi,

@MaKleSoft I've tested this two variables but the signup is not disabled.
Here is my compose.yaml:

services:
  server:
    image: padloc/server
    container_name: padloc-server
    build:
      context: github.com/padloc/padloc.git#main
      dockerfile: Dockerfile-server
    env_file: ./.env
    ports:
      - 3000:3000
    volumes:
      - ./attachments:/attachments
      - ./data:/data
    restart: unless-stopped
    networks:
      - utils-network

  pwa:
    image: padloc/pwa
    container_name: padloc-pwa
    build:
      context: github.com/padloc/padloc.git#main
      dockerfile: Dockerfile-pwa
    env_file: ./.env
    ports:
      - 8080:8080
    restart: on-failure
    networks:
      - utils-network

networks:
  utils-network:
    external: true

Can you help me please ?

Regards

@MaKleSoft
Copy link
Collaborator

@magiceupho What does your .env file look like?

@magiceupho
Copy link

Hi,

@MaKleSoft here is my .env:

PL_HOSTNAME=padloc.***.fr
PL_ADMIN_EMAIL=***@***.fr
PL_EMAIL_BACKEND=smtp
PL_EMAIL_SMTP_HOST=mail.***.com
PL_EMAIL_SMTP_PORT=587
PL_EMAIL_SMTP_USER=***@***.fr
PL_EMAIL_SMTP_PASSWORD="***"
PL_EMAIL_SMTP_FROM=$PL_ADMIN_EMAIL
PL_DATA_BACKEND=leveldb
PL_DATA_LEVELDB_DIR=/data
PL_ATTACHMENTS_BACKEND=fs
PL_ATTACHMENTS_FS_DIR=/attachments
PL_PROVISIONING_BACKEND=basic
PL_PROVISIONING_BASIC_DEFAULT_STATUS=unprovisioned
PL_SERVER_CLIENT_URL=https://$PL_HOSTNAME
PL_SERVER_REPORT_ERRORS=$PL_ADMIN_EMAIL
PL_SERVER_ADMINS=$PL_ADMIN_EMAIL
PL_SERVER_URL=https://$PL_HOSTNAME/server
PL_PWA_URL=https://$PL_HOSTNAME

I use Traefik as proxy and loadbalancer.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants