Restic REST Server app rejecting access from PowerShell

Client & Server Details

  • Client
    • OS: Windows 11 25H2
    • PowerShell version: 7.6.4
    • restic version (installed via winget):
> restic version
restic 0.19.1 compiled with go1.26.4 on windows/amd64

Problem Description

I’m trying to set up a restic REST server on TrueNAS scale for my Windows PCs to backup to using Backrest. I set up the restic REST server TrueNAS SCALE app with the following settings:

Unfortunately, when I try to initialize the repo from Windows Terminal Preview running PowerShell from the client, the credentials are rejected, even when I set a simple dummy password:

> restic -r rest:http://backupclient:abc123@192.168.0.71:30248/ init
enter password for new repository:
enter password again:
Fatal: Fatal: create repository at rest:http://backupclient:***@192.168.0.71:30248/ failed: unexpected HTTP response (401): 401 Unauthorized

and try enclosing the path in quotes:

> restic -r "rest:http://backupclient:abc123@192.168.0.71:30248/" init
enter password for new repository:
enter password again:
Fatal: Fatal: create repository at rest:http://backupclient:***@192.168.0.71:30248/ failed: unexpected HTTP response (401): 401 Unauthorized

I checked the container logs and found this:

2026-08-02 01:06:06.788440+00:00Invalid htpasswd entry for backupclient.

Within the container shell, I was able to verify that an /auth/htpasswd file exists and that it contains something resembling backupclient:$2y$05$N... so I’m not sure what the problem could be.

As a workaround I’m using an SMB share on the same server as a repo, but I’d rather use the REST server for Append Only features, etc. Any ideas?

Can you please provide:

  • The full rest-server command that is used to run the rest-server (grab it from the container’s process list).
  • The rest-server’s htpasswd file when it has the dummy password in it that you expect to work, so I can try to reproduce it.
  • The complete logs from the rest-server container when it starts up and gets ready to serve.

By the way, I can’t imagine you need that much memory for rest-server, it just shuffles data between the filesystem and some HTTP calls.

~ $ ps
PID   USER     TIME  COMMAND
    1 568       0:03 rest-server --path /data --htpasswd-file /auth/htpasswd --listen=:30248 --append-only=true --group-accessible-repos=false --private-repos=true
15875 568       0:00 /bin/sh
15881 568       0:00 ps
~ $ cat /auth/htpasswd
backupclient:$2b$12$vn2iEBv71/Nx.U9yyHZm9.tsYTc.0MEeuCSYRbdRLd9/Q15mFhoae~
2026-08-03 02:56:29.683285+00:00Data directory: /data
2026-08-03 02:56:29.683345+00:00Authentication enabled
2026-08-03 02:56:29.683482+00:00Loaded htpasswd file /auth/htpasswd
2026-08-03 02:56:29.683506+00:00Append only mode enabled
2026-08-03 02:56:29.683516+00:00Private repositories enabled
2026-08-03 02:56:29.683525+00:00Group accessible repos disabled
2026-08-03 02:56:29.683683+00:00start server on [::]:30248

Sorry, I have no previous experience with REST or REST servers. How much RAM would you recommend? The machine has 16 GB available.

This might be a useless comment from the peanut gallery but I would never put a dollar sign in a password because if it is ever passed through to a command prompt the dollar sign and what ever the character right after might be tried to be resolved / looked up as a variable, which is not what you want. My comment here is that I have what might be called a phobia on this item / issue perhaps because I have hit this issue with another piece of software a long time ago. If this does not help, please just ignore me because I know nothing about restserver.