Encrypted file transfer utility
Also see the command line client, transfer-cli
- Backend:
- Install
rust - Install
postgres:apt install postgresql libpq-dev - Install
migrant(migration manager):cargo install migrant --features postgresql
- Initialize database (postgres):
migrant initmigrant setupmigrant apply --all
- Build and run backend dev server:
cargo run -- serve --port 3002- Configuration can be tweaked in
config.ron
- Poke around in the database:
migrant shell
- Install
- Frontend (inside
/web):
Packaged releases are built and packaged by travis-ci. Complete packaged releases are available here
- Backend (
Rustsetup for cross-compilation)- Install
docker- Add yourself to the
dockergroup:sudo usermod -a -G docker <user> - Restart to pick up changes (logging in & out may suffice)
- You should be able to run
docker versionwithout any errors - May need to start the Docker daemon if it's not already running:
sudo systemctl start docker(not sure about windows/os-x)
- Add yourself to the
- Install
cross:cargo install cross - Build server executables for targets listed in
build.pyscript (currently onlyx86_64):build.py server
- Install
- Frontend (
React)- Build frontend app bundles and copy to their static-file locations
build.py web
- Build frontend app bundles and copy to their static-file locations
postgres&nginxare required
- Initial Setup
- Create and enter a project directory where versioned packages can be managed:
mkdir transfer cd transfer - Download, unpackage, and do initial setup for the latest release
(see releases)
# download curl -LO https://github.com/jaemk/transfer/releases/download/$TAG/transfer-$TAG-$TARGET.tar.gz # extract tar -xf transfer-$TAG-$TARGET.tar.gz # rename mv transfer $TAG # setup "latest" symlink ln -sfn $TAG latest
- Setup an uploads directory where transfer uploads can exist between application code updates.
Make sure your
config.ronfile is updated and copied to the config directory.mkdir transfer_uploads vim latest/config.ron # update "upload_directory" to "/<ABS_PATH_TO>/transfer/transfer_uploads" # and copy to the config directory cp latest/config.ron `latest/bin/transfer admin config-dir`
- Setup the database
latest/bin/transfer admin database setup # Run suggested commands to create database if it doesn't exist # and then try settinng up migrations again latest/bin/transfer admin database setup
- Apply migrations
latest/bin/transfer admin database migrate
- Poke around the database
latest/bin/transfer admin database shell
- Setup nginx
# copy sample config and then update its details with your environment info sudo cp nginx.conf.sample /etc/nginx/sites-available/transfer # check config sudo nginx -t # enable site sudo ln -s /etc/nginx/sites-available/transfer /etc/nginx/sites-enabled/transfer sudo systemctl restart nginx
- Setup systemd service
# copy sample config and then update its details with your environment info sudo cp transfer.service.sample /lib/systemd/system/transfer.service # enable the service sudo systemctl daemon-reload sudo systemctl enable transfer.service # start! sudo systemctl restart transfer # tail the log sudo journalctl -fu transfer
- Create and enter a project directory where versioned packages can be managed:
- Updates
- Assuming you followed the "Initial Setup" section
- Use the
release.pyscript to fetch, unpackage, and symlink the latest release# from the `transfer` project root # follow prompts to download the appropriate target and replace the `latest` symlink latest/release.py fetch
- Apply migrations and restart the app
latest/bin/transfer admin database migrate sudo systemctl restart transfer