-
-
Notifications
You must be signed in to change notification settings - Fork 190
Installation 2.x
Cai Dongsheng edited this page Dec 12, 2019
·
12 revisions
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
sudo apt-get install python3-pip build-essential git
pip3 install pipenv --user
sudo mkdir -p /var/airnotifier/pemdir
cd ~
git clone -b 2.x git://github.com/airnotifier/airnotifier.git airnotifier
cd airnotifier
pipenv install --deploy
Copy config.py-sample
to config.py
, and change the settings accordingly.
(change pemdir to /var/airnotifier/pemdir)
Run the command below to set up the initial admin user:
pipenv run ./install.py
sudo pipenv run ./app.py
- In your browser: http://your_server_ip_address:8801 - Login as
admin
/admin
- Create a new an application
- In the application page you need to upload the certificate + key. Follow the steps indicated in developer.apple.com to create a new Development Push Notification certificate. To summarize, in keychain you'll create a signing request file (it will also generate a public and private key) and upload it to developer.apple.com.
- Download the generated aps_development.cer and double click on it to install it in keychain.
- Convert the aps_development.cer file into aps_development.pem file
openssl x509 -in aps_development.cer -inform der -out aps_development.pem
- From keychain export the private key in privatekey.p12 (you'll need to enter an export password). This private key has for name what you enter as "Common name" in during the signing request generation,
- Extract the key from this p12 file:
openssl pkcs12 -in Certificates.p12 -nocerts -out privatekey_with_password.key
-
You'll have to enter the export password and add a new PEM phrase.
-
Remove the PEM phrase from the key:
openssl rsa -in privatekey_with_password.key -out privatekey.key
- Upload both aps_development.pem and privatekey.key to AirNotifier.
- Launch the server, no error message should appear.
- Create an firebase app from here: https://console.firebase.google.com/
- Find the "Project ID" in project settings page:
https://console.firebase.google.com/project/<PROJECT-ID>/settings/general/
- Get the json key file from "Project settings" => "Service accounts", then generate the private key, download the json file, and copy paste content to airnotifier FCM settings.