allein
alone
Describes the state of being without the company of other people.
Nach der Trennung lebte sie mehrere Monate allein in der großen Wohnung.
After the breakup, she lived alone in the large apartment for several months.

alone / only
Loading your saved state.
alone
Describes the state of being without the company of other people.
Nach der Trennung lebte sie mehrere Monate allein in der großen Wohnung.
After the breakup, she lived alone in the large apartment for several months.

The word 'allein' can be derived from 'all' and 'ein'. The literal meaning 'completely one' helps you understand the core idea of being separate or unique.
Er war der Erste, der das Problem allein verstanden hat.
He was the first to understand the problem on his own.
When 'allein' means that someone is without company or without help, it normally comes after the noun or pronoun it refers to. In this position, it is not declined.
Ich möchte heute Abend allein sein.
I want to be alone this evening.
In the meaning 'without others', 'allein' is often used with certain verbs. Typical combinations are 'allein sein' (to be alone), 'allein leben' (to live alone), and 'jemanden allein lassen' (to leave someone alone).
Bitte lass mich mit meinen Gedanken allein.
Please leave me alone with my thoughts.
When 'allein' has the meaning 'nur' (only) or 'ausschließlich' (exclusively), it usually comes before the word or phrase it limits. In this function, it is also not declined.
Allein die Vorstellung, eine Rede zu halten, macht sie nervös.
Just the idea of giving a speech makes her nervous.
As a conjunction, 'allein' introduces a main clause that expresses a contrast. The word order in the following sentence is normal (subject-verb-object). This use is rather formal and found in written language.
Die Reise war schön, allein das Wetter hätte besser sein können.
The trip was nice; however, the weather could have been better.
but
'aber' and 'allein' can both introduce a contrast. 'aber' is the normal everyday word and fits in almost all situations. 'allein' with this meaning, however, sounds formal, elevated, or literary. Learners may confuse the words because 'allein' sometimes works like 'aber'. In normal spoken language, however, 'aber' is usually more natural. 'allein' is more often used in written texts or in a very formal style.

Der Plan klang gut, allein die Kosten waren zu hoch.
The plan sounded good; however, the costs were too high.
Der Tisch ist schön, aber er passt nicht in unsere Küche.
The table is beautiful, but it does not fit in our kitchen.