Legally you only have the right to play one copy of any game, at a time, no matter how many installs you may have.
Multiple installs are fine, as you can only play one at once.
Morally, and technically, you're fine as long as it's on a LAN only, as nobody will ever know you did it
Unless you kiss and tell.
I doubt GOG, or Larian would come after you for that, even if you told them, as they would hope it persuades your friend to buy the game.
Just don't kiss, and tell.
I might make sure for german users here that THIS IS NOT TRUE AT ALL.
Depending on national laws you are allowed to copy a game, music or any other form of media for your own personal use and spread it at home (or use it in a car for example - legally cars also count as a private area akin to your home, to back that even up twice here).
So you are allowed and ever were allowed (this was already the case 20 years ago) to take a game you own, maybe on a CD/DVD and burn another copy of it, generate an install key even or use other methods of creating a second working copy for your household.
Again, this includes all types of media.
No one can legally tell you what you do in private at your home, no company no matter where located.
Which means you are absolutely fine to share the same game´, legally and ethically (I even would say that this is highly likely for countries like france aswell, which secure the privacy of citizens even more).
And playing it does also not forbid that you play online, you can use a game from your household normally.
What you cant do is obviously use cracks and other keygenerator programms to create another version of a game to then use it online.
Like lets say you own a copy of Warcraft 3 that comes with a CD key, you copy that version (burn it) on another CD but you obviously needed two CD keys to have both players play online.
Or you use a crack for a steamgame to then play lets say Rainbow Six Siege online with three other people but with only one copy owned.
Using any program creating an additional CD Key to workaround the problem to play online is not allowed in such a case to my knowledge - when you connect to servers like lets say the Battle.net etc.
For everything else, you are fine. That includes lets say, buying a game like Settlers or Anno on GoG and then play via online connection with your friend (or LAN if that works better).
Mind, this only is true for the german area as laws are different.
However, it might be possible that certain legal agreements have changed according to EU laws and recent court decisions(to the positive or negative) (such as the rejection of Sony to sue people who provide free WLAN when a third party user uses the WLAN to load illegal copies of music up into the web).
So there might be incidences and clearer cases as to what is exactly forbidden and what is not.
But generally the above quoted statement is absolutely false and might only be true for the area the person quoted lives in, and even there it might be allowed, depending on how well the person knows its countries laws.
EULAs or other agreements from companies NEVER eliminate the national law (or any political layer above such as EU), especially not on international ground.
That is a common misconception of consumers seeing EULAs and Terms of Services all over the place for anything they use.
These are not binding you to anything when a national law cant support these contracts or outright contradicts them.
If a company isnt fine with the laws in any country and thinks that a national law works against their company terms, they are ever free to block these countries so people cant use their stores anymore.
Since they do not at the moment block germany, they openly take the money of german customers and so agree to the existing laws of that nation that is stronger than their company terms and policies.
If GoG or Larian wouldnt be fine with german users using a bought copy of their game for several people, then they had to take the game off the store for german customers or even block german users entirely from the store.
Yes thats possible, and yes that has been done before in other cases.
In short, you can take a gog game you bought and have a friend download it with your account aswell so you can play together.
Especially since that needs you to provide your account information, its save to assume that you trust each other enough to do such a step, which is commonly done inside a family for example. You can also copy the installer on lets say an USB Stick and use it on another PC, the way of distributing the copy doesnt matter.
You are not allowed however to share the game online with strangers.
What GoG does is asking you to not do it (use one copy for multiple players you trust and know even in your household).
That has nothing to do with a legal basis, and is rather them saying "hey these developers depend on the income to provide you with games, its fair to buy it twice when you use it with another person".
Since GoG relies on such developers offering their games without any DRM, its a good attitude to actually buy two copies and so show developers that it is beneficial to invest into the DRM-free system.
Working around that with sharing a DRM free game with strangers, would just damage these companies that in the long run you only damage your own interests as they wont provide more DRM free games in the future when they make negative experiences.
I personally prefer to do it this way: I have a friend who is interested in different games such as i am. But since we are also different personalities and play in a different way, its hard to determine what he likes and what he dislikes.
So when i actually like a game, i have him try the game and play with me (for example through GoG) and when we have good fun he doesnt mind buying the game.
So in my case it rather acts as a demo for him. Which is positive since before he wouldnt have bought the game in question anyway, but i kinda lure him into playing it with me and so hook him up.
Doing it this way is not only legally safe, its also in my eyes beneficial for all sides.