Stopping the BookWyrm Process and Removing its Automatic System Startup

pile of open books

BookWyrm is an open-source platform for tracking and discussing books, offering a decentralized alternative to commercial book review sites, with features like federated networking, customizable theming, and integration with ActivityPub.

Sometimes we need to stop the BookWyrm process and remove its automatic system startup in order to migrate the service to another server or for other purposes.

Stopping BookWyrm and removing it from system startup involves reversing the steps taken during installation. Here’s a guide on how to stop BookWyrm and ensure it doesn’t start automatically:

  1. Stop BookWyrm’s systemd services: systemctl stop bookwyrm bookwyrm-worker bookwyrm-scheduler
  2. Disable BookWyrm’s systemd services so they don’t start up automatically on system boot: systemctl disable bookwyrm bookwyrm-worker bookwyrm-scheduler
  3. Remove the systemd service files: rm /etc/systemd/system/bookwyrm.service rm /etc/systemd/system/bookwyrm-worker.service rm /etc/systemd/system/bookwyrm-scheduler.service
  4. Optional: Remove the BookWyrm application and associated files:
    • If you want to completely remove the application:
      bash rm -rf /opt/bookwyrm
  5. Remove the Nginx configuration: rm /etc/nginx/sites-enabled/bookwyrm.conf rm /etc/nginx/sites-available/bookwyrm.conf systemctl reload nginx
  6. Optional: Remove the PostgreSQL database and user:
    • Access the PostgreSQL prompt: sudo -i -u postgres psql
    • At the PostgreSQL prompt, enter the following commands: DROP DATABASE bookwyrm; DROP USER bookwyrm; Exit the PostgreSQL prompt with: \q
  7. Optional: Remove the BookWyrm system user: userdel bookwyrm
  8. Recheck:
    • After performing these steps, BookWyrm should be stopped and removed from system startup. If you followed the optional steps, the application and its associated data would also be removed. It’s a good practice to double-check and ensure all services are stopped and configurations are removed.

Please remember that removing software and services can sometimes have unintended consequences, especially if other applications or services depend on them. Always backup any critical data and configurations before making significant changes to your system.

Discover more from Sang-nguok

Subscribe now to keep reading and get access to the full archive.

Continue reading