[GH-ISSUE #838] ArchiveBox should never be run as root Windows Docker create super user #520

Closed
opened 2026-03-01 14:44:17 +03:00 by kerem · 4 comments
Owner

Originally created by @cybrpimp on GitHub (Aug 31, 2021).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/838

I've was able to install ArchiveBox on Docker without a problem from the Docker Hub download, but when I try to create a superuser I get the following error;

image

image

Originally created by @cybrpimp on GitHub (Aug 31, 2021). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/838 I've was able to install ArchiveBox on Docker without a problem from the Docker Hub download, but when I try to create a superuser I get the following error; ![image](https://user-images.githubusercontent.com/61793417/131432557-77acf203-2cf5-46c9-b797-7598ae3b1811.png) ![image](https://user-images.githubusercontent.com/61793417/131432668-bed248cf-c220-4504-820b-22f0e73003d3.png)
kerem closed this issue 2026-03-01 14:44:18 +03:00
Author
Owner

@likuilin commented on GitHub (Sep 1, 2021):

I got the same issue. As a workaround, you can su archivebox first and then do whatever you need to do, or you can specify the username to use to docker by doing docker-compose exec -u archivebox archivebox archivebox create superuser

<!-- gh-comment-id:909862985 --> @likuilin commented on GitHub (Sep 1, 2021): I got the same issue. As a workaround, you can `su archivebox` first and then do whatever you need to do, or you can specify the username to use to docker by doing `docker-compose exec -u archivebox archivebox archivebox create superuser`
Author
Owner

@pirate commented on GitHub (Sep 8, 2021):

You should use run not exec, it will handle the user permissions correctly for you:

docker-compose run archivebox manage createsuperuser
<!-- gh-comment-id:915627691 --> @pirate commented on GitHub (Sep 8, 2021): You should use `run` not `exec`, it will handle the user permissions correctly for you: docker-compose run archivebox manage createsuperuser
Author
Owner

@likuilin commented on GitHub (Sep 10, 2021):

Good point! Though if you do that, you're spinning up a separate docker container, so you should add --rm or else you leave behind a stopped container that isn't cleaned up.

Edit: Huh, it seems like the documentation advises using docker-compose run but doesn't have any --rm in its examples. That should be fixed, I think. Running the documentation examples as-is leaves stopped containers on every command, which needlessly take up space. Though, this is a separate issue.

<!-- gh-comment-id:916551925 --> @likuilin commented on GitHub (Sep 10, 2021): Good point! Though if you do that, you're spinning up a separate docker container, so you should add `--rm` or else you leave behind a stopped container that isn't cleaned up. Edit: Huh, it seems like the [documentation](https://github.com/ArchiveBox/ArchiveBox/wiki/Docker) advises using `docker-compose run` but doesn't have any `--rm` in its examples. That should be fixed, I think. Running the documentation examples as-is leaves stopped containers on every command, which needlessly take up space. Though, this is a separate issue.
Author
Owner

@pirate commented on GitHub (Sep 16, 2021):

In my experience they don't take up appreciable additional disk space because of docker's BTFS COW-based filesystem. If you want to clean them up you can always run docker system prune. You're welcome to add --rm, but I don't add it to the examples/docs in order to keep them as short, simple, and intuitive as possible.

<!-- gh-comment-id:920535977 --> @pirate commented on GitHub (Sep 16, 2021): In my experience they don't take up appreciable additional disk space because of docker's BTFS COW-based filesystem. If you want to clean them up you can always run `docker system prune`. You're welcome to add `--rm`, but I don't add it to the examples/docs in order to keep them as short, simple, and intuitive as possible.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#520
No description provided.