REST server documentation?

I’m trying to set up a REST server, and failing. The best I can figure out to do, on NIxOS, is to set services.restic.server.enable = true;, which creates the systemd unit and installs the server package. Unfortunately the unit fails.

So I turn to the server’s git repo and then the Arch Wiki. I can’t find set up steps on either, but since people clearly are using this, it must exist somewhere. I just can’t find it.

Is the problem you’re having you’re not able to start it automatically? That’s not really within the scope of the rest-server documentation, it’s sort of assumed you’d know how to automatically start/stop a system process as required.

For me, I just run it automatically using dtach like so in my cron.
This is for simple personal use:

# Crontab Entry
@reboot /usr/bin/dtach -n /tmp/rest-server /usr/local/bin/rest-server --path /home/X/rest-server --no-auth --listen :4321 --log /home/X/rest-server.log

In the same way that the restic documentation doesn’t dictate how you automate running restic, the rest-server documentation doesn’t dicate how to automatically start/stop it as there’s 500 ways to skin that cat.

I’m not asking for help troubleshooting because I’m not at that point yet. I have not seen any documentation on how to set this up. That’s step 1. I’ve completed step 0, I think, which is installation, but that isn’t set up. Starting it is a later step.

I managed to get it working quickly reading the rest-server home github page?

Hopefully that sorts you out.

Make it run from command line first - all/most info is on the github page. Then it is your OS specific setup how to control it. I would definitely not start with systemd without sorting out basics first.

So start with:

rest-server --path /user/home/backup --no-auth

make sure you get client(s) working and then build it up by adding required features. When all is working according to your requirement move to starting it automatically after reboot etc.

If you hit the wall then post all details including logs here - somebody for sure will be able to advice. Saying “that it fails” without any details is pointless as nobody can see your screen and guess error messages.

1 Like

It’s right here: GitHub - restic/rest-server: Rest Server is a high performance HTTP server that implements restic's REST backend API.

2 Likes