Railway

Deploy needline

Open source self-hostable customer portal built on Linear

Deploy needline

Just deployed

/app/data

Deploy and Host needline on Railway

Open source self-hostable customer portal built on Linear

About Hosting needline

1. Create Linear app

a. Choose your name, enter other fields

b. In Linear -> Setttings -> API you can create application, with redirect URI - {base_url}/callback

c. Enable client credentials

d. After app creation, save Client ID and Client Secret, they will go under PUBLIC_CLIENT_ID, CLIENT_TOKEN as environment variables respectively.

2. Create encryption keys

a. Keys for encryption of cookies and file can be generated with

openssl rand -hex 32

(you need 2 32 bytes keys), they will go under COKIE_ENCRYPTION_KEY and STORE_FILE_ENCRYPTION_KEY as environment variables respectively.

b. For JWT encryption you can run

# private key
openssl genrsa -out private.pem 2048

# extract public key
openssl rsa -in private.pem -pubout -out public.pem

You wil use private on you company website to encrypt user data, and public should go under JWT_ENCRYPTION_PUBLIC_KEY as environment variable.

3. Create customer Authentication

more about how it works you can read here

a. Get your auth url under AUTH_URL environment variable, user will be redirected there with callback_url set to {base_url}/callback/company

b. When user is authenticated on your side, they need to be redirected to callback_url with user parameter set to encrypted, with earlier generated private key, stringified user json.

Common Use Cases

  • Customer portal to submit requests

  • Customer up voting requests to make it easy for developer to choose

Dependencies for needline Hosting

  • Linear

Deployment Dependencies

Implementation Details

Example of auth implementation

import { constants, privateEncrypt } from "node:crypto";

type User = {
  email: string;
  name: string;
  company: string;
};

const encrypt = (user: User, key: string) => {
  return privateEncrypt(
    {
      key: privateKey,
      padding: constants.RSA_PKCS1_PADDING,
    },
    Buffer.from(JSON.stringify(user), "utf8"),
  );
};

Why Deploy needline on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying needline on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
[Jun'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta