Run a full Linux development environment on your NAS — safely inside a container — without modifying the NAS operating system.
NAS DevBox turns your NAS into a remote Linux workstation while keeping Docker and storage on the host.
- Full Ubuntu environment accessible via SSH
- No changes to the NAS OS
- Projects stored directly on NAS storage
- Manage host Docker from inside the dev container
- Isolated, disposable development environment
Ideal for homelabs, self-hosted setups, and lightweight remote development.
Your PC ── SSH ──► Dev Container (Ubuntu)
│
▼
Docker Engine (NAS)
│
▼
Project Containers
How it works
- The NAS runs Docker normally
- DevBox runs an Ubuntu container with development tools
- Your projects live on the NAS and are mounted into
/workspace - The container controls host Docker via the Docker socket
No changes to the NAS firmware or OS are required.
- NAS with Docker installed
- SSH access to the NAS
- A directory for projects on the NAS (e.g.
/volume1/projects)
mkdir -p /volume1/projectsmkdir -p /volume1/home/devbox
cd /volume1/home/devbox
git clone https://github.com/loglux/NAS-DevBox.git .Choose:
- a username
- an SSH port (must not be 22)
- your projects directory
./devbox.sh \
--user dev \
--pass 'changeme' \
--ssh-port 2202 \
--projects-dir /volume1/projectsWhat devbox.sh does:
- passes your parameters to Docker build/runtime
- builds or rebuilds the DevBox image
- starts the container in background mode
- mounts your NAS projects directory to
/workspace - connects container to host Docker via
/var/run/docker.sock - if
--recreateis used, removes old container before fresh start
ssh dev@NAS_IP -p 2202Your projects will be available inside the container at:
/workspace
- Username: as specified with
--user - Password:
changeme
changeme is an intentional bootstrap placeholder required for first login.
Change it immediately after installation.
From the NAS host:
docker exec -it devbox passwd devInside the container:
docker psYou should see containers running on the NAS host.
Inside the container:
sudo visudoAdd:
dev ALL=(ALL) NOPASSWD:ALL
Recreate removes the existing container and builds a fresh one.
Important:
- DevBox does not remember previous settings
- You must pass all required parameters again
- The password resets unless
--passis specified - Existing project data is safe (stored on NAS)
./devbox.sh --recreate \
--user dev \
--ssh-port 2202 \
--projects-dir /volume1/projectsIf --pass is not provided, the password resets to changeme. Change it again after recreation.
DevBox can be configured via command-line flags or environment variables.
| Variable | Description | Default |
|---|---|---|
| DEVBOX_USER | Container username | dev |
| DEVBOX_PASS | User password | changeme |
| DEVBOX_SSH_PORT | SSH port | 2202 |
| DOCKER_GID | Docker group ID | 1000 |
| DEVBOX_PROJECTS_DIR | Projects path on NAS | required |
| DEVBOX_CONTAINER_NAME | Container name | devbox |
Flags override environment variables.
Running ./devbox.sh without flags uses defaults from the script and does not reuse previous values.
- The container has access to the host Docker socket
- Anyone with container access can control host containers
- Use strong passwords or SSH keys
- Consider restricting network exposure
This setup is useful if you want to:
- Develop directly on NAS storage
- Keep your NAS OS untouched
- Run disposable dev environments
- Use NAS as a remote build machine
- Manage Docker workloads remotely
MIT