I haven’t tried to see what can be done using the rails console, but if you have a personal access token with api access for a user with admin privileges it’s quite easy.
(The following is based on some notes I made when I tried)
It’s just two commands that you have to execute on the new runner server.
With the gitlab server on 10.0.3.103:
curl -k -H 'Private-token: <token>' -X POST 'http://10.0.3.103/api/v4/user/runners?runner_type=instance_type&description=Kitchentest&paused=true&tag_list=test'
This will create a token for registering a runner and return it in a JSON structure, I don’t remember what else is in there, but it’s quite easy to find,
(That token is what was returned by the previous command, and I don’t remember what NI meant when I did that test, “i” is danish for “in”, and “kitchen” is the test framework I used for that)