[GH-ISSUE #1217] Question: ... Is it possible put archivebox in background and close terminal ? #3766

Closed
opened 2026-03-15 00:23:15 +03:00 by kerem · 5 comments
Owner

Originally created by @DaniilKap on GitHub (Aug 26, 2023).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1217

im tring to launch archivebox in background on my server usinge this commands :
sudo -u archivebox archivebox server 0.0.0.0:8000 &
disown {{job_id}}

still see output of web server in console like "GET /admin/core/snapshot/ HTTP/1.1" 200 105763"
And if i try to close terminal webserver close as well.

Originally created by @DaniilKap on GitHub (Aug 26, 2023). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1217 im tring to launch archivebox in background on my server usinge this commands : sudo -u archivebox archivebox server 0.0.0.0:8000 & disown {{job_id}} still see output of web server in console like "GET /admin/core/snapshot/ HTTP/1.1" 200 105763" And if i try to close terminal webserver close as well.
kerem closed this issue 2026-03-15 00:23:21 +03:00
Author
Owner

@pirate commented on GitHub (Aug 28, 2023):

You should use an init system like systemd or supervisord to start it. Another alternative is to use a terminal session manager like tmux or screen. As a last resort, if you really must background it (which I don't recommend as it's generally harder to manage long-term), you can use nohup archivebox ... &.

<!-- gh-comment-id:1695192563 --> @pirate commented on GitHub (Aug 28, 2023): You should use an init system like systemd or supervisord to start it. Another alternative is to use a terminal session manager like tmux or screen. As a last resort, if you really must background it (which I don't recommend as it's generally harder to manage long-term), you can use `nohup archivebox ... &`.
Author
Owner

@DaniilKap commented on GitHub (Aug 28, 2023):

thx, already solved problem with screen.

<!-- gh-comment-id:1695209427 --> @DaniilKap commented on GitHub (Aug 28, 2023): thx, already solved problem with screen.
Author
Owner

@DaniilKap commented on GitHub (Aug 28, 2023):

I ran into 1 more problem, the app will consume all available RAM (6 GB) and slow down to 1-2 links per hour. basically all the memory is occupied by chromium instances. Is it possible to solve this somehow ?

<!-- gh-comment-id:1695219022 --> @DaniilKap commented on GitHub (Aug 28, 2023): I ran into 1 more problem, the app will consume all available RAM (6 GB) and slow down to 1-2 links per hour. basically all the memory is occupied by chromium instances. Is it possible to solve this somehow ?
Author
Owner

@pirate commented on GitHub (Aug 29, 2023):

That issue should be solved soon, plz follow this PR for updates https://github.com/ArchiveBox/ArchiveBox/pull/1219

<!-- gh-comment-id:1696696344 --> @pirate commented on GitHub (Aug 29, 2023): That issue should be solved soon, plz follow this PR for updates https://github.com/ArchiveBox/ArchiveBox/pull/1219
Author
Owner

@sasasqt commented on GitHub (Aug 31, 2023):

add this service to systemd service, and

sudo sytemctl start archivebox-server.service
sudo sytemctl enable archivebox-server.service

archivebox-server.service:

[Unit]
Description=Archivebox
#After=

[Service]
WorkingDirectory=/**path to where archivebox is init-ed**
ExecStart=/**path to archive box binary**/archivebox server
User=<**username**>

WatchdogSec=4000s
WatchdogSignal=SIGKILL

Restart=always
RestartSec=5

NoNewPrivileges=yes

PrivateDevices=yes

ProtectControlGroups=yes

ProtectKernelModules=yes

ProtectKernelTunables=yes

ProtectHostname=yes

RestrictRealtime=yes

ProtectKernelLogs=yes

ProtectClock=yes

SystemCallArchitectures=native

LockPersonality=yes

[Install]
WantedBy=multi-user.target

<!-- gh-comment-id:1700716745 --> @sasasqt commented on GitHub (Aug 31, 2023): add this service to systemd service, and ``` sudo sytemctl start archivebox-server.service sudo sytemctl enable archivebox-server.service ``` archivebox-server.service: ``` [Unit] Description=Archivebox #After= [Service] WorkingDirectory=/**path to where archivebox is init-ed** ExecStart=/**path to archive box binary**/archivebox server User=<**username**> WatchdogSec=4000s WatchdogSignal=SIGKILL Restart=always RestartSec=5 NoNewPrivileges=yes PrivateDevices=yes ProtectControlGroups=yes ProtectKernelModules=yes ProtectKernelTunables=yes ProtectHostname=yes RestrictRealtime=yes ProtectKernelLogs=yes ProtectClock=yes SystemCallArchitectures=native LockPersonality=yes [Install] WantedBy=multi-user.target ```
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#3766
No description provided.