The public key for Omnibus installations will be at `/var/opt/gitlab/.ssh/id_rsa.pub`,
whereas for installation from source it will be at `/home/git/.ssh/id_rsa.pub`.
## Primary Node GitLab setup
## Primary Node GitLab setup
>**Note:**
>**Note:**
You will need to setup your database into a **Master <-> Slave** replication
You will need to setup your database into a **Master <-> Slave** replication
topology, and your Primary node should always point to a database's Master
topology, and your Primary node should always point to a database's Master
instance. If you haven't done that already, read [database replication](database.md).
instance. If you haven't done that already, read [database replication](./database.md).
To turn your GitLab instance into a primary Geo node, go to
Go to the server that you chose to be your primary, and visit
**Admin Area > Geo Nodes** (`/admin/geo_nodes`).
**Admin Area > Geo Nodes** (`/admin/geo_nodes`) in order to add the Geo nodes.
Although we are looking at the primary Geo node setup, this is where you also
add any secondary servers as well.
In this area you add all your nodes. The first node you add must be your
The very first node you add must be your primary, and the rest are the secondary
primary and the others are the secondary ones.
ones. Make sure to check the box 'This is a primary node' when adding it.
| Setting | Description |
| ------- | ----------- |
| Primary | This marks a Geo Node as primary. There can be only one primary, make sure that you first add the primary node and then all the others.
| URL | Your instance's full URL, in the same way it is configured in `gitlab.yml` (source based installations) or `/etc/gitlab/gitlab.rb` (omnibus installations) |
|Public Key | The SSH public key of the user that your GitLab instance runs on (unless changed, should be the user `git`). That means that you have to go in each Geo Node separately and create an SSH key pair.
![Geo Nodes Screen](img/geo-nodes-screen.png)
![Geo Nodes Screen](img/geo-nodes-screen.png)
---
---
In the following table you can see what all these settings mean.
| Setting | Description |
| ------- | ----------- |
| Primary | This marks a Geo Node as primary. There can be only one primary, make sure that you first add the primary node and then all the others.
| URL | Your instance's full URL, in the same way it is configured in `gitlab.yml` (source based installations) or `/etc/gitlab/gitlab.rb` (omnibus installations). |
|Public Key | The SSH public key of the user that your GitLab instance runs on (unless changed, should be the user `git`). That means that you have to go in each Geo Node separately and create an SSH key pair. See the [SSH key creation](#create-ssh-key-pairs-for-geo-nodes) section.
## Secondary Node GitLab setup
## Secondary Node GitLab setup
To install a secondary node, you must follow the normal GitLab Enterprise
To install a secondary node, you must follow the normal GitLab Enterprise
Edition installation, with some extra requirements:
Edition installation, with some extra requirements:
- You should point your database connection to a [replicated instance](database.md).
- You should point your database connection to a [replicated instance](./database.md).
- Your secondary node should be allowed to communicate via HTTP/HTTPS and
- Your secondary node should be allowed to communicate via HTTP/HTTPS and
SSH with your primary node (make sure your firewall is not blocking that).
SSH with your primary node (make sure your firewall is not blocking that).
### Authorized keys regeneration
The final step will be to regenerate the keys for `.ssh/authorized_keys` using
the following command (HTTPS clone will still work without this extra step).
On the secondary node where the database is [already replicated](./database.md),