Getting started#
Clone the repository#
Your first step is to clone the Filetransfer Tool Server repository and its submodules with these commands:
git clone https://github.com/ansys/ansys-tools-filetransfer-server
cd ansys-tools-filetransfer-server
git submodule update --init --recursive
Build the server#
You have two options for building the Filetransfer Tool Server:
- Use Docker: Build a Docker image that contains the server. 
- Use a Manual build (Linux or Windows): Build the server directly on your machine. 
To build the Docker image, run the following command from the root of the repository:
docker build -f docker/Dockerfile . --tag filetransfer-tool-server
To build on Linux, you must have these tools installed:
- python3
- cmake
- g++compiler
First, you must install the development dependencies:
python3 -m pip install pipx
pipx ensurepath
pipx install 'poetry>=1.8.0'
poetry install
Then, use Conan to fetch the C++ dependencies:
poetry run conan install -of build --build missing --profile:host=./conan/linux_x86_64_Release --profile:build=./conan/linux_x86_64_Release ./conan
Finally, use CMake to configure and build the project:
cmake -B build . -DCMAKE_TOOLCHAIN_FILE='build/conan_toolchain.cmake' -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
To build on Windows, you must have these tools installed:
- python
- cmake
- MSVC compiler 
First, you must install the development dependencies:
python -m pip install pipx
pipx ensurepath
pipx install poetry
poetry install
Then, use Conan to fetch the C++ dependencies:
poetry run conan install -of build --build missing --profile:host=.\conan\windows_x86_64_Release --profile:build=.\conan\windows_x86_64_Release .\conan
Finally, use CMake to configure and build the project:
cmake -B build . -DCMAKE_TOOLCHAIN_FILE='build/conan_toolchain.cmake' -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
Run the server#
After the server is built, you can run it in the following ways:
docker run -p 50000:50000 filetransfer-tool-server
This starts the server and exposes it on port 50000.
To make the uploaded files available to another process, you can share a volume between two Docker containers. A Docker Compose file might look like this:
version: '3.8'
services:
  other-service:
    restart: unless-stopped
    image: <other_service_image>
    <any other options needed for this service>
    working_dir: /home/container/workdir
    volumes:
      - "shared_data:/home/container/workdir/"
    user: "1000:1000"
  ansys-tools-filetransfer:
    restart: unless-stopped
    image: filetransfer-tool-server
    ports:
      - "50000:50000"
    working_dir: /home/container/workdir
    volumes:
      - "shared_data:/home/container/workdir/"
    user: "1000:1000"
volumes:
  shared_data:
./build/src/server --server-address localhost:50000
.\build\src\Release\server.exe --server-address localhost:50000
Command-line options#
The Filetransfer Tool Server provides these command-line options:
- --help- Display a help message and exit.
- --server-address- Configure the address that the server is listening on.
 
    