Warning
This guide is currently a work in progress.
This guide will help you self-host Linky on your own infrastructure. Follow these steps to get your instance up and running.
We recommend first following the local development guide to get your instance running locally.
Before you begin, make sure you have the following installed:
- Node.js (version specified in
.nvmrc) - Docker and Docker Compose
- PostgreSQL 15.1 or later
- Git
git clone https://github.com/trylinky/linky.git
cd linkyYou will need to add the environment variables to where you are hosting the
frontend application and the API. Please refer to the turbo.json file for
the list of environment variables that you need to set for each application.
You'll need to set up the following services and add their credentials:
- AWS (for asset storage):
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGION
- Google OAuth:
AUTH_GOOGLE_CLIENT_IDAUTH_GOOGLE_CLIENT_SECRET
- Twitter (X) OAuth:
AUTH_TWITTER_CLIENT_IDAUTH_TWITTER_CLIENT_SECRET
- TikTok OAuth:
AUTH_TIKTOK_CLIENT_IDAUTH_TIKTOK_CLIENT_SECRET
- Stripe (for payments):
STRIPE_API_SECRET_KEYSTRIPE_WEBHOOK_SECRET
- Sentry (for error tracking):
NEXT_PUBLIC_SENTRY_DSNSENTRY_AUTH_TOKEN
- Tinybird (for analytics):
NEXT_PUBLIC_TINYBIRD_TRACKER_TOKENTINYBIRD_API_KEY
- Posthog (for analytics):
POSTHOG_API_KEY
- DynamoDB (for reactions storage):
REACTIONS_TABLE_NAME
- Slack (for notifications):
SLACK_TOKEN
- Instagram Integration:
INSTAGRAM_CALLBACK_URLINSTAGRAM_CLIENT_IDINSTAGRAM_CLIENT_SECRET
- Spotify:
SPOTIFY_CLIENT_IDSPOTIFY_CLIENT_SECRETSPOTIFY_REDIRECT_URL
- Threads:
THREADS_CALLBACK_URLTHREADS_CLIENT_IDTHREADS_CLIENT_SECRET
- TikTok:
TIKTOK_CALLBACK_URLTIKTOK_CLIENT_KEYTIKTOK_CLIENT_SECRET
- You will need to setup a PostgreSQL database. Once you have done so, you will need to add the following environment variables to your frontend and API applications:
DIRECT_URL=
DATABASE_URL=The migrations will be run automatically when you deploy the API.
Linky uses Turbo to run the frontend and backend applications. As such, you will need to use the following commands to run the applications:
Frontend:
turbo run build:frontend --filter=@trylinky/frontendAPI:
turbo run prisma:migrate prisma:generate --filter=@trylinky/prisma && turbo run build:api --filter=@trylinky/api- Always use HTTPS in production
- Keep your
ENCRYPTION_KEYsecure and never share it - Regularly update dependencies for security patches
- Use strong passwords for all services
Make sure you comply with the project's license terms when self-hosting.