Avatar of Faraz PatankarFaraz Patankar

Deploy Offen on Railway

Offen is an open-source, lightweight, and free analytics solution. It is GDPR compliant with no ads or third parties involved and only uses first-party cookies. Offen is also opt-in only which means users must actively give consent to data collection and have full access to their data.

To deploy your Offen instance on Railway, click the button above, enter the prompted environment variables, and then hit deploy. The required PostgreSQL database will be automagically provisioned for you.

Pre-configured environment variables:

  • OFFEN_DATABASE_CONNECTIONSTRING: This points to the DATABASE_URL of the PostgreSQL database that is deployed as part of the template
  • OFFEN_DATABASE_DIALECT: Defaults to postgres which is the database our Offen instance will be using
  • PORT: Defaults to 80 which is the port the Offen server runs on

Required environment variables:

  • OFFEN_SECRET: A Base64 encoded secret that is used for signing cookies and validating URL tokens
💡
Pro Tip: You can hit CMD+K to open the command palette and use our secret generator to generate a random secret.

After you configure the environment variables and hit deploy, you will be taken to your project. Upon successful deployment, your Offen instance should have a live URL. Visit the /setup endpoint to create your first account on Offen.

Offen account setup page

Offen account setup page

Once you’ve created your account, you will be redirected to the login page where you can log in as the operator of your Offen instance. Once you login, you should be able to view your dashboard.

New Offen analytics dashboard

New Offen analytics dashboard

You can now copy the embed code provided by Offen and add it to any website to start capturing analytics.

💡
To add additional accounts, you can visit the admin console at /console and create one. Your dashboard should then show two accounts and their respective embed codes.

Your Offen instance should now be live and fully functioning. You can now create accounts and start capturing analytics data for all your websites!


You might also be interested in another post we’ve written on self-hosted analytics alternatives which features templates for Ackee and Umami.

We hope you found this tutorial useful. If you have suggestions for more open-source self-hosted application guides, let us know on Discord!