Wires #4: Production Server Setup

Let’s configure the production environment.

/posts/wires_4/godaddy.png
Acquiring a domain from GoDaddy

I have bought this domain: ayehia0.info from godaddy and configured the DNS to point to github’s IP. Now going to my domain opens up my personal website which is hosted on github pages.

I have also bought a server on digitalocean and created a droplet. To get started with your droplet you just created, you have to configure a user as root user is the default one (Imagine the nasty things you can do with that!). For me I have created a user called none and added my SSH public key to be able to connect in a secure way.

/posts/wires_4/digitalocean.png
Digital Ocean Droplet Settings!
Create a domain for your api
if you don’t want to write your IP each time you connect to your server you need to create an A record in the DNS section which directs to your IP.

Once you get everything configured, it’s time to connect to the server and install all the packages and dependencies.

/posts/wires_4/ssh_connect.png
Connect to the server!

I installed dotnet, go and docker even through I can use docker directly.

It’s time to configure HTTPs, you don’t want to host your website on HTTP for security reasons ofc. Fortunately, it’s easy to achieve this using certbot which use’s Let’s Encrypt.

Following the instructions on their page (which is straight forward btw), you get HTTPs!

For now everything is manual, so if we want to update any functionality to the server, we will (which isn’t ideal):

  • SSH to the Server
  • Make changes
  • Run server

In the upcoming blogs you will create some CI/CD.