On this page
Fastest path on Linux
The Vault page in your portal shows this line with your vault filled in: click Reveal token and copy it. It installs restic, creates your encryption password on your machine, takes a first snapshot of /etc /home /root /var/www /srv and schedules a daily backup.
curl -fsSL https://servercrate.net/install.sh | sudo sh -s -- --repo "rest:https://vaultuser:YOUR_TOKEN@a1b2c3d4.vault.servercrate.net/"The password is saved to /etc/servercrate/backup.env and never reaches us, so yours is the only copy: store it somewhere safe. Add --dry-run to see what the installer would do without changing anything. On macOS or Windows, or to do it by hand, follow the six steps below.
Step 1: Install Restic
Restic is a free, open-source backup tool: a single binary that encrypts your files on your machine and sends them to your vault.
sudo apt update && sudo apt install -y resticsudo dnf install -y resticsudo dnf install -y epel-release && sudo dnf install -y resticsudo pacman -S resticDistribution packages can trail the current restic release. The official binary below is always the latest release on GitHub, checked against its published SHA256SUMS before it is installed.
# Pick the build for this machine
case "$(uname -m)" in
x86_64) ARCH=amd64 ;;
aarch64|arm64) ARCH=arm64 ;;
armv7l) ARCH=arm ;;
*) ARCH="$(uname -m)" ;;
esac
# Find the latest release from the redirect GitHub gives for /releases/latest
VER="$(curl -fsSLI -o /dev/null -w '%{url_effective}' https://github.com/restic/restic/releases/latest)"
VER="${VER##*/v}"
F="restic_${VER}_linux_${ARCH}.bz2"
# Download, verify the checksum, then install
curl -fsSLO "https://github.com/restic/restic/releases/download/v${VER}/${F}"
curl -fsSLO "https://github.com/restic/restic/releases/download/v${VER}/SHA256SUMS"
grep " ${F}\$" SHA256SUMS | sha256sum -c - \
&& bunzip2 -f "$F" \
&& sudo install -m 755 "${F%.bz2}" /usr/local/bin/resticbrew install resticwinget install --exact --id restic.resticscoop install resticOpen a new PowerShell window afterwards so restic is on your PATH. You can also download the Windows build from the restic releases on GitHub.
pkg install -y resticCheck it with restic version: it prints the installed version number.
Step 2: Connect to your vault
Open the Vault page in your portal. Its Connection panel shows your vault address and user; click the token to reveal it. Then set these two environment variables.

# Replace YOUR_TOKEN and the vault hostname with the values from your portal
export RESTIC_REPOSITORY='rest:https://vaultuser:YOUR_TOKEN@a1b2c3d4.vault.servercrate.net/'
export RESTIC_PASSWORD='YOUR_ENCRYPTION_PASSWORD'# Replace YOUR_TOKEN and the vault hostname with the values from your portal
$env:RESTIC_REPOSITORY = 'rest:https://vaultuser:YOUR_TOKEN@a1b2c3d4.vault.servercrate.net/'
$env:RESTIC_PASSWORD = 'YOUR_ENCRYPTION_PASSWORD'The token signs you in to the vault. The encryption password is a different secret that you choose: it never reaches us and it is the only key to your data.
Persist these in your shell profile or in an env file only your user can read (chmod 600). Never commit them to git.
Step 3: Initialize the repository
Run this once to create your encrypted Restic repository on the vault.
restic initYour password encrypts everything. restic init uses the RESTIC_PASSWORD you set, or asks for one if you did not. Your data is encrypted with it before it leaves your machine, and ServerCrate never sees it. Store it in a password manager: lose it and your backups are unrecoverable.
Step 4: Run your first backup
Back up any directory. After the first run, only changed data uploads.
# Back up your home directory
restic backup ~/
# Back up several paths
restic backup /home /etc /var/www
# Skip folders you don't need
restic backup ~/ --exclude ~/.cache --exclude ~/Downloads
# List your snapshots
restic snapshots# Back up your Documents folder
restic backup "$env:USERPROFILE\Documents"
# List your snapshots
restic snapshotsStep 5: Schedule automatic backups
On Linux, save a script and run it nightly with cron. Run these as root (sudo -i).
# 1. Save your encryption password where only root can read it
( umask 077; printf '%s\n' 'YOUR_ENCRYPTION_PASSWORD' > /root/.restic-pass )
# 2. Create the backup script
cat > /usr/local/bin/sc-backup.sh << 'EOF'
#!/bin/sh
PATH=/usr/local/bin:/usr/bin:/bin
export RESTIC_REPOSITORY='rest:https://vaultuser:YOUR_TOKEN@a1b2c3d4.vault.servercrate.net/'
export RESTIC_PASSWORD_FILE=/root/.restic-pass
exec restic backup /home /etc --exclude /root/.cache
EOF
chmod 700 /usr/local/bin/sc-backup.sh
# 3. Run it every night at 02:00
echo '0 2 * * * root /usr/local/bin/sc-backup.sh >> /var/log/sc-backup.log 2>&1' > /etc/cron.d/sc-backupPrefer systemd? The systemd timer guide has the units. On Windows or a Mac, Backrest schedules the same restic backups from a window.
Retention runs with your cleanup key from one trusted machine, never from the hosts you back up. See retention on ServerCrate vaults.
On paid plans, ServerCrate can alert you if backups stop running as expected, so a broken schedule does not quietly stay broken.
Step 6: Restore files
No restore fees. Restore everything, a specific snapshot, or a single file.
# List snapshots
restic snapshots
# Restore the latest backup to /restore
restic restore latest --target /restore
# Restore a specific snapshot (use an ID from restic snapshots)
restic restore a2f4e91c --target /restore
# Restore a single file
restic restore latest --target /tmp/restore --include /home/user/document.pdfmkdir -p ~/restic-mnt && restic mount ~/restic-mntThe restore guide covers restoring after a complete system loss and checking backups before you need them.
Automation (advanced)
For unattended backups, the one-line installer above sets up a systemd timer, cron or launchd job for you, and the systemd timer guide shows how to build one by hand.
Helper scripts: our open-source restic-toolkit wraps backup, prune and healthcheck commands with sane defaults, plus drop-in systemd unit templates.
Stuck? Email us.
A real person responds, usually within a few hours on weekdays.