A personal, containerized development environment with optional support for:
- Persistent home directory
- Tailscale
- Unraid support
Home directory, code, and user data is wiped when the container is removed. Good for quick testing or one-off tasks.
Build:
docker build -t devbox .Run:
docker run -d --name devbox --hostname devbox devboxYour directories persist in ~/devbox/ (or wherever you choose) on your host machine.
Setup:
mkdir -p ~/devbox/home_dir ~/devbox/codeBuild:
docker build -t devbox .Run:
docker run -d \
--name devbox \
--hostname devbox \
-v ./home_dir:/home/dev \
-v ./code:/code \
devboxBuild:
Important: Ensure Username, UID, and GID match an Unraid user who has access to the share (you can find these with the id username command in Unraid).
docker build \
--build-arg USERNAME=seth \
--build-arg USER_UID=1000 \
--build-arg USER_GID=100 \
-t devbox .Setup:
First, create an unraid share. Use a Cache pool instead of the Array. Here, we have named it devbox. Then, on the Unraid host, create your home_dir.
mkdir -p /mnt/user/devbox/home_dirRun:
Notes:
- The username in the home volume path should match your Unraid user
- The
/configvolume is optional — it enables auto-detection for tools like Tailscale that expect an appdata-style config directory - You could also mount a separate directory (eg.
/mnt/user/devbox/code:/code) for code, but I just work out of~/code. This also simplifies permissions.
docker run -d \
--name devbox \
--hostname devbox \
-v /mnt/user/devbox/home_dir:/home/seth \
-v /mnt/user/appdata/devbox:/config \
devboxConnect to the container (or SSH in if Tailscale is already set up) and run the initialization script:
docker exec -it -u dev devbox zsh
# or docker exec -it -u dev devbox bash
init.shAvailable scripts:
init.sh— runs dotfiles.sh (entry point)dotfiles.sh— sync dotfiles using the bare repo methodconfigure-git.sh— configure git name/email and generate SSH key
See my dotfiles for docs on initializing tools.
This covers Tailscale integration via Unraid's built-in Docker hook. You could also install Tailscale manually inside the container if instead.
The container starts as root to allow Unraid's Tailscale hook to run with proper privileges, then drops to your user for the main process.
In your Unraid Docker template settings:
- Set Use Tailscale to
On - Set Tailscale Hostname to
devbox - Enable Tailscale SSH
Then:
- Start the container and check the logs for the authentication link
- Authenticate via the link
- Disable key expiry for devbox in the Tailscale admin console
Once connected, you can reach devbox from any device on your Tailnet via its hostname or Tailscale IP.
SSH in with ssh devbox, start your dev server with --host, and preview via {tailscale-ip}:{port} from any device on your Tailnet.
Use tmux to keep sessions alive — run opencode or claude code, walk away, close your laptop, resume from anywhere.