Skip to content

Commit 8544596

Browse files
Merge pull request #2555 from appwrite/tanstack-deploy-blog
tanstack start appwrite sites blog
2 parents 51840fe + fef32f0 commit 8544596

File tree

5 files changed

+73
-0
lines changed

5 files changed

+73
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
layout: post
3+
title: Deploy a TanStack Start app to Appwrite Sites
4+
description: Learn how to deploy a TanStack Start app to Appwrite Sites.
5+
date: 2025-10-31
6+
cover: /images/blog/deploy-tanstack-start-app-to-appwrite-sites/cover.png
7+
timeToRead: 5
8+
author: atharva
9+
category: tutorial
10+
featured: false
11+
---
12+
13+
TanStack Start is growing in popularity and developers are choosing to use it more over other alternatives. To empower these developers, we just announced support for TanStack Start in Appwrite Sites.
14+
15+
In this article, you will learn how to deploy your TanStack Start app completely free of cost. We will use Appwrite Sites to achieve that. Appwrite is an all-in-one open-source BaaS (backend as a service) that handles the backend part of your application so that you can focus on the app's core logic rather than unnecessary technical details.
16+
17+
Appwrite Sites is a frontend hosting service that can help you deploy your TanStack Start (or any web framework) app in minutes with full SSR (server-side rendering) functionality.
18+
19+
# Testing your TanStack Start build
20+
21+
Before you deploy your TanStack Start app, it's essential to see if it builds successfully. Building is a process where the framework bundles your app into files that can be run on a server and a browser, depending on your usage of SSR (server-side rendering).
22+
23+
To build your TanStack Start app, run the following command in your terminal:
24+
25+
```bash
26+
npm run build
27+
```
28+
29+
If your build succeeds, you can deploy your TanStack Start application to the internet. If your build fails, you must fix all the errors in your application. When deploying a TanStack Start app, the deployment provider builds your app on their servers, and cannot deploy if the build fails.
30+
31+
# Configuring your Site on Appwrite
32+
33+
This article assumes you have your TanStack Start app code stored in a GitHub repository. If not, please do so, as it is needed for deployment. Deploying through code stored on GitHub also introduces advantages such as automatic deployments, preview deployments, etc.
34+
35+
Now, let's link your GitHub repository to Appwrite Sites.
36+
37+
- Go to [Appwrite Console](https://cloud.appwrite.io) and sign in using your preferred authentication method.
38+
- Create a new project, or use an existing one.
39+
- Click on the **Sites** option on the sidebar.
40+
- Click on **Create Site**.
41+
- Click on **Connect a GitHub repository**.
42+
43+
Now, you should be able to see the most recent GitHub repositories based on activity.
44+
45+
![Selecting the repository](/images/blog/deploy-tanstack-start-app-to-appwrite-sites/repository-selection.png)
46+
47+
Click **Connect** against the desired GitHub repository. The TanStack logo should be the icon of any valid TanStack Start app.
48+
49+
Once you connect your GitHub repository, you will be presented with options for deployment.
50+
51+
![Configuring the site](/images/blog/deploy-tanstack-start-app-to-appwrite-sites/configuring-site.png)
52+
53+
Fill in the details as desired. Although there are some things you must know before moving forward.
54+
55+
- If you're using a different branch for your intended production website, choose the specific branch.
56+
- If you're using a monorepo, Sites might not automatically detect your application. In such cases, manually provide the root directory for your TanStack Start app that contains the configuration file. For example, if you're using Turborepo, your app might be located inside one of the folders in the `apps` folder, so your root directory should be something like `./apps/web`.
57+
- Most users don't need to change the **Build settings**, although if you want to run different commands for installation and builds, you can configure those in this section. If you don't know anything about this, it's worth skipping this section altogether.
58+
- If your app uses environment variables, add them in the **Environment variables** section. If your app uses sensitive API keys, you are likely using environment variables.
59+
- In TanStack Start, public environment variables start with `VITE_`. These environment variables are accessible in the browser environment, so don't store your sensitive API keys in a variable that starts with that prefix.
60+
- Configure an Appwrite Network subdomain to get started. Don't worry, you can configure a custom domain once your app is deployed.
61+
62+
Now, hit the **Deploy** button, and the deployment process will begin. You can see the build logs as your website gets deployed.
63+
64+
# Next steps
65+
66+
![Site successfully deployed](/images/blog/deploy-tanstack-start-app-to-appwrite-sites/deployed.png)
67+
68+
Once your TanStack Start application is deployed, you can view it on the provided domains on the deployment success splash screen or in the Sites section of the Appwrite console.
69+
70+
Now, you can perform further steps to level up your experience with Appwrite Sites:
71+
72+
- [Custom domains with Appwrite Sites](/blog/post/custom-domains-with-sites)
73+
- [How to host SSR web apps on Appwrite Sites](/blog/post/host-ssr-web-apps-sites)
221 KB
Loading
301 KB
Loading
213 KB
Loading
249 KB
Loading

0 commit comments

Comments
Β (0)