Project development server setup on the Google Cloud Platform (GCP)

Let’s create a Virtual Machine (VM) instance by following functionalities and features.

A Debian-10 is perfect for me. I’m comfortable with DDClient, which updates the external IP of the instance so, I don’t need any static IP yet.

An N1 Micro instance with 10GB Balanced Persistent Disk (PD) is quite ok. I don’t prefer a preemtible instance for my project server because, I won’t allow Google to shutdown my VM while I work on my project. I need to insert my SSH key so I can connect to this VM from any device and OS.

Right after creating the instance, I connect on it and create 2G swapfile. I need to setup the following apps and configurations. Set timezone, set root password, update apps, install locales and configure it. I also need to install ddclient and configure. Then I install apache2, php, mariadb and phpmyadmin following this GCP’s official tutorial. I configure apache and enable rewrite and ssl module first then I turn on the php short open code service. I also create a .htaccess file in the phpmyadmin directory to force https protocol.

I install certbot and create a single certificate for main domain and a wildcard domain. Set it up in the apache and enable the ssl site configuration. I also install htop, git and set my global username and email for git.

After completing all of the above tasks, my project development server goes primarily ready.

Similar Posts