Template Request: Unkey.dev
sameerkumar18
PROOP

2 months ago

Hi, I'm looking for a API key management solution - primarily looking at Unkey.dev OR fusio -- can someone please help with the template?

$50 Bounty

18 Replies

sameerkumar18
PROOP

2 months ago


Railway
BOT

2 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


2 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 2 months ago


sameerkumar18
PROOP

2 months ago

@cocashen I'm not sure we're on the same page here.
The ask here is to create a Railway template that allows one-click self-host/self-deploy for Unkey.dev - http://github.com/unkeyed/unkey/

An example Railway template for Typesense - https://github.com/railwayapp-templates/typesense

On a side note, I've found Flexprice.io to be a very strong API Billing management solution. I'm trying out their cloud offering, but would be good to have their Railway template as well!


sameerkumar18
PROOP

2 months ago

@cocashen - can you move the railway template to a new github repo?
Also, to confirm, have you gotten a chance to try deploying it on Railway, and tested some of the Unkey's functionalities yourself?


sameerkumar18

I also requested these 7 months back here https://station.railway.com/community/what-templates-do-you-wish-existed-865e6f36#88bs

2 months ago

I've got ~6 hours this Saturday lined up to work on getting this up as an actual template.

If I run into any issues, I'll let you know. It looks like their docs for self hosting are pretty barebones so I'll post any updates here


2 months ago

I spent a few hours digging into Unkey and unfortunately don't think it's a good fit for the type of templates I want to maintain.

Happy to pass my notes to anyone else interested in taking it on. Here's what I ran into:

  • Non-existent hosting docs: Unkey is open source, but there's no official docs or guidance on hosting it yourself. I ended up reading through their codebase to piece together a working setup. It very much feels like self-hosting isn't an intended use case.

  • Requires 3rd party services: Requires Clerk.dev for auth and PlanetScale for the database (they don't officially support standard MySQL/MariaDB). I got it running against MySQL, but I wouldn't count on that remaining viable as they continue development.

It's definitely possible to template this, but given the documentation gaps and required external dependencies to get the whole app running (Dashboard, API, etc), it's not something I want to take on personally. If someone else is comfortable with the Clerk/PlanetScale reqs and is willing to document the setup process themselves, have at it! best of luck 🫡


mykal

I spent a few hours digging into Unkey and unfortunately don't think it's a good fit for the type of templates I want to maintain.Happy to pass my notes to anyone else interested in taking it on. Here's what I ran into:Non-existent hosting docs: Unkey is open source, but there's no official docs or guidance on hosting it yourself. I ended up reading through their codebase to piece together a working setup. It very much feels like self-hosting isn't an intended use case.Requires 3rd party services: Requires Clerk.dev for auth and PlanetScale for the database (they don't officially support standard MySQL/MariaDB). I got it running against MySQL, but I wouldn't count on that remaining viable as they continue development.It's definitely possible to template this, but given the documentation gaps and required external dependencies to get the whole app running (Dashboard, API, etc), it's not something I want to take on personally. If someone else is comfortable with the Clerk/PlanetScale reqs and is willing to document the setup process themselves, have at it! best of luck

sameerkumar18
PROOP

2 months ago

@mykal appreciate you considering and looking into it. It's definitely a mystery to self-host some of these new-age products with cloud-focus. Checkout this thread - https://github.com/unkeyed/unkey/issues/1964

