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

PASSKY on Synology DSM #25

Open
virgo77 opened this issue Dec 31, 2022 · 7 comments
Open

PASSKY on Synology DSM #25

virgo77 opened this issue Dec 31, 2022 · 7 comments

Comments

@virgo77
Copy link

virgo77 commented Dec 31, 2022

Hi! How are you! Hope fine :)

With the latest posts we replied each other, I found that you Passky-Server is available on Docker Hub, which is used by Synology on DSM. So, I'm trying to install it on my NAS Synology with DSM 7.1 up-to-date, instead of a dedicated Linux Server.

I don't know if you use Synology but I hope I can find some help here.

So, here are the Passky-Server packages on Docker Hub: https://hub.docker.com/search?q=passky
I installed these 3 packages under my Synology Docker:

  • Passky API
  • Passky DataBase
  • Passky Web (maybe optional)

Passky API and Passky Web are working. But about the DB, i had to add some variables following the MariaDB official website.
After adding the variables, all 3 packages are running well and I can get on the Start Page correctly. But when I try to create a user, I got an error about the DB, telling me that "Something went wrong while connecting to the database!"

I'm sure it's a pb with the API in which I have to give some informations. But, on DSM, we don't have much settings to do. So, maybe I have to edit a config file somewhere, but I didn't find it. If you know what to change, I'll be glad ^^

Thanks a lot and see you later

V.

@zigazajc007
Copy link
Member

Hello,

Passky Server includes .env.example file, here you can find all env variables.

.env.example -> https://github.com/Rabbit-Company/Passky-Server/blob/main/.env.example

I have never used Synology, but I bet there should be an option to set env variables.

In .env.example file you can see section for database settings. This needs to be changed so Passky API will know how to connect to the database.

Passky Server uses docker compose for easier deployment, so if you have option to use docker compose to deploy Passky Server on Synology the process will be a lot easier. As docker compose will auto create virtual network and put both Passky API and Passky Database containers in the same network, so they can communicate between each other, so we don't need to open any port for Passky Database container (This improves security) as then we can't just avoid Passky API and connect right to the database.

@virgo77
Copy link
Author

virgo77 commented Dec 31, 2022

Thanks for your reply.
On Synology DSM, when installing Docker, Docker Compose is included.
I took a look on the .env variables and I tried to adapt to my installation, but still not working.

I will try to ask on Reddit or somewhere else for some help. I'm sure this is not too hard to configure. Maybe I'm doing something wrong ^^

I'll be back! (damn, so good! :D)

See you

V.

@zigazajc007
Copy link
Member

As soon as you have deployed Passky Database container then folder /passky will be created that includes database files.

So even if you change env variables the database will still use the user with old creditions.

Try deleting /passky folder and redeploy all containers.

@virgo77
Copy link
Author

virgo77 commented Jan 1, 2023

I really thank you for your advices!
It works :)
But not with the Docker Packages available via the Synology DSM.
What I did:

  • delete the actual containers
  • uninstall the Docker Packages
  • enable the DSM SSH
  • install Passky using your tuto (using the installer.sh script). The downloading/installation works, but the containers' creation fails (when creating the DB container first)
  • then delete the database container which failed
  • then create new containers with manual variables. Note that if I install passky with SSH on Synology, it adds a new network bridge named "passky-server_passky" which is not available when using Docker Hub. Not sure if it's useful but it works with it ^^

Here are the variables I added:

  • For the database "passky-database": MYSQL_DATABASE / MYSQL_ROOT_PASSWORD / MYSQL_USER / MYSQL_PASSWORD
  • For the api "passky-server": SERVER_LOCATION / MYSQL_HOST / MYSQL_PORT / MYSQL_DATABASE / MYSQL_USER / MYSQL_PASSWORD

The server works. I can create new accounts and credentials. But the password issue (with backslash, and new character) is still here. Maybe it is not fixed yet :)
And I can't connect with admin account as I did not install the nginx proxy manager (and maybe because I did not add the variables too. I don't know where to add these 2 lines (db or api)).

So, now, I have to wish you an Happy New Year! And most important: health! Be good, and take care! ;)

V.

@zigazajc007
Copy link
Member

zigazajc007 commented Jan 1, 2023

Secure Cookies are set to true, this means Admin Panel will only work on a secure connection (SSL / TLS / HTTPS).

In next Passky Server update you will be able to disable secure cookies by providing another env variable and Admin Panel will work.

I'm currently sick so I will start working on Passky again when I get better (Hopefully in few days).

Yes, backslashes have not been "fixed" yet. The best and safest option would be to prevent user from using it. Backslashes are reserved for escaping. So every time user will input backslash, Passky Client will probably show that this character is illegal and shouldn't be used.

Another option would be to escape the escape character (backslash), but this can bring a lot of security vulnerabilities, so I don't think it is worth it.

Test if Github comments escape characters: \ @

Edited: As you can see I have used 2 backslashes in this test and Github comments only showed 1 backslash.

So it is normal behaviour. Backslash should not be used anywhere except if you want to escape characters.

@virgo77
Copy link
Author

virgo77 commented Jan 1, 2023

Ha! I hope it's not Covid.
I had it about less than 3 months ago... and I was sick again for X-Mas. Just a flu.
So, take care. Have rest. And take your time!

About backslash, we discuss about it weeks ago so I knew about this issue as you explained me why. So don't worry about that ;)

See you later ;)

V.

@zigazajc007
Copy link
Member

In the middle of Covid I got another virus, so now I don't know if I still have Covid or it's just another virus.

And happy new year to you too.

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

2 participants