Hello everyone. We’re self hosting and trying to u...
# api
a
Hello everyone. We’re self hosting and trying to use the API but pointing to our self_hosted db. The docs indicate this: “_Hosted api through cal.com_ _Go to console.cal.com Add a deployment or go to an existing one. Activate API or Admin addon Provide your
DATABASE_URL
Now you can call api.cal.com?key=CALCOM_LICENSE_KEY, which will connect to your own databaseUrl_.” However, we can’t find any place to enter the DATABASE_URL to our deployment via console or even the option of an API or Admin addon. We do have a working database url added to .env of course, in order for our self hosted site to work, but no idea of how to make it work with the hosted API
p
@zomars is this correct?
the license key should be in .env, no?
can you help Augusto?
z
Where are these docs?
a
License key is already in .env
We get a response back in Postman that indicates databaseurl has not been set
z
Database url should be on env as well
But this if for self hosted api
a
we’re unable to make self-hosted API work, so we’re trying to use your hosted api with our database url according to your docs here:
z
_Provide your
DATABASE_URL
Now you can call api.cal.com?key=CALCOM_LICENSE_KEY, which will connect to your own databaseUrl_.” This is not a thing yet. Hosted API is not fully implemented yet
a
message has been deleted
It’s in your docs… sigh…..
We’ve wasted hours trying to make this work…
z
we’re unable to make self-hosted API work
Care to provide more context on which difficulties did you encounter self hosting?
a
I can. However, there is no acknowledgement to the fact that your docs indicate a procedure that is “not a thing yet”? We’re on the platform plan trial, but we’ll become paying customers if we can make cal.com work
First can you clarify what the procedure is to self-host the API project?
We’re following the instructions here:
Copy code
git clone --recurse-submodules -j8 <https://github.com/calcom/cal.com.git>
when we do that locally, the apps/api folder is empty
z
Do you use ssh keys to authenticate locally?
a
this is pointing to a https repo, so github required a password token, rather than ssh keys. We did provide that, else it would not clone
z
I’ll use this feedback to further improve the API onboarding experience BTW. Thank you for your patience
a
thank you. So I’m guessing the fact that the apps/api folder is empty means we’re doing something wrong? I do have access to this private repo in my github account, as you’ve invited me already.
z
We need to investigate what’s wrong there since most people seems to don’t have the issue
a
message has been deleted
message has been deleted
z
a
just followed the step by step instructions by doing
submodule init
and then
submodule update
message has been deleted
got this error
this is a new clone attempt in another folder
z
One sec
Sounds like the update command is trying to write to the repo and the invite is read only
Can you revert this file and see of that’s working for you? https://github.com/calcom/cal.com/commit/be6ca25f08bc31cc75a6834b492f7a54bfb22cc1
a
Can you clarify what you mean by revert?
I just do git revert and the hash?
z
Just replace the file contents and see if that works
a
I think I have it working in another machine
apps/api is still empty locally but the git submodules update did not fail
and I do see this in git status
message has been deleted
So I now have to copy and modify the .env file
and then deploy to vercel
but this is not MY repo, but actually cal.com repo
So how I commit my changes and deploy? Wouldn't it have made more sense to fork the original repo to one of mine before cloning?
thats what we did to get our self hosted environment (without API) working on our domain
z
That makes sense
a
ok. but that's what the docs for API say. You really need to fix the docs
Will try new process and report back
z
It makes sense if you’re planning to make changes. But to use it out of the box not so much
a
Tried everything. API is not working. Trying to run this locally we get the following error:
message has been deleted
despite all env vars being set up
Trying to deploy this to Vercel following the Readme instructions gives us this:
message has been deleted
So far we’ve wasted almost a week integrating with your platform and it just does NOT work. We’re getting really frustrated here. And the product team wants to kill us
I have a 30 minute call scheduled for tomorrow with Syed Ali Shahbaz. Will he be able to help?
z
He should be able to help just fine. We’re sorry that your experience haven’t met your expectations. Hoping tomorrow’s call will help clear out things for you.
Thanks again for your time. We already made the necessary updates to the README: https://github.com/calcom/api/commit/26ea743af23f84c1186e1f4235fa22cdb905a4c1