html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,issue,performed_via_github_app https://github.com/simonw/datasette/issues/514#issuecomment-705878827,https://api.github.com/repos/simonw/datasette/issues/514,705878827,MDEyOklzc3VlQ29tbWVudDcwNTg3ODgyNw==,9599,2020-10-08T23:33:05Z,2020-10-08T23:33:05Z,OWNER,Documentation is now live at https://docs.datasette.io/en/latest/deploying.html#running-datasette-using-systemd,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-614111094,https://api.github.com/repos/simonw/datasette/issues/514,614111094,MDEyOklzc3VlQ29tbWVudDYxNDExMTA5NA==,9599,2020-04-15T15:32:49Z,2020-04-15T15:32:49Z,OWNER,Relevant: https://github.com/simonw/datasette-auth-github/issues/61,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-610186532,https://api.github.com/repos/simonw/datasette/issues/514,610186532,MDEyOklzc3VlQ29tbWVudDYxMDE4NjUzMg==,9599,2020-04-07T05:43:45Z,2020-04-07T05:43:45Z,OWNER,I've run Datasette in production directly on Ubuntu with systemd in a few places now. I think I'm ready to turn this into real documentation.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-561494291,https://api.github.com/repos/simonw/datasette/issues/514,561494291,MDEyOklzc3VlQ29tbWVudDU2MTQ5NDI5MQ==,9599,2019-12-04T06:14:16Z,2019-12-04T06:14:16Z,OWNER,I've been successfully running the systemd recipe above by Russs on a couple of projects. I shared some notes about what's been working for me here: https://gist.github.com/simonw/63797bb10bb74e615695edd8f850844f,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-509480062,https://api.github.com/repos/simonw/datasette/issues/514,509480062,MDEyOklzc3VlQ29tbWVudDUwOTQ4MDA2Mg==,9599,2019-07-09T04:15:11Z,2019-07-09T04:15:11Z,OWNER,"Running as root isn't ideal because it means that if there are any security vulnerabilities in Datasette an attacker could use them to execute any command they like as root on your machine. I'm moderately confident there aren't any vulnerabilities like that, but I'm definite not 100% certain! My recommendation is to run Datasette on 127.0.0.1 port 8001 and then have nginx proxy port 80 to it. See https://github.com/simonw/datasette/issues/514#issuecomment-504663201 for suggested nginx configuration.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-505061703,https://api.github.com/repos/simonw/datasette/issues/514,505061703,MDEyOklzc3VlQ29tbWVudDUwNTA2MTcwMw==,9599,2019-06-24T15:31:25Z,2019-06-24T15:31:25Z,OWNER,"I'm suspicious of the wildcard. Does it work if you do the following? ExecStart=/home/chris/Env/datasette/bin/datasette serve -h 0.0.0.0 /home/chris/digital-library/databases/actual-database.db --cors --metadata /home/chris/digital-library/metadata.json If that does work then it means the ExecStart line doesn't support bash wildcard expansion. You'll need to create a separate script like this: ``` #!/bin/bash /home/chris/Env/datasette/bin/datasette serve -h 0.0.0.0 /home/chris/digital-library/databases/*.db --cors --metadata /home/chris/digital-library/metadata.json ``` Then save that as `/home/chris/digital-library/run-datasette.sh` and try this: ExecStart=/home/chris/digital-library/run-datasette.sh","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-504793379,https://api.github.com/repos/simonw/datasette/issues/514,504793379,MDEyOklzc3VlQ29tbWVudDUwNDc5MzM3OQ==,9599,2019-06-23T22:31:29Z,2019-06-23T22:31:48Z,OWNER,"I suggest trying a full path in `ExecStart` like this: `ExecStart=/home/chris/Env/datasette/bin/datasette serve -h 0.0.0.0 /home/chris/digital-library/databases/*.db --cors --metadata /home/chris/digital-library/metadata.json` That should eliminate the chance of some kind of path confusion.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-504663390,https://api.github.com/repos/simonw/datasette/issues/514,504663390,MDEyOklzc3VlQ29tbWVudDUwNDY2MzM5MA==,9599,2019-06-22T12:52:27Z,2019-06-22T12:52:27Z,OWNER,This example is useful to - I like how it has a Makefile that knows how to set up systemd: https://github.com/pikesley/Queube,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-504663201,https://api.github.com/repos/simonw/datasette/issues/514,504663201,MDEyOklzc3VlQ29tbWVudDUwNDY2MzIwMQ==,9599,2019-06-22T12:49:56Z,2019-06-22T12:49:56Z,OWNER,"Here are some partial notes I have saved from an nginx configuration I've used in the past: ``` cat /etc/nginx/sites-available/default server { listen 80 default_server; listen [::]:80 default_server; location / { proxy_pass http://127.0.0.1:8001/; proxy_set_header Host $host; } ... ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-504662987,https://api.github.com/repos/simonw/datasette/issues/514,504662987,MDEyOklzc3VlQ29tbWVudDUwNDY2Mjk4Nw==,9599,2019-06-22T12:46:39Z,2019-06-22T12:46:39Z,OWNER,... and @russss also suggested systemd 21 seconds before I posted that!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-504662931,https://api.github.com/repos/simonw/datasette/issues/514,504662931,MDEyOklzc3VlQ29tbWVudDUwNDY2MjkzMQ==,9599,2019-06-22T12:45:47Z,2019-06-22T12:45:47Z,OWNER,I asked about this on Twitter and got a solid recommendation for systemd and this tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units - via https://twitter.com/sil/status/1142412145990221825,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-504662063,https://api.github.com/repos/simonw/datasette/issues/514,504662063,MDEyOklzc3VlQ29tbWVudDUwNDY2MjA2Mw==,9599,2019-06-22T12:31:58Z,2019-06-22T12:31:58Z,OWNER,This is also relevant to Datasette Library #417 ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-504661990,https://api.github.com/repos/simonw/datasette/issues/514,504661990,MDEyOklzc3VlQ29tbWVudDUwNDY2MTk5MA==,9599,2019-06-22T12:30:47Z,2019-06-22T12:30:47Z,OWNER,A section in the Datasette docs that acts as recommendations plus a tutorial for running Datasette on a VPS without using a Docker would be excellent.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625, https://github.com/simonw/datasette/issues/514#issuecomment-504661909,https://api.github.com/repos/simonw/datasette/issues/514,504661909,MDEyOklzc3VlQ29tbWVudDUwNDY2MTkwOQ==,9599,2019-06-22T12:29:46Z,2019-06-22T12:29:46Z,OWNER,"I'm still trying to figure this out myself. I'm confident that running nginx on port 80 and using it to proxy traffic to Datasette is a sensible way to solve the port problem. As for running Datasette itself: the two options that seem best to me are some kind of Init.d service or running it under supervisord. I have to admit I haven't worked out the necessary incantation for either of those yet: the solitary instance I have that's not running as a Docker container is sitting in a ""screen"" instance for the moment!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459397625,