Important compatibility note
How to set up Piwik on freistilbox
Create a database
You have two options here: either you create a new site just for Piwik, or you create a second database for an existing site. By default, we limit the number of data bases per site to one, but we can raise this limit to allow more. Just contact our support team.
Unpack Piwik locally
Clone the git repo of the site you want to install Piwik to and unpack the Piwik tarball or zipfile into the docroot/ directory, but do not yet push. It is important that Piwik is reachable under the /piwik location (e. g., www.domain.com/piwik) as we already have our default Varnish configuration set up in a way to properly handle Piwik.
Remove config directory from the repository
Parts of Piwik must be writeable and thus reside in the shared storage of freistilbox. These parts must not be checked in via git, but you need to copy them there once not using git. So move (not copy!) this directory out of the git repository:
mv /docroot/piwik/config /tmp
The files inside that directory need to be copied after you have pushed the repository (don’t do that yet), see below.
Changes to the .gitignore file
Append these lines to your existing .gitignore file:
Adapt the Boxfile
The [Boxfile][boxfile] configures the shared folders for this site. For Piwik, you need at least these entries:
version: 2.0 shared_folders: - docroot/piwik/tmp - docroot/piwik/config
Create a file called
.user.php in the docroot/ directory containing at least this:
Commit all changes and deploy them using
Copy config files
Copy the files you moved to
/tmp before to the shellhost, and there to the correct location. You can do this by issuing:
rsync -avz /tmp/config/* sSITE-ID@cCLUSTER-IDs.freistilbox.net:current/docroot/piwik/config
Replace SITE-ID and CLUSTER-ID with the correct values for your site and cluster. The actual command would look like this:
rsync -avz /tmp/config/* firstname.lastname@example.org:current/docroot/piwik/config
Confirm your installation is working. As mentioned above, the core functionallity will work, but you may encouter error messages saying that piwik.js is not writeable. If you encounter any issues, do not to hesitate contact our support team.