--- title: Yerel Kurulum description: "Twenty'i yerel olarak çalıştırmak isteyen katkıda bulunanlar (veya meraklı geliştiriciler) için kılavuz." image: /images/user-guide/fields/field.png --- Header ## Ön Gereksinimler Twenty'i yüklemeden ve kullanmadan önce bilgisayarınıza aşağıdakileri yüklediğinizden emin olun: - [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - [Node v24.5.0](https://nodejs.org/en/download) - [yarn v4](https://yarnpkg.com/getting-started/install) - [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md) `npm` çalışmaz, bunun yerine `yarn` kullanmalısınız. Yarn artık Node.js ile birlikte geliyor, bu yüzden ayrı bir yüklemeye gerek yoktur. Eğer henüz yapmadıysanız Yarn'ı etkinleştirmek için sadece `corepack enable` komutunu çalıştırmanız gerekiyor. 1. WSL Kurun PowerShell'i Yönetici olarak açın ve çalıştırın: ```powershell wsl --install ``` Şimdi bilgisayarınızı yeniden başlatmanız gerektiğine dair bir uyarı göreceksiniz. Eğer görmüyorsanız, manuel olarak yeniden başlatın. Yeniden başladıktan sonra bir powershell penceresi açılacak ve Ubuntu yüklenecek. Bu biraz zaman alabilir. Ubuntu kurulumunuz için bir kullanıcı adı ve şifre oluşturmanız gerektiğine dair bir uyarı göreceksiniz. 2. git'i Yükleyin ve Yapılandırın ```bash sudo apt-get install git git config --global user.name "Your Name" git config --global user.email "youremail@domain.com" ``` 3. nvm, node.js ve yarn'ı Yükleyin Doğru `node` versiyonunu yüklemek için `nvm` kullanın. `.nvmrc` tüm katkıda bulunanların aynı versiyonu kullanmasını sağlar. ```bash sudo apt-get install curl curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash ``` nvm'i kullanmak için terminalinizi kapatıp yeniden açın. Sonra aşağıdaki komutları çalıştırın. ```bash nvm install # installs recommended node version nvm use # use recommended node version corepack enable ``` --- ## Adım 1: Git Clone Terminalinizde aşağıdaki komutu çalıştırın. SSH anahtarlarını henüz kurmadıysanız, bunu nasıl yapacağınızı [buradan](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh) öğrenebilirsiniz. ```bash git clone git@github.com:twentyhq/twenty.git ``` ```bash git clone https://github.com/twentyhq/twenty.git ``` ## Adım 2: Kök Dizine Konuçlanın ```bash cd twenty ``` Sonraki adımlardaki tüm komutları projenin kök dizininden çalıştırmalısınız. ## Adım 3: Bir PostgreSQL Veritabanı Kurun **Option 1 (preferred):** 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;" ``` Note: You might need to add `sudo -u postgres` to the command before `psql` to avoid permission errors. ```` **Option 2:** If you have docker installed: ```bash make postgres-on-docker ``` ```` **Option 1 (preferred):** To provision your database locally with `brew`: ```` ```bash brew install postgresql@16 export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH" brew services start postgresql@16 psql postgres -c "CREATE DATABASE \"default\";" -c "CREATE DATABASE test;" ``` You can verify if the PostgreSQL server is running by executing: ```bash brew services list ``` The installer might not create the `postgres` user by default when installing via Homebrew on MacOS. Instead, it creates a PostgreSQL role that matches your macOS username (e.g., "john"). To check and create the `postgres` user if necessary, follow these steps: ```bash # Connect to PostgreSQL psql postgres or psql -U $(whoami) -d postgres ``` Once at the psql prompt (postgres=#), run: ```bash # List existing PostgreSQL roles \du ``` You'll see output similar to: ```bash Role name | Attributes | Member of -----------+-------------+----------- john | Superuser | {} ``` If you do not see a `postgres` role listed, proceed to the next step. Create the `postgres` role manually: ```bash CREATE ROLE postgres WITH SUPERUSER LOGIN; ``` This creates a superuser role named `postgres` with login access. **Option 2:** If you have docker installed: ```bash make postgres-on-docker ``` ```` All the following steps are to be run in the WSL terminal (within your virtual machine) ```` **Option 1:** To provision your Postgresql locally: Use the following link to install Postgresql on your Linux virtual machine: [Postgresql Installation](https://www.postgresql.org/download/linux/) ```bash psql postgres -c "CREATE DATABASE \"default\";" -c "CREATE DATABASE test;" ``` Note: You might need to add `sudo -u postgres` to the command before `psql` to avoid permission errors. **Option 2:** If you have docker installed: Running Docker on WSL adds an extra layer of complexity. Only use this option if you are comfortable with the extra steps involved, including turning on [Docker Desktop WSL2](https://docs.docker.com/desktop/wsl). ```bash make postgres-on-docker ``` ```` Veritabanına [localhost:5432](localhost:5432) adresinden, kullanıcı `postgres` ve şifre `postgres` ile şimdi erişebilirsiniz. ## Adım 4: Redis Veritabanı (önbellek) Kurun Twenty, en iyi performansı sağlamak için bir redis önbelleğe ihtiyaç duyar **Option 1:** To provision your Redis locally: Use the following link to install Redis on your Linux machine: [Redis Installation](https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/) ```` **Option 2:** If you have docker installed: ```bash make redis-on-docker ``` ```` **Option 1 (preferred):** To provision your Redis locally with `brew`: ```bash brew install redis ``` Start your redis server: ```brew services start redis``` ```` **Option 2:** If you have docker installed: ```bash make redis-on-docker ``` ```` **Option 1:** To provision your Redis locally: Use the following link to install Redis on your Linux virtual machine: [Redis Installation](https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/) ```` **Option 2:** If you have docker installed: ```bash make redis-on-docker ``` ```` Bir İstemci GUI'ye ihtiyacınız varsa, [redis insight](https://redis.io/insight/) (ücretsiz sürüm mevcut) öneriyoruz. ## Adım 5: Çevresel değişkenleri ayarlayın Projenizi yapılandırmak için çevresel değişkenler veya `.env` dosyaları kullanın. Daha fazla bilgi [burada](https://docs.twenty.com/l/tr/developers/self-hosting/setup) `.env.example` dosyalarını `/front` ve `/server` içine kopyalayın: ```bash cp ./packages/twenty-front/.env.example ./packages/twenty-front/.env cp ./packages/twenty-server/.env.example ./packages/twenty-server/.env ``` ## Step 6: Installing dependencies Twenty server'ı oluşturup veritabanınıza bazı veriler yerleştirmek için aşağıdaki komutu çalıştırın: ```bash yarn ``` `npm` veya `pnpm` çalışmaz ## Adım 7: Projeyi çalıştırma Dağıtımınıza bağlı olarak, Redis sunucusu otomatik olarak başlatılabilir. Değilse, dağıtımınız için [Redis Kurulum Kılavuzu](https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/) üzerinden kontrol edin. Redis zaten çalışıyor olmalıdır. If not, run: ```bash brew services start redis ``` Dağıtımınıza bağlı olarak, Redis sunucusu otomatik olarak başlatılabilir. Değilse, dağıtımınız için [Redis Kurulum Kılavuzu](https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/) üzerinden kontrol edin. Veritabanınızı aşağıdaki komutla kurun: ```bash npx nx database:reset twenty-server ``` Sunucuyu, çalışanı ve ön uç hizmetlerini başlatın: ```bash npx nx start twenty-server npx nx worker twenty-server npx nx start twenty-front ``` Alternatif olarak, tüm hizmetleri aynı anda başlatabilirsiniz: ```bash npx nx start ``` ## Step 8: Use Twenty **Ön Uç** Twenty's frontend will be running at [http://localhost:3001](http://localhost:3001). Varsayılan demo hesabıyla giriş yapabilirsiniz: `tim@apple.dev` (şifre: `tim@apple.dev`) **Arka Uç** - Twenty's server will be up and running at [http://localhost:3000](http://localhost:3000) - GraphQL API'sine [http://localhost:3000/graphql](http://localhost:3000/graphql) adresinden erişebilirsiniz. - REST API'sine [http://localhost:3000/rest](http://localhost:3000/rest) adresinden ulaşabilirsiniz. ## Sorun Giderme Herhangi bir sorunla karşılaşırsanız, çözümler için [Sorun Giderme](https://docs.twenty.com/l/tr/developers/self-hosting/troubleshooting) sayfasına bakın.