In western societies, about one in six employees works in shifts. Shiftwork is associated with a number of poor somatic and psychological health outcomes, especially sleep issues. Higher rates of absenteeism and accidents in the workplace are possible consequences. Still, prevention programs and treatment options that are specifically tailored to shift-workers’ needs are rare. We devised a 4-week online cognitive behavioral therapy for insomnia (CBT-I) intervention ( n = 21) and compared sleep outcomes to a face-to-face outpatient treatment for shift-workers ( n = 12) using a sleep diary and the Epworth Sleepiness Scale (ESS). In the online sample, measures also included the World Health Organization wellbeing questionnaire (WHO-5) and the Insomnia Severity Index (ISI). In the outpatient sample, the Beck Depression Inventory (BDI-II), the Montgomery–Åsberg Depression Rating Scale (MADRS), and the Pittsburgh Sleep Quality Index (PSQI) were administered. Results showed significant improvements in sleep efficiency by 7.2% in the online sample and 7.7% in the outpatient sample. However, no significant difference was found in the rate of improvement in sleep efficiency across four weeks of treatment between the samples. In the online sample, the wellbeing (WHO-5) and insomnia symptoms (ISI) scores were significantly improved following the CBT-I intervention ( p < 0.004 and p < 0.002 respectively). In the outpatient sample, symptoms of depression (BDI-II and MADRS scores) and insomnia symptoms (PSQI scores) improved significantly following the CBT-I intervention. In summary, CBT-I significantly improved sleep efficiency in both the online and outpatient samples, in addition to wellbeing, symptoms of insomnia, and depression. The findings of this study demonstrate online CBT-I as a feasible approach for treating insomnia in shift-workers. Future randomized controlled trials are needed.