With this PHP web app you can set up your own server for the Android and iOS app "Customer Database".
- multi-tenant capable
- read-only CardDAV API (e.g. for syncing with your email client or router phone book (for DECT phone))
- Linux OS (Debian recommended)
- Apache 2 Webserver + PHP 7
- MySQL/MariaDB Database Server
- Install Apache 2, PHP 7 (with
php-curl
) and MySQL/MariaDB on a Linux server. - Download the latest release and unpack it into
/srv/www/customerdb
. - Set your Apache (virtual host) web root directory to
/srv/www/customerdb/web
by editing the corresponding configuration file inside/etc/apache2/sites-enabled
. - Create a database on your MySQL server and import the schema from
sql/customerdb.sql
. - Edit/create
conf.php
from the example file (conf.php.example
) and enter your MySQL credentials. Please do not use the root user but create a new user which is only allowed to operate on the specific database. - Select "Own Server" in the settings of your Customer Database app and enter the full URL to the
web/api.php
script. Example:http://192.168.2.10/api.php
. - Create an account. You can do this in the app (if the API and registration is enabled in
conf.php
) or by using the command line tool on the server (php console.php createuser <username> <password>
).
- Download the latest release and unpack it into your webspace.
- Create a database on your MySQL server and import the schema from
sql/customerdb.sql
using phpMyAdmin or a similar web-based tool from your hosting provider. - Edit/create
conf.php
from the example file (conf.php.example
) and enter your MySQL credentials. - Select "Own Server" in the settings of your Customer Database app and enter the full URL to the
web/api.php
script. Example:http://example.com/web/api.php
. - Ensure that the API and registration is enabled in
conf.php
. Now create a sync account inside the app. - After you created your personal account on your server, you may now want to disable the registration in
conf.php
.
Especially if your server is available from the internet (and not only locally in your home network):
- it is highly recommended to setup HTTPS on your web server
- it is highly recommended to setup fail2ban on your web server (see lib/fail2ban for more information)
- you may want to disable the user registration in the
conf.php
file (you can also disable the API or the web frontend here)
For upgrading your server to a newer version, please read Upgrade.md.
Please have a look at the docs folder.
Currenty, these scripts only provide the API. It is planned to provide a full web frontend for creating and editing customer records in the web browser.