Creating First Admin #1437
Replies: 1 comment
-
@thakurritesh19 try including the environmental variable
YAML example: SFTPGO_DATA_PROVIDER__CREATE_DEFAULT_ADMIN: true
SFTPGO_DEFAULT_ADMIN_USERNAME: admin
SFTPGO_DEFAULT_ADMIN_PASSWORD: admin |
Beta Was this translation helpful? Give feedback.
-
According to readme.md in https://github.com/drakkan/sftpgo, 1 way of creating first admin is by enabling create_default_admin in your configuration file and setting the environment variables SFTPGO_DEFAULT_ADMIN_USERNAME and SFTPGO_DEFAULT_ADMIN_PASSWORD.
I followed this and despite setting those successfully, I am unable to create first admin.
The reason I want to do this is to automate creating SFTPGo instance on GCP and then initialize it with some predefined Admin Username and Password.
This is the startup script I use:
While everything in my script works, when I access "https://IP:8080/web/admin" first time after installing SFTPGo, it still asks me to create first admin.
I restarted the service like this:
sudo systemctl restart sftpgo
Service failed to restart.
I checked the logs like this:
journalctl -u sftpgo
I see this error:
{"level":"error","time":"2023-10-17T00:50:46.006","sender":"service","message":"error initializing data provider: to create the default admin you need to set the env vars \"SFTPGO_DEFAULT_ADMIN_USERNAME\" and \"SFTPGO_DEFAULT_ADMIN_PASSWORD\"""}
Can anyone let me know if I am missing anything here please ? I am indeed setting these ENV vars. I logged into the instance and checked that required ENV vars are globally declared.
Beta Was this translation helpful? Give feedback.
All reactions