-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the fafi wiki!
Open a terminal and run sudo nano /etc/systemd/system/fafi.service
Edit the service file: Add the following content to the file, adjusting the ExecStart
, User
, and WorkingDirectory
(location of the .env
file) fields as necessary:
[Unit]
Description=Fafi Web Server
After=network.target
[Service]
Type=simple
User=YOU
WorkingDirectory=/home/YOU/path/to/fafi
ExecStart=/home/YOU/path/to/fafi/your-binary-name
Restart=on-failure
[Install]
WantedBy=multi-user.target
Replace your-binary-name with the actual name of your fafi binary. Reload systemd: After creating or modifying the service file, you need to reload the systemd manager configuration:
sudo systemctl daemon-reload
Start the service: You can now start your service with the following command:
sudo systemctl start fafi.service
Enable the service to start on boot: If you want the service to start automatically at boot, run:
sudo systemctl enable fafi.service
Check the status of the service: You can check the status of your service to ensure it is running correctly:
sudo systemctl status fafi.service
View logs: If you need to troubleshoot, you can view the logs for your service using:
journalctl -u fafi2service
That's it! Your Fafi instance should now be running as a systemd service.