Gokhan Derala

Full Stack Developer

From concept to launch, I bring digital ideas to life, learning and refining with each step.

An accomplished software developer with over seven years of experience working on digital agency, e-commerce, car sharing, and delivery service projects, alongside six years as a finance manager on large-scale international projects. When I'm not coding, you can find me playing tennis, soccer, rock climbing, or spending time with my partner.

UsCo
Full-Stack Software Developer
A digital agency that creates and maintains projects for various industries.
PHP
Node.js
JavaScript
TypeScript
React
Tailwindcss
Laravel
Vue
Docker
Mysql
WordPress
Nginx
Apache
Flickapp
Software Developer
A platform that links businesses to couriers to fulfill delivery needs
PHP
Node.js
JavaScript
jQuery
Docker
Mysql
Redis
SocketIO
NextJs
Nginx
API
Shopify
Webhook
Taksitmarket
Software Developer
An e-commerce platform that offers flexible payment solutions to customers
PHP
Node.js
JavaScript
jQuery
Docker
Mysql
SocketIO
NextJs
Nginx
Cepfix
Software Developer
Cepfix provides mobile phone repair services by authorized third parties
PHP
Node.js
JavaScript
jQuery
Docker
Mysql
SocketIO
Nginx
Mawlin, Istanbul
Software Developer
Mawlin provides a service to manufacturers that allows them to broaden their marketplaces.
PHP
Node.js
JavaScript
jQuery
Docker
Mysql
Redis
SocketIO
Nginx
API
Stripe
YOYO Car Sharing
Software Developer
YOYO offers subscription-based short and long-term car-sharing services
PHP
Node.js
JavaScript
jQuery
Docker
Mysql
SocketIO
Nginx
Adphorus / Publik
Finance Manager
Adphorus and Publik were digital advertising agencies
Ay-T ek Construction L.L.C
Finance Manager
An international construction firm responsible for building the first genetic hospital in Oman
Self-Hosting with Coolify, Raspberry Pi, and Cloudflare Self-Hosting with Coolify, Raspberry Pi, and Cloudflare

