Running API2File

Start serving API data on your network

Prerequisites: Ensure you've completed the installation and configuration steps before proceeding.

Select your platform:

Running on Windows

Port 445 Conflict

Windows uses port 445 for file sharing. You'll need to free this port for Api2File to work properly. See instructions below.

Method 1: Manual Testing (Quick Start)

Best for testing and development. Run Api2File from the command line with real-time logging.

Run from installation directory:

cd "C:\Program Files\API2File"
api2file.cli.exe

Or double-click api2file.cli.exe from Windows Explorer

Press Ctrl+C to stop

Method 2: Windows Service (Production)

Recommended for production. Runs automatically on system startup without user login.

Install as Windows Service (run as Administrator):

cd "C:\Program Files\API2File"
api2file.WindowsService.exe install

Manage service with Windows Services:

services.msc

Look for "API2File" in the services list

Note:

Configuration changes in apis.yaml require a service restart to take effect.

Freeing Port 445

If you see "Port 445 not available" error, disable Windows file sharing:

Run as Administrator in Command Prompt:

sc stop lanmanserver
sc config lanmanserver start=disabled

Then reboot your computer

⚠️ Note: This disables local disk and printer sharing on this server. Only disable if this server is dedicated to Api2File .

Running on Linux

Good news! Linux doesn't have port conflicts. Api2File should start without additional configuration.

Starting API2File

Run from installation directory:

cd /opt/api2file
./api2file.cli

Press Ctrl+C to stop

Running as a System Service (Recommended)

For production environments, configure Api2File to start automatically using systemd.

Create systemd service file:

sudo nano /etc/systemd/system/api2file.service

Add this configuration:

[Unit]
Description=API2File SMB Service
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/api2file
ExecStart=/opt/api2file/api2file.cli
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable api2file
sudo systemctl start api2file

Check service status:

sudo systemctl status api2file

Running with Docker

Coming Soon

Docker container support is currently in development.

Verify API2File is Running

Test from any computer on the same network using an SMB client.

Windows Client

Use Windows File Explorer to connect:

  1. Press Win + R
  2. Type: \\SERVER-IP
  3. Press Enter

Or use "Map Network Drive" from File Explorer

Linux Client

Install and use smbclient:

sudo apt-get install smbclient smbclient -L //SERVER-IP

Replace SERVER-IP with your server's address

Success!

If you can see the Api2File share and browse API data, you're all set! Your team can now access API data like regular network files.

< Previous topic
Configure AppSettings