[Unit] Description=Archivio documenti (gestionale web) After=network.target [Service] Type=simple User=gestionale Group=gestionale WorkingDirectory=/opt/gestionale EnvironmentFile=/etc/gestionale.env ExecStart=/opt/gestionale/venv/bin/gunicorn --workers 3 --timeout 300 --bind 127.0.0.1:8000 app:app Restart=on-failure UMask=0027 # Protezioni: il servizio può scrivere solo nella cartella dati NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ProtectHome=true ReadWritePaths=/srv/gestionale [Install] WantedBy=multi-user.target