Back

Docs in the self-hosted solution

  • 0
  • Databases
  • General
  • Web
kathelia.dokgu
13 Jul, 2023, 03:45

I don’t know if I’m just way too tired for today but I can’t seem to find the documentation for the collections I just made.

Okay so I just finished installing Appwrite on a VM with a custom domain, I created a new organization, database, collection, and then added a few documents in that collection for me to try and fetch using Postman.

I was trying to find that link to get those curl requests that you need to make to fetch documents but I can’t find it. Is it not available on the self-hosted solution?

TL;DR
The user wants to know if the documentation for the self-hosted solution is different from the cloud version. The support agent confirms that the documentation is the same for both self-hosted and cloud. The user mentions their preference for having the documentation integrated within the hosted solution. The support agent provides instructions for accessing Appwrite data on a self-hosted server using REST, GraphQL, or the Appwrite Web SDK. The solution does not provide a specific answer to the user's question about finding curl requests for fetching documents in the self-hosted solution.
Binyamin
13 Jul, 2023, 03:51

To fetch - or to access any of Appwrite data - on your self-hosted server is the same as the cloud. and for that you can use either

I recommend you'll go with the SDK as it makes the code much more easy to understand, for this the steps would be

  1. Add web platform in your project overview page
  2. Install Appwrite Web SDK
  3. Init it like so
TypeScript
import { Client, Database } from 'appwrite';

const client = new Client()
    .setEndpoint('https://[SERVER_ENDPOINT]/v1') 
    .setProject('[PROJECT_ID]');       
  1. Init the Database module
TypeScript
const databases = new Databases(client);
  1. Then fetch all your collection documents like so
TypeScript
const docs = await databases.listDocuments('[DATABASE_ID]', '[COLLECTION_ID]');

Replace

  • [SERVER_ENDPOINT] with your server IP or Domain.
  • [PROJECT_ID] with your project ID
  • [DATABASE_ID] with your database ID
  • [COLLECTION_ID] with your collection ID
kathelia.dokgu
13 Jul, 2023, 05:19

Thanks. I guess I was just really tired, I was actually thinking of Supabase where after you create your tables and add rows, it gives you code snippets on how to query the data using the structure you defined. But still, I wish the documentation was available from within the hosted solution too, there wasn't a single link for the docs in there and I had to go to the official Appwrite website to look it up. Not a huge deal but it would be nice if the docs were integrated. Especially since there's a chance that the version on the cloud is different from the version that I self-host. The correct docs version would be important in that case.

Anyway, thanks for the guide!

Binyamin
13 Jul, 2023, 05:19

Sure thing<:appwriteupvote:899677724615016528>

Binyamin
13 Jul, 2023, 05:20

Just to amplify all the documentation on the website are for both self-hosted and the cloud.

Binyamin
13 Jul, 2023, 05:20

There is no differences

Binyamin
13 Jul, 2023, 05:20

Just in the version

kathelia.dokgu
13 Jul, 2023, 05:21

Eventually the calls will get deprecated as the product grows.. that's just how software evolves.

Binyamin
13 Jul, 2023, 05:21

What you mean?

kathelia.dokgu
13 Jul, 2023, 05:24

Well if my self-hosted instance is outdated, it'll probably have deprecated functions that won't be documented in the website - or at least it could still be there and marked as deprecated. Anyway, like I said not a huge deal. I'll just try and keep my instance up-to-date all the time.

Binyamin
13 Jul, 2023, 05:27

Okay.

Just final thing The self-hosted is to verison after the cloud which mean the self-hosted is more featured then the cloud.

Tge upgrade process is not that hard, check this link to see what you would need to do when a new upgrade released.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more