Store self-hosted files or backups on another drive
Set FILES_DIR or BACKUPS_DIR to keep uploads or backups on a larger or separate drive without moving the whole data folder.
Set FILES_DIR to keep uploaded files on another drive, or BACKUPS_DIR to keep backups elsewhere. Set DATA_DIR to move everything. The server creates the folders if needed.
| Variable | Default | Moves |
|---|---|---|
FILES_DIR | <DATA_DIR>/files | Uploaded files, which grow fastest |
BACKUPS_DIR | <DATA_DIR>/backups | Automatic and manual backups |
DATA_DIR | data next to the binary, or the folder chosen at install | Databases, logs, files and backups |
Logs always stay in <DATA_DIR>/logs.
Keeping backups on a different disk means one disk failure cannot take both your data and your backups.
Windows
Save as start-gamevox.bat next to the .exe, remove :: from the lines you need, and double-click it:
@echo off
:: set FILES_DIR=D:\gamevox-files
:: set BACKUPS_DIR=D:\gamevox-backups
gamevox-self-hosted-server.exe
pause For a Windows service, set the variables in the service's Environment registry value instead. See environment variables.
Linux
Save as start-gamevox.sh, uncomment the lines you need, run chmod +x start-gamevox.sh, then ./start-gamevox.sh:
#!/bin/bash
# export FILES_DIR=/mnt/storage/gamevox-files
# export BACKUPS_DIR=/mnt/storage/gamevox-backups
./gamevox-self-hosted-server For a systemd service, add Environment= lines instead (see Linux with systemd). The service runs as the gamevox user, so give it the new folder:
sudo chown -R gamevox:gamevox /mnt/storage/gamevox-files Move existing files
- Stop the server.
- Copy the contents of
data/files/ordata/backups/to the new folder. - Set the variable and start the server.