Independent philosopher (1879–88)Living off his pension from Basel and aid from friends, Nietzsche travelled frequently to find climates more conducive to his health and lived until 1889 as an independent author in different cities. He spent many summers in Sils Maria near St. Moritz in Switzerland. He spent his winters in the Italian cities of Genoa, Rapallo, and Turin and the French city of Nice. In 1881, when France occupied Tunisia, he planned to travel to Tunis to view Europe from the outside but later abandoned that idea, probably for health reasons. Nietzsche occasionally returned to Naumburg to visit his family, and, especially during this time, he and his sister had repeated periods of conflict and reconciliation.
While in Genoa, Nietzsche's failing eyesight prompted him to explore the use of typewriters as a means of continuing to write. He is known to have tried using the Hansen Writing Ball, a contemporary typewriter device. In the end, a past student of his, Heinrich Köselitz or Peter Gast, became a sort of private secretary to Nietzsche. In 1876, Gast transcribed the crabbed, nearly illegible handwriting of Nietzsche for the first time with Richard Wagner in Bayreuth.
To the end of his life, Gast and Overbeck remained consistently faithful friends. Malwida von Meysenbug remained like a motherly patron even outside the Wagner circle. Soon Nietzsche made contact with the music-critic Carl Fuchs. Nietzsche stood at the beginning of his most productive period. Beginning with Human, All Too Human in 1878, Nietzsche would publish one book or major section of a book each year until 1888, his last year of writing; that year, he completed five.
In 1882, Nietzsche published the first part of The Gay Science. That year he also met Lou Andreas Salomé, through Malwida von Meysenbug and Paul Rée. Nietzsche and Salomé spent the summer together in Tautenburg in Thuringia, often with Nietzsche's sister Elisabeth as a chaperone. Nietzsche, however, regarded Salomé less as an equal partner than as a gifted student. Salomé reports that he asked her to marry him and that she refused, though the reliability of her reports of events has come into question. Nietzsche's relationship with Rée and Salomé broke up in the winter of 1882–83, partially because of intrigues conducted by Elisabeth. Amidst renewed bouts of illness, living in near-isolation after a falling out with his mother and sister regarding Salomé, Nietzsche fled to Rapallo. Here he wrote the first part of Thus Spoke Zarathustra in only ten days.
By 1882 Nietzsche was taking huge doses of opium but was still having trouble sleeping.
After severing his philosophical ties with Schopenhauer (who was long dead and never met Nietzsche) and his social ties with Wagner, Nietzsche had few remaining friends. Now, with the new style of Zarathustra, his work became even more alienating and the market received it only to the degree required by politeness. Nietzsche recognized this and maintained his solitude, though he often complained about it. His books remained largely unsold. In 1885, he printed only 40 copies of the fourth part of Zarathustra and distributed only a fraction of these among close friends, including Helene von Druskowitz.
In 1883 he tried and failed to obtain a lecturing post at the University of Leipzig. It was made clear to him that, in view of the attitude towards Christianity and the concept of God expressed in Zarathustra, he had become effectively unemployable by any German university. The subsequent "feelings of revenge and resentment" embittered him: "And hence my rage since I have grasped in the broadest possible sense what wretched means (the depreciation of my good name, my character, and my aims) suffice to take from me the trust of, and therewith the possibility of obtaining, pupils."
In 1886 Nietzsche broke with his publisher Ernst Schmeitzner, disgusted by his antisemitic opinions. Nietzsche saw his own writings as "completely buried and unexhumeable in this anti-Semitic dump" of Schmeitzner—associating the publisher with a movement that should be "utterly rejected with cold contempt by every sensible mind". He then printed Beyond Good and Evil at his own expense. He also acquired the publication rights for his earlier works and over the next year issued second editions of The Birth of Tragedy, Human, All Too Human, Daybreak, and The Gay Science with new prefaces placing the body of his work in a more coherent perspective. Thereafter, he saw his work as completed for a time and hoped that soon a readership would develop. In fact, interest in Nietzsche's thought did increase at this time, if rather slowly and hardly perceptibly to him. During these years Nietzsche met Meta von Salis, Carl Spitteler, and Gottfried Keller.
In 1886, his sister Elisabeth also married the antisemite Bernhard Förster and travelled to Paraguay to found Nueva Germania, a "Germanic" colony—a plan to which Nietzsche responded with mocking laughter. Through correspondence, Nietzsche's relationship with Elisabeth continued through cycles of conflict and reconciliation, but they met again only after his collapse. He continued to have frequent and painful attacks of illness, which made prolonged work impossible.
In 1887 Nietzsche wrote the polemic On the Genealogy of Morals. During the same year, he encountered the work of Fyodor Dostoevsky, to whom he felt an immediate kinship. He also exchanged letters with Hippolyte Taine and Georg Brandes. Brandes, who had started to teach the philosophy of Søren Kierkegaard in the 1870s, wrote to Nietzsche asking him to read Kierkegaard, to which Nietzsche replied that he would come to Copenhagen and read Kierkegaard with him. However, before fulfilling this promise, he slipped too far into illness. In the beginning of 1888, Brandes delivered in Copenhagen one of the first lectures on Nietzsche's philosophy.
Although Nietzsche had previously announced at the end of On The Genealogy of Morals a new work with the title The Will to Power: Attempt at a Revaluation of All Values, he eventually seems to have abandoned this idea and instead used some of the draft passages to compose Twilight of the Idols and The Antichrist in 1888.
His health seemed to improve, and he spent the summer in high spirits. In the fall of 1888, his writings and letters began to reveal a higher estimation of his own status and "fate". He overestimated the increasing response to his writings, however, especially to the recent polemic, "The Case of Wagner". On his 44th birthday, after completing Twilight of the Idols and The Antichrist, he decided to write the autobiography Ecce Homo. In its preface—which suggests Nietzsche was well aware of the interpretive difficulties his work would generate—he declares, "Hear me! For I am such and such a person. Above all, do not mistake me for someone else". In December, Nietzsche began a correspondence with August Strindberg and thought that, short of an international breakthrough, he would attempt to buy back his older writings from the publisher and have them translated into other European languages. Moreover, he planned the publication of the compilation Nietzsche Contra Wagner and of the poems that made up his collection Dionysian Dithyrambs.