Template Request: Unkey.dev
sameerkumar18
PROOP

5 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?

Closed$50 Bounty

22 Replies

sameerkumar18
PROOP

5 months ago


Railway
BOT

5 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!


5 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 5 months ago


sameerkumar18
PROOP

5 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

5 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>

5 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


5 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](http://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

5 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

5 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

4 months 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

4 months 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


tareq669
FREE

4 months 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

3 months ago

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

Category: Authentication

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


aimyltc
FREE

3 months ago

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


lholyos
FREE

3 months ago

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


lholyos

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

3 months ago

Please keep the conversation in English!


matt-meridian7
PRO

3 months ago

Huge fan of Doppler. Tight integration with Railway.


sameerkumar18

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

masteraiwork10-cyber
FREE

2 months ago

Are you looking for just API key management issuing, validating, rate limiting or a full API management platform with things like developer portals, documentation, monetization, and role-based access?


toxzak-svg
HOBBY

2 months ago


toxzak-svg

<https://railway.com/deploy/unkey-template> Here you go!

toxzak-svg
HOBBY

2 months ago

Its entirely streamlined. Give it a try!


ekf0
HOBBY

a month ago

Hi, you can try my template here: https://railway.com/deploy/unkey-railway-template and here's Github for all info: https://github.com/EKF0/unkey-railway-template


20 days ago

I'm unfortunately not seeing any templates worth the payout, so I'm going to close out this bounty.


Status changed to Closed brody 20 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...