Cloud services like AWS, Google Cloud, Azure, Heroku, and Vercel offer significant advantages, including powerful features and ease of use. However, for hobby projects or small-scale applications, these services can be costly and may exceed what’s needed. I realized that paying for cloud services didn't make sense for my small projects. Even [<span class="text-slate-300 underline">DHH</span>](https://world.hey.com/dhh/why-we-re-leaving-the-cloud-654b47e0) has opted to move away from cloud hosting. Inspired by my talented friends [<span class="text-slate-300 underline">Eralp</span>](https://github.com/eralpkaraduman), [<span class="text-slate-300 underline">Mehmet</span>](https://github.com/strada), and [<span class="text-slate-300 underline">Baris</span>](https://github.com/brsbyrk), I decided to host my projects on a Raspberry Pi. I will share my journey of setting up self-hosting using Coolify, Raspberry Pi, and Cloudflare, providing a practical guide for others who want to do the same. ## <span class="text-slate-300">Introduction</span> ### <span class="text-slate-300">Why Choose Self-Hosting?</span> - Self-hosting is affordable, accessible, and offers the opportunity to gain hands-on experience with web servers, Docker, networking, and other technical skills. It’s a great way to learn and experiment without the constraints and costs associated with cloud providers. ### <span class="text-slate-300">Why Raspberry Pi?</span> - Raspberry Pi is affordable, compact, and powerful enough for hosting small to medium projects. It’s an ideal choice for hobbyists and developers who want to experiment without breaking the bank. Its low power consumption and small footprint make it perfect for running a server at home or in a small office. ### <span class="text-slate-300">Why Coolify?</span> - Coolify was created to provide a simpler, more cost-effective alternative to platforms like Vercel. The founder sought to eliminate the expensive bills associated with traditional cloud services. Coolify offers many of the same features, allowing you to self-host your applications without the high costs. For more information about the project, visit their [<span class="text-slate-300 underline">GitHub page</span>](https://github.com/coollabsio/coolify). ### <span class="text-slate-300">Why Cloudflare Tunnels?</span> - I wanted to avoid exposing my ports directly to the internet. Since I don’t have a static IP, managing IP changes can be cumbersome. Cloudflare Tunnels provided a convenient solution for securely accessing my applications. For more information, check out [<span class="text-slate-300 underline">Rasmus's guide</span>](https://rasmusgodske.com/posts/securely-expose-your-coolify-apps-with-the-magic-of-cloudflare-tunnels/) on setting up Cloudflare Tunnels. ## <span class="text-slate-300">Setting Up the Raspberry Pi</span> 1. ## <span class="text-slate-300">Choosing an Operating System</span> - The minimum recommended server specifications for Coolify are 2 CPUs and 2GB of memory. The Raspberry Pi 4B with 4GB of memory is suitable for this. Coolify recommends using Raspberry Pi OS, which you can learn more about on their [<span class="text-slate-300">website</span>](https://coolify.io/docs/installation). ![alt raspberrypi](./images/setup-raspberrypi-1.png "setup 1") 2. ## <span class="text-slate-300">Configuring the OS</span> - After selecting the OS, configure the settings. Make sure to hide any sensitive information (e.g., Wi-Fi names, passwords) in your screenshots. ![alt raspberrypi](./images/setup-raspberrypi-2.png "setup 2") ![alt raspberrypi](./images/setup-raspberrypi-3.png "setup 3") 3. ## <span class="text-slate-300">Setting Up Hostname, Username, and Password</span> - Configure a hostname, username, and password for the Raspberry Pi. These will be used for SSH connections. You can also create an SSH key under the options to make future logins more secure. ![alt raspberrypi](./images/setup-raspberrypi-6.png "setup 6") ![alt raspberrypi](./images/setup-raspberrypi-7.png "setup 7") 4. ## <span class="text-slate-300">Connecting to the Raspberry Pi</span> - Once the OS setup is complete, connect to the Raspberry Pi's terminal via SSH. You’re now ready to install Coolify. Follow the [<span class="text-slate-300 underline">Coolify installation guide</span>](https://coolify.io/docs/installation/). After installation, you can access Coolify at http://raspberry_hostname:8000. - For a detailed video tutorial on setting up Coolify, I recommend watching the [<span class="text-slate-300 underline">Syntax YouTube channel tutorial</span>](https://www.youtube.com/watch?v=taJlPG82Ucw). ## <span class="text-slate-300">Setting Up Cloudflare Tunnel</span> 1. ### <span class="text-slate-300">Create a Tunnel in Cloudflare</span> - After installing Coolify, visit the Cloudflare dashboard and create a tunnel. Go to the "Zero Trust" section on the left. ![alt cloudflare](./images/cloudflare-setup-1.png "cloudflare setup 1") 2. ### <span class="text-slate-300">Access Tunnels Under the Network Section</span> - You can find the tunnels listed under "Networks." ![alt cloudflare](./images/cloudflare-setup-2.png "cloudflare setup 2") 3. ### <span class="text-slate-300">Install Cloudflared on Raspberry Pi</span> - Follow the recommended Cloudflared installation steps. When using Docker, run the provided commands on the Raspberry Pi. ![alt cloudflare](./images/cloudflare-setup-3.png "cloudflare setup 3") ![alt cloudflare](./images/cloudflare-setup-4.png "cloudflare setup 4") 4. ### <span class="text-slate-300">Configure the Tunnel to Your Raspberry Pi Hostname and Ports</span> - Ensure the tunnel is configured to point to your Raspberry Pi's hostname and the appropriate ports. ![alt cloudflare](./images/cloudflare-setup-6.png "cloudflare setup 6") 5. ### <span class="text-slate-300">Verify the Tunnel Status</span> - Go back to the tunnels list to confirm that the tunnel status is "Healthy." You can also verify the tunnel is running by executing <span class="text-slate-300 underline">docker ps</span> on the Raspberry Pi. ## <span class="text-slate-300">Deploying an Application with Coolify</span> 1. ### <span class="text-slate-300">Create a Project in Coolify</span> - Start by creating a new project in Coolify. ![alt coolify](./images/coolify-setup-2.png "coolify setup 2") 2. ### <span class="text-slate-300">Connect to Your GitHub Repository</span> - Link your project to a GitHub repository for continuous deployment. ![alt coolify](./images/coolify-setup-3.png "coolify setup 3") 3. ### <span class="text-slate-300">Create a New Application</span> - Set up the application and configure its deployment settings. ![alt coolify](./images/coolify-setup-4.png "coolify setup 4") 4. ### <span class="text-slate-300">Map the Application to Port 80 for the Cloudflare Tunnel</span> - Make sure your application is accessible through port 80 for the Cloudflare Tunnel configuration. ![alt coolify](./images/coolify-setup-5.png "coolify setup 5") 5. ### <span class="text-slate-300">Verify the Application Deployment</span> - After deploying, you should be able to access your application via the domain configured with Cloudflare. ## <span class="text-slate-300">Conclusion</span> Self-hosting your projects using a Raspberry Pi, Coolify, and Cloudflare Tunnels provides a unique opportunity to learn about infrastructure management and deploying web applications. By taking control of your own hosting, you not only save on costs but also gain deeper knowledge of the deployment process. Self-hosting empowers you with full control over your projects, enabling greater customization and flexibility. I encourage you to try this setup for your own projects and explore the world of self-hosting. Feel free to reach out or share your experiences – I'd love to hear about your journey!