If you ever wanted to setup a VPN server, mail server, mail box, web server, or nextcloud (an open source google drive alternative), then you can go through this blog and set it up in minutes using NethServer.
Since AWS does not provide a NethServer AMI by default via MarketPlace or Community AMI, I had to make a VM image in my local server, modify it, import it to AWS and then modify it again and make it working for AWS.
I have made that image public and it is available in the Mumbai region. If you need it in any other region, contact me or you can make an AMI after launching the server in the Mumbai region and transfer it to whichever region you like.
So to setup a NethServer in AWS, below are the steps you have to follow
Setting up EC2
Go to the AWS EC2 console and click on Launch Instance
There go to Community AMIs and search for NethServer or you can search the below AMI ID. Do note that this AMI ID might change if I update the AMI
Security group rules
The security group should allow the following as per requirement for accessing the server
For the latest management web UI, open the port 9090 inbound
For old management web UI, open port 980 inbound
For SSH Access, open port 22 inbound
You can keep outbound access as full open for all traffic.
The NethServer AMI by default comes with a user. The details are as follows
By default, this AMI comes with the FQDN ami.vigneshn.in
This can be changed and there are also my contact details in the Company name space so you can change it according to your requirements.
Also note that you have to change the FQDN before you install LDAP in account providers (Users and Groups).
You can also use Active directory (external) for user and group management.
Also you need to setup LDAP to change the password of the default admin user
Currently there is an issue with Nethserver where it requrires a green interface at any cost, without which it will throw and error at ipconf step.
To fix this, create a network interface in AWS and attach it to the instance.
Make this a green network and if your ip is 172.20.20.20 for the network interface, then give that as static in for green and the subnet mask as 255.255.255.0 and the gateway as 172.20.20.1
For more details on how to set up the individual services in NethServer, you can visit the NethServer documentation here.
So initially I was running this site in an EC2 instance which costed around 1200Rs. Then I learnt about serverless deployments and made my site serverless about which you can read here.
So after going serverless, I was receiving a monthly bill of 2400Rs which was fine since I could brag about my site being infinitely scalable.
But this month (August-2020) I was looking at my billing console and got a bill of 2200Rs by august 9th. This was alarming. The issue was the google search console was sending more and more requests to my site.
This woke up my Aurora serverless RDS from suspended mode to 1 ACU, and Aurora serverless is costly.
So I switched off the ECS from 22:00 to 10:00 using a lambda function but even then I was paying for the load balancer.
So now I have changed it back to an t3a.micro instance which costs me 400Rs per month.
If you are like me, building a gaming rig would be one of your dreams, but to build a rig that can play high end games on ultra graphics would cost you an arm and a leg.
If you are stuck in this situation, then read on to find out how to start gaming without building a rig, and no, this is not about gaming services like stadia or shadow which are not available in India yet.
There are a few requirements that I’ll mention below that you’ll need to get this working properly.
A good internet connection – 30-40mbps – FTTH (for low latency)
A job/business to pay the bill – AWS isn’t free, but it’s cheap
A game – (Always buy your games when they are high end because otherwise the developers would feel that they can make more money from s**t games like candy crush and they’ll stop making good games. We really don’t want that.)
Local machine running any of the following
Android – With google play
Raspberry pi 3
Linux – Ubuntu 18.04+
Let’s get started
So to get started, first we need a account and then we will move on to setting up the game server in AWS.
Setting up Parsec
What is parsec?
So Parsec is like VNC/RDP on steroids. They give very low latency interactive streaming from a remote PC to your local machine.
They say they use a protocol called BUD(Better User Datagrams) which is like UDP on cocaine and they developed in house specifically for gaming but I think they are using magic and this new protocol talk is just to cover up the magic.
I hosted my server in Mumbai region in AWS and I live in thrissur, Kerala and the LOS distance between my house and Mumbai is 1100 km, so it should be twice that in network fibre length and with all those switched and routers in between, I expected it not to work but it worked! The latency I got is only 30-40 ms which is basically like gaming on your local machine. You won’t feel it. 30 ms is approximately a lag of 1 frame at 30fps which is nothing.
To setup a parsec account first sign up here. It is a very simple process
First give a username
The they’ll ask for an E-mail ID and password
Now you’ll get a confirmation E-mail, so click the confirmation link and your account is ready.
Now that your account is ready, it is time to download the client (or you can use their web client) and login.
You can download the appropriate client for your platform from here
Setting up server in AWS
You always have an option to launch an EC2 instance in the classic method i.e without VPC but I will not recommend that so for this setup, we’ll start with VPC and its sub services and then move on to create the server.
Login to your AWS account, go to the AWS marketplace console and subscribe the AMI.
Setting up the Server
Once the AMI is subscribed, you can launch your instance with the following configuration
AMI – NVIDIA Gaming PC – Windows Server 2019
Choose instance type is g4dn.xlarge (which is the smallest that you can choose)
VPC – Newly created VPC Subnet – Newly created subnet Enable Public IPv4
Add a 50G-60G of additional storage – You will see a 125GB of storage by default but that is ephemeral and you’ll lose the data if the instance is stopped and started. If you add additional storage, you’ll have to format it after boot up. Otherwise you can also increase the C Drive storage from 30GB to any value that you like (Provided you are ok paying for it).
Now give a name tag which you can understand
Now specify the security group that you already created
That’s it. Now you can review and launch that instance.
You have to wait for some time for the instance to be launched and then you can get the password for the Administrator account for the Windows server.
To login to the Windows server, go to your EC2 console, select the server and click on connect. You will see an option to upload or copy/paste the key they you had selected when you launched the instance.
This key is required to get the automatically generated Administrator password.
If it shows some error, you have to wait for some more time for the instance to complete the setup.
Once you get the password, you can use Remmina or any RDP client to connect to the server with it’s public IP.
Once connected, install Parsec and login the same way you logged in in your client and ensure that the Hosting option is enabled
This will show your PC in parsec and you can see the same in your client
Connecting with Parsec and setting up sound
Not that the parsec is connected, you have to do a few things to get it up and running for gaming.
Disconnect from RDP and connect again using Parsec from your client. It should work. If it does not, make sure to check the trouble-shooting steps as mentioned in the Parsec website or join Discord.
Once your Parsec is connected, you’ll notice that there is no sound. This is because AWS does not attach a sound hardware since it is a server. To fix this, you can install a virtual sound hardware from here.
Click on the Install batch file to install the virtual sound drive. You can enabled spacial sound for better immersive experience while playing games.