-
Create a static IP address under the Networking tab of Lightsail.
-
Point your preferred domain to this IP address: eg.
analytics.yoursite.com
. -
Create a Lightsail instance. Select Linux / OS Only / Amazon Linux 2 (the default).
-
Be aware that the Plausible stack requires quite a bit of resources so the lowest tier instances won't cut it. $10 or $20 dollar /month instances should suffice.
-
Optionally enable snapshots or change the default ssh key.
-
Wait for the instance to come online
-
Under the networking tab of the instance, attach your static IP to the instance. Also add an HTTPS firewall rule.
-
Connect to your instance using the web ssh client.
-
Execute the following commands (fill in the custom values first):
sudo su
yum install -y git
cd $HOME
git clone https://github.com/kiwiidb/plausible-hosting 2>/dev/null
cd plausible-hosting
chmod +x install.sh
export ADMIN_USER_EMAIL=<your email>
export ADMIN_USER_NAME=<your name>
export ADMIN_USER_PWD=<your secure password>
export HOST=<your host>
export MAILER_EMAIL=<"from" email for plausible mails send from smtp>
export SMTP_HOST_ADDR=<smtp address>
export SMTP_HOST_PORT=<smtp port (465)>
export SMTP_USER_NAME=<smpt username>
export SMTP_USER_PWD=<smtp pwd>
./install.sh
- After this has completed, check if everything is up and running using
docker ps
. Be aware that you need root privileges for running docker commands. - Surf to
analytics.yoursite.com
to check out your new Plausible server :).
Out of the box, the smtp mailer does not seem to work. To enable e-mail functionality, you could try to use an external SMTP server or Postmark API. See the docs.
This repository acts as a a template to get up and running with Plausible Analytics.
Find instructions on how to run Plausible Analytics Self Hosted in our docs.
We are always looking to expand on the options and setups provided here. Feel free to open an issue or PR if you feel something could be improved.