Skip to content

Instantly share code, notes, and snippets.

@andyregular
andyregular / README.md
Created December 16, 2023 05:50 — forked from bnhf/README.md
Tailscale - Deploying with Docker and Portainer

Just thought I'd put together some detail on deploying Tailscale using Docker and Portainer. These bits-and-pieces are available elsewhere, but not together, so hopefully this will save someone a bit of time if you'd like to add Tailscale to an existing Docker install:

Here's my annotated recommended docker-compose, to use with Portainer-Stacks. Note that I'm not using a pre-made Auth Key. I started that way, but realized it was very easy to simply check the Portainer log for the tailscaled container once the stack is running. In that log you'll see the standard Auth link that you can use to authorize the container. This way you don't need to create a key in advance, or create a reusable key that introduces a security risk:

version: '3.9'
services:
  tailscale:
    image: tailscale/tailscale
    container_name: tailscaled
kublr:
# Values in fixed section cannot be changed dynamically, they may be hardcoded in other places, although every effort
# will be made to reduce duplication
fixed:
# This path is defined by the actual location of the config file used and cannot be overridden
# in the config file.
#
# Any alternative value of this property specified in a user config file or in extensions'
# default config files will be ignored and overridden by this value.
#
@andyregular
andyregular / btrfs-undelete
Created January 13, 2024 07:15 — forked from Changaco/btrfs-undelete
btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <info@syntax-k.de>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo