-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Readme ideas for better getting started Website update proposal to give an easier way to get started on the Local Setup --------- Co-authored-by: guillim <[email protected]>
- Loading branch information
Showing
3 changed files
with
46 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,9 @@ | |
title: Local Setup | ||
icon: TbDeviceDesktop | ||
image: /images/user-guide/fields/field.png | ||
info: Mostly for contributors or curious developers | ||
info: The guide for contributors (or curious developers) who want to run Twenty locally (on laptop, PC...) | ||
--- | ||
|
||
Follow this guide if you would like to set up the project locally to contribute. | ||
|
||
## Prerequisites | ||
|
||
<ArticleTabs label1="Linux and MacOS" label2="Windows (WSL)"> | ||
|
@@ -105,11 +103,10 @@ cd twenty | |
You should run all commands in the following steps from the root of the project. | ||
|
||
## Step 3: Set up a PostgreSQL Database | ||
You can access the database at [localhost:5432](localhost:5432), with user `twenty` and password `twenty` . | ||
|
||
<ArticleTabs label1="Linux" label2="Mac OS" label3="Windows (WSL)"> | ||
<ArticleTab> | ||
<b>Option 1:</b> To provision your database locally: | ||
<b>Option 1 (preferred):</b> To provision your database locally: | ||
Use the following link to install Postgresql on your Linux machine: [Postgresql Installation](https://www.postgresql.org/download/linux/) | ||
```bash | ||
psql postgres -c "CREATE DATABASE \"default\";" -c "CREATE DATABASE test;" -c "CREATE USER twenty PASSWORD 'twenty';" -c "ALTER ROLE twenty superuser;" | ||
|
@@ -122,7 +119,7 @@ You can access the database at [localhost:5432](localhost:5432), with user `twen | |
``` | ||
</ArticleTab> | ||
<ArticleTab> | ||
<b>Option 1:</b> To provision your database locally with `brew`: | ||
<b>Option 1 (preferred):</b> To provision your database locally with `brew`: | ||
|
||
```bash | ||
brew install postgresql@16 | ||
|
@@ -154,8 +151,10 @@ You can access the database at [localhost:5432](localhost:5432), with user `twen | |
</ArticleTab> | ||
</ArticleTabs> | ||
|
||
You can now access the database at [localhost:5432](localhost:5432), with user `twenty` and password `twenty` . | ||
|
||
## Step 4: Set up a Redis Database (cache) | ||
Twenty requires a redis cache to provide the best performances | ||
Twenty requires a redis cache to provide the best performance | ||
|
||
<ArticleTabs label1="Linux" label2="Mac OS" label3="Windows (WSL)"> | ||
<ArticleTab> | ||
|
@@ -168,10 +167,12 @@ Twenty requires a redis cache to provide the best performances | |
``` | ||
</ArticleTab> | ||
<ArticleTab> | ||
<b>Option 1:</b> To provision your Redis locally with `brew`: | ||
<b>Option 1 (preferred):</b> To provision your Redis locally with `brew`: | ||
```bash | ||
brew install redis | ||
``` | ||
Start your redis server: | ||
```brew services start redis``` | ||
|
||
<b>Option 2:</b> If you have docker installed: | ||
```bash | ||
|
@@ -189,9 +190,11 @@ Twenty requires a redis cache to provide the best performances | |
</ArticleTab> | ||
</ArticleTabs> | ||
|
||
If you need a Client GUI, we recommend [redis insight](https://redis.io/insight/) (free version available) | ||
|
||
## Step 5: Setup environment variables | ||
|
||
Use environment variables or `.env` files to configure your project. | ||
Use environment variables or `.env` files to configure your project. More info [here](https://twenty.com/developers/section/self-hosting/self-hosting-var) | ||
|
||
Copy the `.env.example` files in `/front` and `/server`: | ||
```bash | ||
|
@@ -204,16 +207,17 @@ To build Twenty server and seed some data into your database, run the following | |
```bash | ||
yarn | ||
``` | ||
Note that `npm` or `pnpm` won't work | ||
|
||
## Step 7: Running the project | ||
|
||
Start your redis server: | ||
<ArticleTabs label1="Linux" label2="Mac OS" label3="Windows (WSL)"> | ||
<ArticleTab> | ||
Depending on your Linux distribution, Redis server might be started automatically. | ||
If not, check the [Redis installation guide](https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/) for your distro. | ||
</ArticleTab> | ||
<ArticleTab> | ||
Redis should already be running. If not, run: | ||
```bash | ||
brew services start redis | ||
``` | ||
|
@@ -242,9 +246,20 @@ Alternatively, you can start all services at once: | |
npx nx start | ||
``` | ||
|
||
Twenty's server will be up and running at [http://localhost:3000](http://localhost:3000). The GraphQL API can be accessed at [http://localhost:3000/graphql](http://localhost:3000/graphql), and the REST API can be reached at [http://localhost:3000/rest](http://localhost:3000/rest). | ||
## Step 8: Use Twenty | ||
|
||
**Frontend** | ||
|
||
Twenty's frontend will be running at [http://localhost:3001](http://localhost:3001). | ||
You can log in using the default demo account: `[email protected]` (password: `Applecar2025`) | ||
|
||
**Backend** | ||
|
||
- Twenty's server will be up and running at [http://localhost:3000](http://localhost:3000) | ||
- The GraphQL API can be accessed at [http://localhost:3000/graphql](http://localhost:3000/graphql) | ||
- The REST API can be reached at [http://localhost:3000/rest](http://localhost:3000/rest) | ||
|
||
|
||
Twenty's frontend will be running at [http://localhost:3001](http://localhost:3001). Just log in using the seeded demo account: `[email protected]` (password: `Applecar2025`) to start using Twenty. | ||
|
||
## Troubleshooting | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters