Mini server for controlling FPGA boards through USB.
Please note that this server configuration was NOT designed to be a public web service. Users are expected to use VPN services - Tailwind in this case - to connect to the server. Risks that may follow by using this server public is not considered.
The fpga-server is a mini server configuration designed to control FPGA boards
via USB.
It provides a web interface and an API to manage FPGA programming, job queues,
and user authentication.
The server is only tested on Fedora 41/42 Server. Other OS/distros were not tested.
To set up fpga-server, follow these steps:
-
Clone the repository:
git clone https://github.com/your-repo/fpga-server.git cd fpga-server -
Download Vivado Lab Edition installation file from here
You might need AMD account to download the file.
Place the file in the same directory - inside
fpga-server. -
Run the script:
sudo ./init.sh
Running the script will install system dependencies, install python dependencies, set up virtual environment, initialize the database, create symlinks, and configure Supervisor(optional) and set up Tailscale(optional).
Please understand that we internally moved to use Cloudflare Zero Trust; Tailscale may not work as expected.
If you need to run part of the scripts manually, use other scripts provided.
# Install system dependencies
./install-dnf-deps.sh
# Install Vivado Lab Edition
./install-vivado-deps.sh
# Install Python dependencies
./install-pip-deps.sh
# This is typically handled by install-pip-deps.sh, but if you would like:
python3 -m venv opt/fpga_app/venv
source opt/fpga_app/venv/bin/activate
pip install -r opt/fpga_app/requirements.txt
# Initialize the database
./opt/fpga_app/scripts/init_db.sh
# Create symlinks
./create-symlink.sh
# Configure Supervisor
sudo cp supervisord.conf /etc/supervisord.d/fpga-server.conf
sudo systemctl enable supervisord
sudo systemctl start supervisord
# Set up Tailscale
./setup-tailscale.shIt is highly recommended to use supervisord to start up the server,
but you can still manually start it:
source opt/fpga_app/venv/bin/activate
python opt/fpga_app/api/app.pyOnce the server is running, you can access the web interface in your browser,
at http://localhost:8000 (or the configured port).
The API provides endpoints for:
- User authentication (
/api/auth) - FPGA programming (
/api/fpga) - Job management (
/api/jobs)
Refer to opt/fpga_app/api/README.md for more details on API usage.
Registering using the web UI is not supported. The recommended way of creating user is using the python script:
python3 /opt/fpga_app/scripts/create_user.pyOr, you can insert into the user DB yourself, in /opt/fpga_app/config/jobs.db.
.bit files uploaded by the users are stored in /opt/fpga_app/config/bitfiles.