Welcome to the self-hosting page for SyncLinear.com. If something doesn't seem right, please feel free to open a PR or raise an issue!
- Copy the environment file with
cp .env.example .env
- If you'll be sharing your instance with teammates, you'll need to create OAuth apps for both GitHub (under your org > developer settings) and Linear. Replace
NEXT_PUBLIC_LINEAR_OAUTH_ID
andNEXT_PUBLIC_GITHUB_OAUTH_ID
with your OAuth app IDs (safe to share publicly). Populate theGITHUB_OAUTH_SECRET
andLINEAR_OAUTH_SECRET
environment variables (.env) with your OAuth secrets. Keep these secret! - Generate an
ENCRYPTION_KEY
by runningnode
in a terminal thencrypto.randomBytes(16).toString("hex")
.
To persist IDs, you'll need to provision a simple SQL database. One easy option is Railway:
- Click "Start a New Project" → "Provision PostgreSQL" (no sign-up required yet)
- Once the DB is ready, focus it → go to "Connect" → "Postgres Connection URL" → hover to copy this URL. It should look like
postgresql://postgres:[email protected]:1234/railway
.
To point the app to your database,
- Paste the connection URL (from step 3 above if you're using Railway) to the
DATABASE_URL
variable in.env
- Run
npx prisma migrate dev
to generate tables with the necessary columns - Run
npx prisma generate
to generate the ORM for your database
- Install dependencies with
npm i
- To start the app locally, run
npm dev
- To receive webhooks locally, expose your local server with
ngrok http 3000
(or the port it's running on). This will give you a temporary public URL. - To start syncing repos to Linear teams, follow the auth flow at that URL
That's it! Try creating a Linear issue with the Public
tag to trigger the webhook and generate a GitHub issue.
Warning Manually modifying a webhook may break the sync.