Rabbit-Company / Passky-Server

Server for Passky (password manager)
https://passky.org
GNU General Public License v3.0
166 stars 22 forks source link

[Question] How to install Passky Server with GUI on a shared Web hosting plan? #8

Closed vzool closed 1 year ago

zigazajc007 commented 2 years ago

Requirements

  1. At least PHP 8.0
  2. At least MySQL 8.0 or MariaDB

Setup

Database

Web Panel

  1. Create the user with strong password and DON'T allow remote connection. (Don't use %, but rather use 127.0.0.1)
  2. Create database
  3. Give all permissions for created user to the database
  4. Create all tables. SQL code is located HERE.
:warning: WARNING
Make sure to replace placeholder called 'MYSQL_DATABASE' with the name of your database in the step 4.

Manually

# Make sure you change somePassword to a complicated password.
CREATE USER 'passky'@'127.0.0.1' IDENTIFIED BY 'somePassword';
# Create database
CREATE DATABASE passky;
# Give all permissions for user passky to the database named passky  
GRANT ALL PRIVILEGES ON passky.* TO 'passky'@'127.0.0.1' WITH GRANT OPTION;

Last step is to create all tables. SQL code is located HERE.

:warning: WARNING
Make sure to replace placeholder called 'MYSQL_DATABASE' with the name of your database.

API

  1. Upload all files and folders from api/src directory to your root folder of the website (Usually called public_html).
  2. Create 2 additional files called api-limiter.json and tokens.json one folder behind public_html folder with a json content:
    {}
  3. Open Settings.php file located in public_html folder and change settings under "DATABASE SETTINGS" category. Other settings are optional.
  4. Install dependencies located HERE thru composer. Shared Hosting providers should provide you access to the composer.

Testing

Now you can open the website and it should inform you if any major mistake was detected. But keep in mind that those mistakes are currently only based for docker deployment. So it will inform you about insecure connection or if API doesn't have access to the database, but it won't inform you if composer dependencies weren't installed or any other mistake that isn't present thru docker-compose installaion.

I will focus on shared hosting more and will also make installation easier in the near future.

CMB244 commented 1 year ago

sorry, this is just for testing purpose

zigazajc007 commented 1 year ago

Documentation is now available here: https://github.com/Rabbit-Company/Passky-Server/blob/main/docs/installation/shared-hosting.md