Setup: Docker
This guide covers setting up MASV Agent using Docker. For native installation on your operating system, see the platform-specific guides for Linux, macOS, or Windows.
Supported architectures
Section titled “Supported architectures”MASV Agent supports multiple architectures for deployment in various environments. Use the masvio/masv-agent:latest image tag to automatically pull the correct architecture for your system.
| Architecture | Tag |
|---|---|
x86-64 | latest |
arm64 | latest |
Pulling the image
Section titled “Pulling the image”Ensure that Docker is installed on the host machine, then pull the MASV Agent image:
docker pull masvio/masv-agent:latestVolume configuration
Section titled “Volume configuration”MASV Agent stores configuration and transfer data in two directories. Use Docker volumes to make these persistent across container restarts.
| Volume | Purpose |
|---|---|
/config | Application configuration and saved transfer state |
/data | Default mount point for automated downloads and uploads |
Create matching directories on the Docker host before starting the container:
mkdir ~/masv-agentmkdir ~/masv-filesContainer startup
Section titled “Container startup”Docker CLI
Section titled “Docker CLI”docker run -d \ --name masv-agent \ -u 1000:1000 \ -v ~/masv-agent:/config \ -v ~/masv-files:/data \ --restart unless-stopped \ masvio/masv-agent:latest-v ~/masv-agent:/configmaps the host directory to the container’s config directory. MASV Agent uses this to store configuration and transfer state. Keeping this data intact maintains transfer progress between restarts.-v ~/masv-files:/datamaps the host directory to the container’s data directory, used for downloads and uploads.-u 1000:1000sets the user and group ID that MASV Agent runs as. Replace with the appropriate IDs for your environment if needed.
Docker Compose
Section titled “Docker Compose”To authenticate with Docker Compose, define a Docker environment variable or Docker secret. This example uses an environment variable API_KEY:
version: "3"services: masvagent: image: masvio/masv-agent:latest container_name: masv-agent user: "1000:1000" environment: - TZ=UTC - API_KEY=${API_KEY} volumes: - ~/masv-agent:/config - ~/masv-files:/data ports: - 8080:8080 restart: unless-stopped command: ["--api-key", "$API_KEY"]Start the container:
docker-compose upParameters
Section titled “Parameters”When launching MASV Agent with masv server start, you can configure it using various command-line flags. See the full list in the Getting Started guide.
Executing commands
Section titled “Executing commands”Prefix any masv command with docker exec masv-agent to run it inside the container:
docker exec masv-agent masv gateway lsFor convenience, set up a shell alias to streamline interactions:
alias masv='docker exec masv-agent masv'
masv gateway lsAlternatively, open an interactive shell inside the container:
docker exec -i masv-agent bash$ masv gateway lsUpdating MASV Agent
Section titled “Updating MASV Agent”Filesystem changes within a Docker container are not easily migrated to a new container. Store your configuration files in an external, persistent host directory (as described in Volume configuration) and follow these steps to update:
- Stop the current MASV Agent container.
- Back up the existing config directory (
~/masv-agent) to a safe location. It contains configuration, transfer records, and any custom files such as scripts. - Pull the new MASV Agent image:
Terminal window docker pull masvio/masv-agent:latest - Point the new container to the existing config directory, or set up a new config directory and copy the old config files into it.
- Start the new container.
- Verify the new container is working as expected and records have been updated correctly.
- Remove the old container.
Next steps
Section titled “Next steps”- Authentication — Authenticate with API keys or credentials before transferring files.
- Uploads — Send files via Team email, shareable Link, or Portal.
- Downloads — Initiate, monitor, and manage file downloads.
- Storage Gateway — Connect cloud storage providers to MASV.