Skip to content

Docker Installation ​

shh.io can be easily installed and run using Docker. This method is recommended for users who want a quick and straightforward way to deploy their own instance of shh.io with minimal setup.

Prerequisites ​

Before you begin, ensure that you have Docker installed on your system. You can download and install Docker from the official Docker website.

Rootless and Non-rootless Docker Images ​

Starting from version 1.5.1, shh.io provides both rootless and non-rootless Docker images. The rootless image, tagged as latest-rootless or <version>-rootless (e.g., 1.5.1-rootless), allows you to run the container without requiring root privileges. This is useful in environments where running containers as root is discouraged for security reasons.

The non-rootless image, tagged as latest or <version> (e.g., 1.5.1), does not require binding the user in Docker commands and can be used in scenarios where root privileges are acceptable.

Image Sources ​

shh.io Docker images are available on both Docker Hub and GitHub Container Registry (GHCR). You can choose the source that best suits your needs.

Basic Docker Run ​

To run shh.io using Docker, you can use the following command:

bash
docker run -d --name enclosed --restart unless-stopped -p 8787:8787 geo-mena/shh
bash
docker run -d --name enclosed --restart unless-stopped -p 8787:8787 ghcr.io/geo-mena/shh

This command will download the shh.io image and start the application, making it accessible at http://localhost:8787.

Explanation of the Command ​

  • -d: Runs the container in detached mode (in the background).
  • --name enclosed: Names the container "enclosed" for easy identification.
  • --restart unless-stopped: Configures the container to always restart unless it is explicitly stopped.
  • -p 8787:8787: Maps port 8787 on your host to port 8787 in the container, making the application accessible on your local machine.
  • geo-mena/shh or ghcr.io/geo-mena/shh: Specifies the Docker image to use.

Docker with Volume Persistence ​

To ensure that your notes and settings are preserved even if the container is stopped or removed, you can run shh.io with volume persistence. Replace /path/to/local/data with the path to your local data directory:

bash
docker run -d --name enclosed --restart unless-stopped -p 8787:8787 -v /path/to/local/data:/app/.data geo-mena/shh
bash
docker run -d --name enclosed --restart unless-stopped -p 8787:8787 -v /path/to/local/data:/app/.data ghcr.io/geo-mena/shh

For the rootless image, you can use the following command (specifying the latest-rootless tag and the user ID and group ID):

bash
docker run -d --name enclosed --restart unless-stopped -p 8787:8787 -v /path/to/local/data:/app/.data --user $(id -u):$(id -g) geo-mena/shh:latest-rootless
bash
docker run -d --name enclosed --restart unless-stopped -p 8787:8787 -v /path/to/local/data:/app/.data --user $(id -u):$(id -g) ghcr.io/geo-mena/shh:latest-rootless

Explanation of Additional Flags ​

  • -v /path/to/local/data:/app/.data: Maps a local directory to the container's data directory, ensuring that data is stored persistently on your host machine.
  • --user $(id -u):$(id -g): Ensures that the container runs with the same user ID and group ID as your current user, preventing potential permission issues with the mounted volume.

Managing the Docker Container ​

Once shh.io is running in a Docker container, you can manage it using the following commands:

Stopping the Container ​

To stop the shh.io container, run:

bash
docker stop enclosed

Restarting the Container ​

To restart the container, use:

bash
docker start enclosed

Removing the Container ​

If you need to remove the container, stop it first and then remove it with:

bash
docker stop enclosed
docker rm enclosed

Updating shh.io ​

To update your shh.io instance to the latest version, first remove the existing container, pull the latest image, and then run the container again:

bash
docker stop enclosed
docker rm enclosed

# From Docker Hub
docker pull geo-mena/shh

# Or from GitHub Container Registry
docker pull ghcr.io/geo-mena/shh

# Run the container again
docker run -d --name enclosed --restart unless-stopped -p 8787:8787 -v /path/to/local/data:/app/.data --user $(id -u):$(id -g) geo-mena/shh

This will ensure that you are using the latest version of shh.io with all your previous data intact.

Next Steps ​

Once you have shh.io up and running, you can explore configuration options to customize your instance further. For more advanced setups, consider using Docker Compose to manage your shh.io deployment.