I would like to obtain an official document about my right to live in the UK
The type of document depends on how long someone (and their family members) have lived in the UK.
If you are a EU or EEA national who has been living in the UK for less than five years then you can apply for a registration certificate to prove that you have the right to live or work in the UK. You don’t actually need this if you are working, self-employed, studying or have sufficient money to live on. Immediate family members also don’t require this (although extended family, such as brother, sister, aunt, uncle, do). However, a registration certificate can prove that you have the right to work in the UK or make it easier to claim benefits or services. Here are the links to download the application form for a registration certificate for a:
‘qualified member’ (person working, self employed or studying)
'family member' of person working, self employed or studying
'extended family member' of person working or self employed
unmarried partner of person working, self employed or studying
Cost is £65 for each application
If you have been living in the UK working or self employed for more than five years you can apply for a document certifying that you have permanent residence in the UK. This will prove your right to live in the UK permanently. You can also obtain this document as a family member of a person who has worked or has been self employed in the UK for more than five years. Here is the link to download the application form for a permanent residence document.
Cost is £65 for each application.
The Home Office started a simpler online system from February 2017.
Here is a podcast to listen to that discusses this further: