UK tech experts · info@vividrepairs.co.uk
Vivid Repairs
Windows desktop showing Portabase dashboard configuration file open in a text editor with API_ENABLED setting visible on a dark developer workstation
Fix It Yourself · Troubleshooting

Portabase REST API Windows

Updated 12 July 202614 min read
As an Amazon Associate, we may earn from qualifying purchases. Our ranking is independent.

The Portabase REST API Windows problem is more common than it should be, and the frustrating part is that the error codes (404, 401, connection refused) all look different but usually trace back to the same handful of root causes. If your backup automation scripts are failing or you cannot hit a single /api/v1 endpoint after installing v1.16, this guide will walk you through every fix in order of likelihood.

TL;DR

Portabase REST API Windows failures are almost always caused by API_ENABLED=false in the dashboard config, a missing or wrong x-api-key header, or Windows Firewall blocking the dashboard port. Set API_ENABLED=true, restart the service, generate a fresh token, and test with curl in PowerShell. If you are behind a reverse proxy, check it is not stripping the auth header.

⏳️ 13 min read ✅ 70-90% success rate 📅 Updated June 2026

Key Takeaways

  • Portabase REST API Windows errors almost always start with API_ENABLED=false in the config file.
  • Every API call needs a valid token in the x-api-key header, not a Bearer token or query string.
  • The dashboard service must be restarted after any config change before the API becomes active.
  • Windows Firewall and reverse proxies are the two most common culprits once the config is correct.
  • A single curl call to /api/v1/health tells you immediately whether the whole chain is working.

At a Glance

  • Difficulty: Intermediate
  • Time Required: 15 to 30 mins
  • Success Rate: 70 to 90% of users fixed at Tier 1

What Causes Portabase REST API Windows Errors?

Portabase v1.16 ships with the REST API disabled by default. That is a deliberate security decision, but it catches a lot of people off guard because the dashboard UI works fine and nothing in the installer tells you the API is off. So the first thing to understand is that a 404 on /api/v1/health does not necessarily mean the endpoint does not exist. It often means the API routes have not been registered yet because API_ENABLED is still false.

The second most common cause is authentication. Portabase uses a static API token passed in the x-api-key header. If you are sending the token as a Bearer token, as a query parameter, or with a typo in the header name, you will get a 401 every time regardless of whether the token itself is valid. This trips up people who are used to other APIs that accept multiple auth methods.

After those two, the next culprits are Windows Firewall and reverse proxies. If the dashboard is running on a non-standard port and you have not created an explicit inbound rule, Windows Defender Firewall will silently drop the connection. You will see a connection timeout rather than a 404 or 401, which makes it look like a different problem entirely. Similarly, if you are running IIS or Nginx in front of Portabase, there is a good chance the proxy is either rewriting the /api/v1 path or stripping the x-api-key header before the request reaches the dashboard. Both of these are fixable but they require a bit of digging.

Worth mentioning: if your Windows environment has been through a recent update cycle and something went sideways, it is worth checking whether the Portabase service itself is still running. A Windows Update error can occasionally leave services in a stopped state without any obvious notification. Check services.msc before you spend time debugging the API config.

Here is a quick summary of what each error code typically means in practice:

  • 404: API routes not registered. API_ENABLED=false or wrong base path.
  • 401 / 403: Token missing, wrong header name, or token has been revoked.
  • Connection refused / timeout: Service not running, or firewall blocking the port.
  • 502 / 503: Reverse proxy cannot reach the dashboard. Service down or wrong upstream port in proxy config.

Portabase REST API Windows Quick Fix

Start here. This covers the three causes that account for the vast majority of cases. Took me about five minutes to confirm on a fresh v1.16 install where the API was just switched off.

1

Enable the API and Test Authentication Easy

  1. Open your browser and load the dashboard
    Go to http://hostname:port (or HTTPS if you have TLS set up). If the UI loads, the service is running. If it does not load at all, skip ahead to Solution 2 and fix the service first.
  2. Locate the configuration file
    Find the Portabase dashboard configuration file or .env file. It sits in or near the dashboard installation directory. Open it in a text editor (Notepad is fine).
  3. Set API_ENABLED=true
    Look for the line API_ENABLED=false and change it to API_ENABLED=true. If you also want the Swagger UI, add OPENAPI_ENABLED=true on a new line. Save the file.
  4. Restart the Portabase service
    Press Win+R, type services.msc and hit Enter. Find the Portabase or dashboard service in the list, right-click it and select Restart. Wait for the status to show Running.
  5. Generate a fresh API token
    Back in the dashboard, go to Profile > Account > API Token. Click to generate a new token and copy it somewhere safe. Do not close this tab yet.
  6. Test with curl in PowerShell
    Open PowerShell and run:
    curl -H 'x-api-key: YOUR_TOKEN' http://your-dashboard-host:port/api/v1/health
    Replace YOUR_TOKEN with the token you just copied. You should get a JSON response and HTTP 200.
HTTP 200 with a JSON body means the Portabase REST API Windows setup is working. Your automation scripts can now use the same token and base URL.
All Portabase API routes live under /api/v1. If you call the root URL without that prefix you will always get a 404, even when the API is enabled. Double-check every client script uses the full path.

If that quick fix sorted it, great. If you are still seeing errors, the problem is either the Windows Firewall, the service environment, or a reverse proxy in the way. Keep reading.

More Portabase REST API Windows Solutions

These intermediate fixes cover the cases where the API is enabled and the token is correct but something in the Windows environment or network path is still blocking requests. In my experience, the firewall one catches people out more often than they expect, especially on machines that have had Windows Defender policies applied by a domain admin.

2

Fix Windows Firewall Port Rules Intermediate

  1. Open Windows Defender Firewall with Advanced Security
    Press Win+R, type wf.msc and hit Enter. Click Inbound Rules in the left panel.
  2. Look for an existing rule for the dashboard port
    Scan the list for any rule referencing Portabase or the port number your dashboard uses. If one exists but shows a red X (blocked), right-click it and select Enable Rule.
  3. Create a new inbound rule if none exists
    Click New Rule on the right. Select Port, then TCP, then enter the dashboard port number. Select Allow the connection, apply to Domain and Private profiles, give it a name like Portabase Dashboard, and click Finish.
  4. Verify the port is now reachable
    Open PowerShell and run: Test-NetConnection your-dashboard-host -Port <port>. You should see TcpTestSucceeded : True. If it still fails from a remote machine, check whether a network firewall or router is also blocking the port.
TcpTestSucceeded : True confirms the port is open. Re-run the curl health check from Solution 1 to confirm the full API path is now working.
If your machine is domain-joined, a Group Policy may be overriding your local firewall rules. A rule you create in wf.msc can be silently removed or disabled by the next Group Policy refresh. Talk to your domain admin if this keeps happening. The Windows Firewall error 0x80070422 article covers service-level firewall failures that can also interfere here.
3

Fix Reverse Proxy Header and Path Forwarding Intermediate

  1. Identify your reverse proxy
    Check whether IIS, Nginx, or Apache sits in front of the Portabase dashboard. If you are hitting the dashboard directly on its native port, skip this solution.
  2. For Nginx: add header preservation to your location block
    Open your Nginx site config. Inside the location /api/v1 block, add:
    proxy_set_header x-api-key $http_x_api_key;
    Also confirm proxy_pass points to the correct dashboard port and that the path is not being rewritten. See the Nginx proxy_set_header documentation for the full syntax. Reload Nginx after saving.
  3. For IIS: check URL Rewrite rules
    Open IIS Manager, select your site, and open URL Rewrite. Confirm no rule is rewriting or blocking requests to /api/v1. Check the Server Variables section to ensure HTTP_X_API_KEY is being passed through. The Microsoft IIS URL Rewrite documentation explains how to configure server variable passthrough correctly.
  4. Confirm protocol consistency
    If the proxy accepts HTTPS but forwards to the dashboard over HTTP, make sure the dashboard is configured to accept HTTP on its internal port. A protocol mismatch here causes 502 errors that look like API failures but are actually proxy errors.
  5. Re-test the API through the proxy
    Run the curl health check using the proxy URL (not the direct dashboard port). HTTP 200 confirms the proxy is forwarding correctly.
If curl through the proxy URL returns HTTP 200, the reverse proxy is no longer stripping your headers or rewriting the path.

Advanced Portabase REST API Windows Fixes

If you have worked through everything above and the API is still misbehaving, the problem is likely in the service environment itself. This means the environment variables are not being seen by the process that actually runs the dashboard, or there is something in the logs that points to a startup failure. These fixes take longer but they do cover the remaining cases.

4

Inspect Service Environment Variables and Logs Advanced

  1. Check environment variables at the process level
    Open PowerShell as Administrator and run:
    Get-ChildItem Env: | Where-Object { $_.Name -like '*API*' }
    This shows you the environment variables in your current session. But if Portabase runs as a Windows service under a different account, those variables may not be set in the service account environment at all. That is a common trap.
  2. Check the service account environment
    If Portabase uses a service wrapper (like NSSM or WinSW), open the wrapper configuration file and look for the environment variable section. Add API_ENABLED=true and OPENAPI_ENABLED=true there explicitly, not just in the .env file, if the wrapper does not load .env automatically. Restart the service after editing the wrapper config.
  3. Read the Portabase log files
    Locate the log directory in the Portabase installation folder. Open the most recent log file and search for strings like API disabled, route not found, auth failed, or port binding errors. These will tell you exactly what the dashboard thinks is happening at startup.
  4. Check Windows Event Viewer
    Press Win+R, type eventvwr.msc. Go to Windows Logs > Application. Filter by the Portabase service name or the runtime it uses (.NET or Node). Look for errors timestamped around the last service restart. Port binding failures and missing config errors show up here when they do not appear in the application logs.
  5. Re-test after correcting the service environment
    Restart the service, wait 30 seconds, then run the curl health check again. If it now returns HTTP 200, the environment variable was the issue all along.
Seeing API_ENABLED=true in both the process environment and the service wrapper config, with no binding errors in Event Viewer, means the service is starting correctly with the API active.
5

Automate API Verification with a PowerShell Script Advanced

  1. Create a test script
    Open PowerShell ISE or VS Code and create a new script. Read the API token from a secure location (Windows Credential Manager or a secrets file with restricted permissions) rather than hardcoding it.
  2. Call multiple endpoints in sequence
    Test /api/v1/health, then a database list endpoint, then a backup trigger. Log the HTTP status code and response body for each. This confirms not just that the API responds but that authentication, agent connectivity, and backup operations all work end to end.
  3. Run the script after every config change
    Make this part of your deployment checklist. It takes 10 seconds to run and catches broken API chains before your scheduled backup jobs do. This kind of proactive testing is especially useful in environments where, much like dealing with a persistent Trojan that keeps returning after removal, the same misconfiguration can reappear after updates or policy refreshes.
All endpoints returning expected HTTP 200 or 201 responses means the full Portabase REST API Windows chain is verified and ready for production automation.
6

Reinstall the Portabase Dashboard Advanced

  1. Back up your configuration and data first
    Copy the Portabase configuration file, .env file, and any data directories to a safe location before touching the installation. Do not skip this step.
  2. Uninstall the current dashboard
    Use Windows Settings > Apps or the Portabase uninstaller if one is provided. If it runs as a service, stop and remove the service first using sc delete PortabaseDashboard in an elevated command prompt.
  3. Reinstall following official instructions
    Download the v1.16 installer from the official Portabase source and follow the installation steps. Do not restore the old .env file until after the first successful startup, in case the old file had corrupted or conflicting values.
  4. Re-apply API settings and generate a new token
    Set API_ENABLED=true and OPENAPI_ENABLED=true in the fresh config. Restart the service. Generate a new API token from the dashboard profile. Run the curl health check to confirm.
Reinstalling is a last resort. Only do this if logs show persistent startup or binding errors that configuration changes have not fixed.

One more thing worth knowing: if your Windows machine has been exhibiting other odd behaviour alongside this (services not starting, settings not saving), it is worth ruling out a broader system issue. A Windows 11 Settings page crash or similar instability can sometimes point to a deeper OS problem that affects multiple services, not just Portabase.

Preventing Portabase REST API Windows Problems

Most of these issues come back after upgrades. Portabase updates can reset or overwrite the configuration file, and if API_ENABLED is not under version control, you will not notice until your backup jobs start failing at 2am. Put the config file in Git or at minimum keep a documented copy of every setting in your team wiki.

Token hygiene matters too. Generate tokens only from the dashboard profile, store them in a proper secrets vault (not a sticky note on the monitor or a plaintext file on the desktop), and rotate them every few months. If a token is compromised, revoke it immediately from the dashboard and generate a replacement. The Microsoft documentation on Windows Firewall inbound rules is worth bookmarking if you manage multiple machines, because the firewall rule for the dashboard port needs to be recreated on every new Windows installation.

Priority order for prevention, most important first:

  1. Version control your dashboard config file. One line change from false to true should never be a mystery.
  2. Schedule a daily call to /api/v1/health from a monitoring tool. Catch outages before your backups do.
  3. Document the canonical API base URL including /api/v1 and make sure every automation script uses it consistently.
  4. Create explicit Windows Firewall rules for the dashboard port. Do not rely on default allow behaviour.
  5. Test the full API chain immediately after every Portabase upgrade. Five minutes of testing saves hours of incident response.
  6. Keep separate config files per environment (dev, test, prod) with clearly documented API settings. Mixing them up is a proper headache to unpick.

Also worth noting: backup software in general benefits from being treated like a production service, not an afterthought. If you are evaluating dedicated backup clone tools for your environment, look for ones that expose a well-documented REST API, have active community support, and are tested against real-world restore scenarios. Independent reviews and community comparisons (check r/sysadmin and r/homelab for current opinions) are more useful than vendor marketing when choosing between options.

Portabase REST API Windows Summary

The Portabase REST API Windows problem almost always starts in one of two places: API_ENABLED=false in the config, or a missing x-api-key header in the request. Fix those two things and restart the service, and 70 to 90% of cases are sorted. If you are still getting errors after that, work through the firewall rules, then the reverse proxy config, then the service environment variables. The curl health check is your best friend throughout: it gives you an immediate, unambiguous answer at each step. Keep your config under version control, monitor the health endpoint on a schedule, and you should not have to come back to this page.

Frequently Asked Questions

A 401 means the API token is missing or wrong. Make sure you are sending the token in the x-api-key header, not as a query parameter or Bearer token. Generate a fresh token from Dashboard > Profile > Account > API Token and retry.

A 404 usually means API_ENABLED is still set to false in your dashboard configuration, or you are calling the wrong base path. Set API_ENABLED=true, restart the dashboard service, and confirm you are using /api/v1 as the path prefix.

Set OPENAPI_ENABLED=true in your dashboard configuration file alongside API_ENABLED=true. Restart the service and the Swagger UI will appear at your dashboard URL under the API docs path.

Yes, but your reverse proxy must forward /api/v1 requests without modifying the path and must preserve the x-api-key header. In Nginx add proxy_set_header x-api-key $http_x_api_key; in your location block. In IIS use URL Rewrite with a preserve-headers rule.

Run: curl -H 'x-api-key: YOUR_TOKEN' http://your-dashboard-host:port/api/v1/health in PowerShell. HTTP 200 with a JSON body means the API is up and authenticated correctly. If you get a connection error, also run Test-NetConnection your-dashboard-host -Port <port> to check whether the port is open at all.