Inclusion Criteria:  Signed informed consent Diagnosed with paroxysmal or persistent AF in hospital registries In sinus rhythm at baseline screening Report <75 minutes per week of moderate-to-vigorous exercise the last three months Use a smartphone  Exclusion Criteria:  Permanent AF or persistent AF with at least one continuous episode lasting ≥3 months the last year AF as a complication of acute coronary syndromes, cardiothoracic surgery or infections Planned ablation procedure next 12 months or ablated last 6 months Unstable coronary heart disease De-compensated heart failure Left ventricular ejection fraction <40% At least moderate to severe mitral or aortic pathology, or aortic aneurysms clinically incompatible with safe exercise Moderate to severe chronic obstructive pulmonary disease (GOLD ≥2) Pacemaker or ICD Pregnancy Alcohol or drug abuse Cognitive or serious psychiatric disease that may impede protocol compliance Physical impairments or diseases hindering exercise or making exercise contraindicated Resident of nursing home or other institution Participation in conflicting research studies (i.e. lifestyle interventions)