The main outcome is to estimate the variation of the scores of depressive symptoms, measured through the Hamilton Depression Scale with 17 items. Secondary outcomes include response rates, defined as a reduction of at least 50% in scores, and remission rates, defined as a hamilton score lower than 7. Symptom severity, functionality, quality of life and cognitive impairment secondary to depression will also be measured before and after the interventions, as well as inflammatory blood biomarkers and cortical excitability measures. Data from the sessions will be downloaded from the devices to check for treatment adherence.

In the first visit, after being informed by the study and its potential risks, all participants who sign a written informed consent form will undergo a screening interview, to confirm the diagnosis of unipolar major depressive episode and exclude active substance use disorder. A sociodemographic questionnaire will also be applied, for the collection of basic data, clinical comorbidities and use of medications. In the second visit, participants who meet the eligibility requirements will be evaluated for baseline levels of depressive and cognitive symptoms, then undergo one run-in session of sham tDCS (placebo) and receive a wrist actometer that must be used during the following two-week period. After this period, in the third visit, depressive symptoms and actigraphy data will be reassessed, and those who did not wear the wrist actometer for at least 7 consecutive days, and those with an improvement of symptoms superior to 30% will not be included in the rest of the trial due to significant response to one session of placebo. Participants who remain eligible will be randomized in a double blind manner (participant and investigator) in a 1:1 ratio to receive 30 sessions of active tDCS (2mA, for 20 minutes, daily, skipping weekends) or 30 sessions of sham tDCS (inactive current, for 20 minutes, daily, skipping weekends). The first session with the randomized device will be performed under supervision of the study researchers, who will teach the participants how to operate the device, and provide a video with instructions to be watched at home if necessary. A psychoeducation video, produced by the research team, will be sent to all the participants after this visit, containing a brief explanation of what depression is and how it's treated. The aim is to provide information with accessible language and ascertain that all the participants understand their diagnosis, and also understand the role of physical activity, healthy diets and basic sleep hygiene have in the improvement of symptoms. During the next three week period, participants will administer themselves the sessions, from monday to friday. The randomized devices will be programmed to administer daily sessions of 20 minutes, from monday to friday, during 6 weeks. All devices will be programmed to not start sessions on weekends, or run more than one session on the same day, unless stimulation is interrupted by some adversity before it has completed at least 10 minutes. After 10 minutes, even if interrupted abruptly, the session will be considered complete. In order to mimic the side effects of the active stimulation, the sham programming delivers 3 ramps of 30 seconds of active current, the first in the first minute of the session, the second after 10 minutes and the third at the last minute of the session. In the fourth visit, participants return after 3 weeks (15 sessions) of stimulation to reassess symptoms and download device and actigraphy data. Participants will return to their homes to administer the following 15 sessions and return after three weeks for the fifth visit, when depressive and cognitive symptoms will be reassessed and participants will be asked if they believe they receive active or sham stimulation. The sixth and last visit takes place 3 months after the end of the trial, for follow up on symptoms and another 15 days of actigraphy for monitoring sleep patterns. Between the third and the fifth visits, weekly online questionnaires will be sent to the participants, for the evaluation and monitoring of adverse effects during the trial. Blood samples and cortical excitability measures (assessed through TMS) will be collected twice, in the third and fifth visits (before and after the trial). During the whole trial, online support via whatsapp will be provided. Members of the team will be available for answering questions and doubts that should arise anytime during the treatment. During the trial, no alterations will be made to the participants' prescriptions, to prevent response to medication as a confounding factor. Participants presenting acute risk or worsening of symptoms at any time point will be removed from the study and receive standard care measures by the research team.

All the questionnaires and patient sensitive data will be collected through the REDCap platform. Anonymous data regarding the adherence to treatment sessions will be stored in an institutional Google Drive cloud. For the statistical analysis, the database will be downloaded with anonymized data. R software and SPSS version 21 will be used. Analyses will be performed considering intention to treat and last observation carried forward will be used in cases of missing data. Distribution of variables will be described in means, medians, standard deviations, interquartile ranges, frequencies and proportions, as appropriate. Multilevel Mixed-Effects Linear Regression or Generalized Estimating Equations will be used to evaluate the time\*group interactions for depressive symptoms. Secondary outcomes will be evaluated through multiple linear regressions. Bonferroni test for multiple comparisons will be used to detect differences between groups in all timepoints.The level of statistical significance was established as p \< 0,05.