(Side note - Feels like the "Open Source" tag is just a marketing gimmick. Similar to Unkey, I know more YC companies who advertise themselves as OSS, but you'll almost never be able to figure how to host it and their sales guy will somehow manage to buy the Cloud plan)


xavto
PRO

2 months ago

Hi, I’ve made a tested, production-ready Railway template for Fusio as an alternative to Unkey:

https://railway.com/deploy/fusio-api-management-platform

Note: on the first startup, it can take a short moment while the database migrations complete.


Hi, I have deployed unkey in Railway. Here is the working template https://railway.com/deploy/unkey?referralCode=tamilarasi

My Template Demo LInk for - https://unkey.up.railway.app/v2/liveness ( will delete this one in 2 days )

Can some one confirm me where it's meet the requiremnt of this thread. Thanks


Anonymous
HOBBY

a month ago

Per the railway docs there is already a Railway template for Unkey that deploys Unkey + MySQL + Redis.

Deploy using the link below and then set the vars correctly which are

UNKEY_DATABASE_PRIMARY, UNKEY_REDIS_URL, and UNKEY_ROOT_KEY per the template instructions

Deploy and Host Unkey on Railway

https://railway.com/deploy/unkey

Open Railway template: Deploy unkey

Click Deploy Now (it creates Unkey + MySQL + Redis) as shown in the link

Copy vars from redis and MySql

generate a root key

${{random.hex(32)}}


sameerkumar18

I also requested these 7 months back here https://station.railway.com/community/what-templates-do-you-wish-existed-865e6f36#88bs

kidmax89
HOBBY

a month ago

do you mean where the app can run but you dont have to put to put secrets in the environment to use them but on screen import and they work


paulwilltell
HOBBY

a month ago

Hey folks — I think we might be slightly talking past each other, so I want to sanity-check the direction before anyone sinks more hours into this.

From what I’m seeing, the real blocker isn’t Unkey usage itself, but the lack of an opinionated, fail-fast Railway template for self-hosting Unkey with sane defaults.

Concretely, I’d propose:

  • An intentionally single-instance, single-region template (no HA, no sharding)

  • Railway-managed Postgres as a hard requirement (no SQLite / ephemeral FS)

  • Explicit env var validation on boot (DATABASE_URL, UNKEY_MASTER_KEY, JWT secret, etc.)

  • A simple healthcheck (/health) so deploys fail loudly instead of half-working

  • Clear README scope: what this supports and what it explicitly does not

The goal wouldn’t be “perfect self-hosting,” just one-click deploy that works on first run and makes misconfiguration obvious.

Before going deeper:

Does this align with what you’re trying to ship as a Railway template, or are you aiming for something more flexible / production-HA from day one?

If this direction makes sense, I’m happy to help sketch the exact template structure or review what’s already in progress.


angeldanielmartinez424-glitch
FREE

20 days ago

En Railway, la solución más simple y escalable para Go es usar Unkey como servicio externo y validar las claves en middleware. No necesitas infraestructura adicional ni self-hosting. Si necesitas API gateway completo con monetización y versionado, entonces Fusio sería opción, pero implica mayor mantenimiento en Railway.


tareq669
FREE

16 days ago

Hi, If your primary goal is API key management (not full API gateway management), I would strongly recommend Unkey over Fusio. Fusio is more of a complete API management platform and may be overkill if you only need key validation, permissions, and rate limiting. Below is a practical template setup using Unkey with a Node.js (Express) API.

1-Basic Architecture Client sends request with x-api-key Middleware verifies key via Unkey Optionally check scopes / rate limits Continue request if valid

2-Example Node.js Template Install: npm install @unkey/api Middleware:

javascript

import { verifyKey } from "@unkey/api"; export async function apiKeyMiddleware(req, res, next) { const key = req.headers["x-api-key"]; if (!key) { return res.status(401).json({ error: "Missing API key" }); } const { valid, ownerId, meta } = await verifyKey({ key, }); if (!valid) { return res.status(403).json({ error: "Invalid API key" }); } req.apiOwner = ownerId; req.apiMeta = meta; next(); } Use it:

Javascript

app.use("/api", apiKeyMiddleware);

3-Adding Scopes Example When creating keys in Unkey dashboard, assign scopes like: read:data write:data Then check inside middleware:

Javascript

if (!meta?.scopes?.includes("read:data")) { return res.status(403).json({ error: "Insufficient scope" }); }

4-When to Choose Fusio Instead Use Fusio only if you need: Full API gateway OAuth2 flows API analytics dashboard API monetization Developer portal Otherwise, Unkey is faster, simpler, and easier to integrate.


esoolsieicujeht
FREE

14 days ago

Description: One-click deploy for Unkey API, including MySQL and Redis.

Category: Authentication

URL: https://railway.com/deploy/unkey-api-management


aimyltc
FREE

4 days ago

I can build anything anytime anywhere no matter how complex so let me have it


lholyos
FREE

3 days ago

Ich wäre auch sehr an der fertigen llsung interessiert. slightly_smiling_face emoji


lholyos

Ich wäre auch sehr an der fertigen llsung interessiert.

5 hours ago

Please keep the conversation in English!


Loading...