Lachlan, creator of lemmyunchained.net

  • 0 Posts
  • 48 Comments
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle
  • LachlanUnchained@lemmyunchained.nettoSelfhosted@lemmy.world*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    10
    ·
    edit-2
    1 year ago

    AI GENERATED:


    The ttionya/vaultwarden-backup tool is intended to work with Docker volumes. However, you are using a bind mount, not a named volume. Bind mounts refer to the use of local folders to store data, as in your case (./vaultwarden:/data/), while volumes create a specific place within Docker’s own filesystem for the data.

    Although this tool is designed for volumes, it might still work with bind mounts if the backup container can access the data directory. You would need to modify the volume line in the Docker Compose file for the backup tool to point to the directory where your bind mount is located, i.e., to point it to your local ./vaultwarden directory.

    So, you might want to adjust your docker-compose.yml file like this:

    services:
      vaultwarden-backup:
        image: ttionya/vaultwarden-backup:latest
        container_name: vaultwarden-backup
        environment:
          - PUID=1000
          - PGID=1000
          - BACKUP_INTERVAL=12h
          - PRUNE_BACKUPS=7D
        volumes:
          - ./vaultwarden:/vaultwarden:ro
          - ./backups:/backups
        restart: unless-stopped
    

    In this configuration, ./vaultwarden:/vaultwarden:ro line is the key. It mounts your local ./vaultwarden directory to /vaultwarden inside the backup container (readonly mode), which should allow the backup tool to access the data.











  • Generally it will be the user input that causes errors. Like you’re asking the questions the wrong way.

    If you start with trying to debug code, you’ll learn how to utilise it very quickly. It’s an extremely powerful tool.

    Feed it the code. Tell it the behaviour. Tell it the expected behaviour.

    Get it will find the error immediately. For things that would have taken me days to work out previously.







  • Someone asked in a matrix chat ages ago. And I ran it through gpt4 for them. No idea if it worked. Here’s the output.

    Would be interested to see what happens. I don’t use unraid.

    Unraid Docker Installation Guide for Lemmy

    1. Ensure Docker is installed and running on your Unraid server. If not, go to the Unraid web UI, navigate to the ‘Settings’ tab, select ‘Docker’, and set ‘Enable Docker’ to ‘Yes’.

    2. SSH into your Unraid server with a command like ssh root@<YourUnraidServerIP>.

    3. Create a new folder for Lemmy files. The location isn’t important; you can put it anywhere you want. For example: mkdir /mnt/user/appdata/lemmy cd /mnt/user/appdata/lemmy

    4. Download the default config files: wget https://raw.githubusercontent.com/LemmyNet/lemmy/main/docker/docker-compose.yml wget https://raw.githubusercontent.com/LemmyNet/lemmy/main/docker/lemmy.hjson

    5. Set the correct permissions for the ‘pictrs’ folder: mkdir -p volumes/pictrs chown -R 991:991 volumes/pictrs Note: Change the database password in the ‘docker-compose.yml’ file before your first run if you’d like a different one.

    6. Edit the ‘lemmy.hjson’ file, especially the hostname and possibly the db password: nano lemmy.hjson Make necessary adjustments and save the file.

    7. Go to the ‘Docker’ tab in the Unraid web UI. Click ‘Add Container’, put ‘dessalines/lemmy’ in the ‘Repository’ field. In the ‘Config Type’ field, select ‘Path’, then set ‘Container Path’ to ‘/lemmy’ and ‘Host Path’ to ‘/mnt/user/appdata/lemmy’.

    8. Click ‘Apply’ in Unraid to create the Docker container. Unraid will pull down the Docker image and set it up.

    9. You can now access the Lemmy UI at http://<YourUnraidServerIP>:80.

    10. To make Lemmy available outside the server, set up a reverse proxy. In the Unraid ecosystem, this is typically done using a Docker container such as Nginx Proxy Manager or SWAG.

    11. Secure your Lemmy server with TLS, for example with Let’s Encrypt, using your chosen reverse proxy tool.

    Updating Lemmy:

    1. To update Lemmy, go to the ‘Docker’ tab in Unraid, find the ‘Lemmy’ Docker container, and click ‘Check for Updates’. If an update is available, simply click ‘update’ and Unraid will pull down the new Docker image and update your container.

    2. Alternatively, you can manually fetch the latest version from the git repo: wget https://raw.githubusercontent.com/LemmyNet/lemmy/main/docker/docker-compose.yml docker-compose up -d Note: This guide assumes you’re familiar with the basics of using Unraid, such as accessing the web UI, using the terminal, and setting up Docker containers."