From 717a85c3eca9085e4b293b1e0af9849a6ef56536 Mon Sep 17 00:00:00 2001
From: koenraad
+Cron jobs are not active by default because if you don't have the correct settings set (for SMTP, PushOver, Telegram), you might enter in a loop with errors and you could be blocked or banned from the external services. +
++Once you have setup the services correctly (entered credentials in .env file) you can activate the cron jobs. (We are only using the SMTP email service in this example) in the "postgres" database: +
++ Right-click on "postgres" database and select "Query Tool" ++ Execute the following SQL query: + +``` +UPDATE cron.job SET active = True; +``` + +### Adding a user by SQL query +I was not able to create a new user through the web application (still figuring out what is going on). Therefore I added a new user by SQL in the "signalk" database. ++ Right-click on "signalk" database and select "Query Tool" ++ Check the current users in your database executing the query: +``` +SELECT * FROM auth.accounts; +``` + + + ++ To add a new user executing the query: + +``` +INSERT INTO auth.accounts ( +email, first, last, pass, role) VALUES ( +'your.email@domain.com'::citext, 'Test'::text, 'your_username'::text, 'your_password'::text, 'user_role'::name) + returning email; +``` + +When SMTP is correctly setup, you will receive two emails: "Welcome" and "Email verification". ++You will be able to login with these credentials on the web +
++Each time you login, you will receive an email: "Email verification". This is the OTP process, you can bypass this process by updating the json key value of "Preferences": +
+ +``` +UPDATE auth.accounts +SET preferences='{"email_valid": true}'::jsonb || preferences +WHERE email='your.email@domain.com'; +``` + +Now you are able to use PostGSail on the web on your own AWS server! \ No newline at end of file