Skip to content

Commit

Permalink
Merge branch 'main' of github.com:dchristl/headless-haystack
Browse files Browse the repository at this point in the history
  • Loading branch information
dchristl committed Mar 18, 2024
2 parents 750b04a + c9e57b4 commit ae73450
Show file tree
Hide file tree
Showing 17 changed files with 828 additions and 89 deletions.
52 changes: 30 additions & 22 deletions FAQ.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@

## Frequently asked questions
# Frequently asked questions

#### Where and what data is stored on the host?

During the installation, a Docker volume (*mh_data*) is created, which is located in the default folder. This is normally under `/var/lib/docker/volumes/mh_data/_data`, but you can check, if your location is different, with:

```
```bash
docker inspect macless-haystack | grep mh_data
```

Check out the *Source*-key. The folder is typically protected and can only be accessed and modified by the root user.

In the folder you'll find the configuration (config.ini), the authentication (auth.json), if it has already been executed. Additionally, the self-signed certificate used for SSL is also located here.

#### How can I see the logs?

You can check out the logs with:
```

```bash
docker logs -f macless-haystack
```

or restart docker in interactive mode:
```

```bash
docker stop macless-haystack
docker start -ai macless-haystack
```
Expand All @@ -32,17 +35,17 @@ This is where specific settings can be configured, for example, if another/exist

During the registration, an error occurs, for example:

```
```text
It seems your account score is not high enough. Log in to https://appleid.apple.com/ and add your credit card (nothing will be charged) or additional data to increase it.
```

This can happen with new accounts that have not provided any data and/or devices. A solution might be to add a payment method (i.e. credit card), register your account with a real Apple device and/or add some more data to the account at [Apple](https://appleid.apple.com/).
This can happen with new accounts that have not provided any data and/or devices. A solution might be to add a payment method (i.e. credit card), register your account with a real Apple device and/or add some more data to the account at [Apple](https://appleid.apple.com/).

There are indications that accounts newly registered through [Apple Music](https://play.google.com/store/apps/details?id=com.apple.android.music) do not have this issue.

Unfortunately, there is no general solution as Apple changes the mechanism. After the data has been added, the registration can be restarted:

```
```bash
docker stop macless-haystack
docker start -ai macless-haystack
```
Expand All @@ -55,43 +58,44 @@ The data must, of course, also be entered into the configuration of the frontend

#### How can I host my own web-frontend?

You shouldn't do that because there's no reason for it. It's better to use the web frontend on [Github](https://dchristl.github.io/macless-haystack/).
You shouldn't do that because there's no reason for it. It's better to use the web frontend on [Github](https://dchristl.github.io/macless-haystack/).
The frontend is always up to date and runs stable. Security concerns regarding data are also not an issue here because GitHub only delivers the empty page. All data such as location, keys, request frequency, etc., are not transmitted to GitHub. All communication then occurs only between your system (browser) and the endpoint. Theoretically, after the page has been loaded, GitHub could be blocked in the firewall, and the application would still work.

The frontend is still offered for download in the releases (webapplication.zip) and can be self-hosted.

#### How do I update the Docker container

An update of the container should generally not be necessary, as it automatically updates when restarted. This can be achieved by using
```
An update of the container should generally not be necessary, as it automatically updates when restarted. This can be achieved by using

```bash
docker restart macless-haystack
```

Upon startup, the container automatically fetches the latest state from this repository. If, however, an update of the container is necessary (for example, if it is mentioned in the release notes), the old one can be deleted and a new one pulled with:

```
```bash
docker rm -f macless-haystack
docker rmi christld/macless-haystack
docker run -d --restart unless-stopped --name macless-haystack -p 6176:6176 --volume mh_data:/app/endpoint/data --network mh-network christld/macless-haystack
```

A new registration is usually not necessary, as the data is retained.

#### Restart the registration/change account

If, for example, your activation was successful, and you still don't have access or simply want to switch your account, you can repeat the registration by deleting the auth.json and restarting the container:

```
```bash
docker stop macless-haystack
sudo rm /var/lib/docker/volumes/mh_data/_data/auth.json #adjust folder, if needed
docker start macless-haystack
```

#### How can I reset everything and start over? How can i completely uninstall Macless Haystack?


You can start completely from scratch by deleting the container and the data. After that, you can begin the guide from the beginning:

```
```bash
docker rm -f macless-haystack
docker rmi christld/macless-haystack
docker volume rm mh_data
Expand All @@ -106,28 +110,32 @@ docker network prune
#### How can I access a running container with a shell

You can always access the shell of the container with:
```

```bash
docker exec -it macless-haystack /bin/bash -c "export TERM=xterm; exec bash"
```

#### How can I use SSL if the endpoint runs on another machine than the UI?

If you want to use Macless Haystack not on the same machine your browser is running or you want to use SSL, some extra steps are needed. You need a valid certificate, called certificate.pem in the server's folder or you can rename the file rename_me.pem as root to certificate.pem and use my self signed one. After that restart the container:
```
If you want to use Macless Haystack not on the same machine your browser is running or you want to use SSL, some extra steps are needed. You need a valid certificate, called certificate.pem in the server's folder or you can rename the file rename_me.pem as root to certificate.pem and use my self signed one. After that restart the container:

```bash
sudo su
cd /var/lib/docker/volumes/mh_data/_data
mv rename_me.pem certificate.pem
docker restart macless-haystack
```
If you used a self signed certificate go to your client where you want to run Macless Haystack and point your browser to your endpoint (i.e. https://myserver:6176). You should see something like that:
![Certificate error](firefox_cert.png)

If you used a self signed certificate go to your client where you want to run Macless Haystack and point your browser to your endpoint (i.e. <https://myserver:6176>). You should see something like that:
![Certificate error](images/firefox_cert.png)

Go to 'Advanced' and 'Accept the Risk and continue'. You should see a directory listing now. Use Macless Haystack now normally, but change the endpoint server setting, according to your needs. Use now https instead!

#### How can I use my own certificate with private and public key (i.e. [Let's Encrypt](https://letsencrypt.org/) )
#### How can I use my own certificate with private and public key (i.e. [Let's Encrypt](https://letsencrypt.org/) )

The certificate is created according to the current instructions from Let's Encrypt and then symbolically linked in the container. If there is a file alongside certificate.pem (public key) called privkey.pem (private key), they will be used. The two files will be linked like that (Check out the folder and file-names)

```
```bash
sudo ln -s <path_to_private_key> /var/lib/docker/volumes/mh_data/_data/privkey.pem
sudo ln -s <path_to_public_key> /var/lib/docker/volumes/mh_data/_data/certificate.pem
```
Loading

0 comments on commit ae73450

Please sign in to comment.