Regular backups are essential for protecting servers, applications, and personal data from hardware failures, accidental deletion, or cyber threats. While Restic is a powerful open-source backup tool known for its encrypted, incremental, and deduplicated backups, managing it entirely from the command line can be challenging for some users.
Zerobyte is a modern, self-hosted web interface built on top of Restic. It simplifies backup management by providing an intuitive dashboard where you can create backup repositories, schedule backup jobs, monitor their status, and restore data—all without manually running Restic commands.
Deploying Zerobyte with Docker
The easiest way to get started is with Docker Compose. Create a docker-compose.yml file with the following configuration:
Install Docker
sudo apt update && sudo apt upgrade -y
sudo apt install -y uidmap curl
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
sudo reboot
Create Docker Compose Yml File
nano docker-compose.yml
services:
zerobyte:
image: ghcr.io/nicotsx/zerobyte:latest
container_name: zerobyte
restart: unless-stopped
cap_add:
- SYS_ADMIN
ports:
- "4096:4096"
devices:
- /dev/fuse:/dev/fuse
environment:
- TZ=Asia/Kolkata # Set your timezone here
- BASE_URL=http://localhost:4096 # URL you will use to access Zerobyte
- APP_SECRET=94bad46...c66e25d5c2b # Generate your own secret with `openssl rand -hex 32`
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/lib/zerobyte:/var/lib/zerobyte
- /home/username/.ssh:/root/.ssh
Generate a secure application secret:
openssl rand -hex 32
Start the application:
docker compose up -d
Once the container is running, open your browser and navigate to:
http://YOUR_SERVER_IP:4096
The Zerobyte dashboard is now ready for configuration.
Connecting Remote Servers
Zerobyte uses SSH to securely access remote Linux servers for backup operations. Passwordless SSH authentication is recommended for automated backups.
First, generate an SSH key pair from Zerobyte server:
ssh-keygen -t ed25519 -f ~/.ssh/zerobyte_key -N ""
ls -l ~/.ssh/zerobyte_key*
Copy the public key to the remote server:
cat ~/.ssh/zerobyte_key.pub | ssh nuc@192.168.29.100 \
"mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
Verify the connection:
ssh -i ~/.ssh/zerobyte_key nuc@192.168.29.100
sudo chmod 600 /.ssh/zerobyte_key
sudo chmod 600 /.ssh/known_hosts
If you can log in without entering a password, mount the private key into the Zerobyte container (or configure it within Zerobyte as required) and add the remote server through the web interface using its hostname or IP address, SSH port, username, and authentication key.
