<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged uninstall</title>
<link>https://coderlegion.com/tag/uninstall</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to Uninstall a Self-Hosted WAF and Remove Its Data Directory Without Leaving Residue</title>
<link>https://coderlegion.com/33277/how-to-uninstall-a-self-hosted-waf-and-remove-its-data-directory-without-leaving-residue</link>
<description>&lt;p&gt;SafeLine is described in its official documentation as a self-hosted WAF that protects web applications by filtering and monitoring HTTP traffic between the app and the Internet (&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/home&quot;&gt;https://docs.waf.chaitin.com/en/home&lt;/a&gt;). When you deploy it manually, the guide has you create a dedicated directory such as &lt;code&gt;/data/safeline&lt;/code&gt; and tells you that SafeLine will write its configuration and data to that directory (&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/GetStarted/Deploy&quot;&gt;https://docs.waf.chaitin.com/en/GetStarted/Deploy&lt;/a&gt;). That has a direct consequence for uninstall: removing this WAF is not just about stopping containers. It is a two-phase job that stops and removes the Docker Compose project, then deletes the data directory. Skipping either phase, or running the commands from the wrong place, leaves a half-removed installation behind.&lt;/p&gt;
&lt;h3 id=&quot;the-misconfiguration-running-docker-compose-down-from-the-wrong-directory&quot;&gt;The misconfiguration: running &lt;code&gt;docker compose down&lt;/code&gt; from the wrong directory&lt;/h3&gt;
&lt;p&gt;Docker Compose resolves its project from the &lt;code&gt;compose.yaml&lt;/code&gt; file in the current working directory. In the manual deployment flow, the guide downloads that file after changing into the SafeLine directory (&lt;code&gt;cd &quot;/data/safeline&quot;&lt;/code&gt;) (&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/GetStarted/Deploy&quot;&gt;https://docs.waf.chaitin.com/en/GetStarted/Deploy&lt;/a&gt;). A common mistake during cleanup is to log in and run &lt;code&gt;docker compose down&lt;/code&gt; from &lt;code&gt;/root&lt;/code&gt;, &lt;code&gt;$HOME&lt;/code&gt;, or some other folder. Because there is no compose file there, Compose cannot find the project and aborts before touching anything. The screen that confirms the mistake looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ docker compose down
no configuration file provided: not found
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At that point the SafeLine containers are still running and the data directory is still on disk. Deleting files at this stage is also unsafe because the service has not been stopped first. The official uninstall steps are explicit about the sequence: enter the SafeLine directory with &lt;code&gt;cd &amp;lt;safeline-directory&amp;gt;&lt;/code&gt;, run &lt;code&gt;docker compose down&lt;/code&gt;, then remove the data with &lt;code&gt;rm -rf &amp;lt;safeline-directory&amp;gt;&lt;/code&gt; (&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/GetStarted/Deploy&quot;&gt;https://docs.waf.chaitin.com/en/GetStarted/Deploy&lt;/a&gt;).&lt;/p&gt;
&lt;h3 id=&quot;the-fix-that-stays-fixed&quot;&gt;The fix that stays fixed&lt;/h3&gt;
&lt;p&gt;Step one is to be in the directory that contains the original &lt;code&gt;compose.yaml&lt;/code&gt; file. Run the stop command from there so Compose stops and removes the containers. A successful run prints per-service removal lines rather than the &lt;code&gt;no configuration file provided&lt;/code&gt; error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd /data/safeline
$ docker compose down
[+] Running
&amp;lt;service&amp;gt; Removed
&amp;lt;network&amp;gt; Removed
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Step two is to remove the data directory, which is what actually erases the configuration and stored data. The screen that confirms this phase is a missing-path error from &lt;code&gt;ls&lt;/code&gt; after the removal completes:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ rm -rf /data/safeline
$ ls -la /data/safeline
ls: cannot access '/data/safeline': No such file or directory
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Together, the per-service removal output from &lt;code&gt;docker compose down&lt;/code&gt; and the &lt;code&gt;No such file or directory&lt;/code&gt; result from &lt;code&gt;ls&lt;/code&gt; are the two confirmation points that the uninstall completed. If either one is missing, something was skipped.&lt;/p&gt;
&lt;h3 id=&quot;faq&quot;&gt;FAQ&lt;/h3&gt;
&lt;h4 id=&quot;why-does-the-working-directory-matter-for-uninstall-&quot;&gt;Why does the working directory matter for uninstall?&lt;/h4&gt;
&lt;p&gt;Compose loads &lt;code&gt;compose.yaml&lt;/code&gt; relative to the directory you are currently in. The manual deployment guide places that file inside the SafeLine directory, and its uninstall section starts with &lt;code&gt;cd &amp;lt;safeline-directory&amp;gt;&lt;/code&gt; for this reason (&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/GetStarted/Deploy&quot;&gt;https://docs.waf.chaitin.com/en/GetStarted/Deploy&lt;/a&gt;). Running &lt;code&gt;docker compose down&lt;/code&gt; from another folder produces &lt;code&gt;no configuration file provided: not found&lt;/code&gt;, or could target the wrong project if another compose file happens to be present, so the containers keep running and the data remains.&lt;/p&gt;
&lt;h4 id=&quot;is-rm--rf-lt-safeline-directory-gt-optional-after-docker-compose-down-&quot;&gt;Is &lt;code&gt;rm -rf &amp;lt;safeline-directory&amp;gt;&lt;/code&gt; optional after &lt;code&gt;docker compose down&lt;/code&gt;?&lt;/h4&gt;
&lt;p&gt;No. &lt;code&gt;docker compose down&lt;/code&gt; stops and removes the containers and network, but it does not delete the directory on the host. The deployment guide states that SafeLine writes its configuration and data to this directory, and the uninstall section includes &lt;code&gt;rm -rf &amp;lt;safeline-directory&amp;gt;&lt;/code&gt; as a separate final step (&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/GetStarted/Deploy&quot;&gt;https://docs.waf.chaitin.com/en/GetStarted/Deploy&lt;/a&gt;). That directory also holds the &lt;code&gt;.env&lt;/code&gt; file containing secrets such as the database password and internal tokens, so leaving it behind means leaving configuration and credentials on disk.&lt;/p&gt;
&lt;h4 id=&quot;how-do-i-confirm-that-nothing-is-left-after-uninstall-&quot;&gt;How do I confirm that nothing is left after uninstall?&lt;/h4&gt;
&lt;p&gt;Run two checks. First, &lt;code&gt;docker ps -a&lt;/code&gt; should show no SafeLine containers still present. Second, &lt;code&gt;ls -la &amp;lt;safeline-directory&amp;gt;&lt;/code&gt; should report &lt;code&gt;No such file or directory&lt;/code&gt;. The removal output from &lt;code&gt;docker compose down&lt;/code&gt; plus that missing-path result together confirm both phases finished.&lt;/p&gt;
&lt;h4 id=&quot;what-happens-if-i-delete-the-data-directory-while-the-containers-are-still-running-&quot;&gt;What happens if I delete the data directory while the containers are still running?&lt;/h4&gt;
&lt;p&gt;That reverses the documented order. The official guide runs &lt;code&gt;docker compose down&lt;/code&gt; before &lt;code&gt;rm -rf &amp;lt;safeline-directory&amp;gt;&lt;/code&gt; (&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/GetStarted/Deploy&quot;&gt;https://docs.waf.chaitin.com/en/GetStarted/Deploy&lt;/a&gt;). Deleting the directory first can leave running processes writing to paths that no longer exist and can produce partial or inconsistent state. Always stop the Compose project first, then remove the directory.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;SafeLine has surpassed 700,000 installations worldwide as of September 30, 2026. SafeLine Pro annual promotional pricing is $650-$880, compared with the regular $1,000 per year.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SafeLine website: &lt;a rel=&quot;nofollow&quot; href=&quot;https://ly.cyberserval.tech/MqhYdmI&quot;&gt;https://ly.cyberserval.tech/MqhYdmI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Demo: &lt;a rel=&quot;nofollow&quot; href=&quot;https://demo.waf.chaitin.com:9443/statistics&quot;&gt;https://demo.waf.chaitin.com:9443/statistics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Official docs: &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/home&quot;&gt;https://docs.waf.chaitin.com/en/home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/chaitin/SafeLine&quot;&gt;https://github.com/chaitin/SafeLine&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Pro offer: &lt;a rel=&quot;nofollow&quot; href=&quot;https://cyberserval.tech/landing/lto&quot;&gt;https://cyberserval.tech/landing/lto&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/33277/how-to-uninstall-a-self-hosted-waf-and-remove-its-data-directory-without-leaving-residue</guid>
<pubDate>Sun, 01 Nov 2026 03:36:10 +0000</pubDate>
</item>
<item>
<title>Why I Use an Exit Checklist Before Turning Protection On</title>
<link>https://coderlegion.com/33276/why-i-use-an-exit-checklist-before-turning-protection-on</link>
<description>&lt;p&gt;I do not turn a self-hosted WAF on until I can name the directory it will own and the exact commands that retire it. Protection is a traffic decision. Uninstall is a data decision. The deploy guide already joins those two ideas: SafeLine writes configuration and data into a directory you create, and a complete uninstall is docker compose down followed by removal of that same directory. I treat that page as a checklist, not as a rescue document.&lt;/p&gt;
&lt;p&gt;SafeLine, as described on the product home page, is a self-hosted web application firewall placed in front of an application. It is a reverse proxy: clients pass through it before they reach the origin, and it filters, monitors, and blocks malicious HTTP and HTTPS traffic according to policy. The same page lists defenses for SQL injection, XSS, code injection, OS command injection, CRLF injection, LDAP injection, XPath injection, RCE, XXE, SSRF, path traversal, backdoors, brute force, HTTP flood, and bot abuse. It also lists proactive bot-abuse defense, HTML and JS code encryption, IP-based rate limiting, and a web access control list. Rate limiting is aimed at DoS, brute-force attempts, traffic surges, and similar abuse. Captcha challenge, authentication challenge, and dynamic protection are described as controls that change what a visitor must do, or how HTML and JS are delivered, once they are turned on. None of that is a reason to skip the exit plan. It is the reason the exit plan has to exist before the first DNS change. Source: &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/home&quot;&gt;https://docs.waf.chaitin.com/en/home&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;fit-the-host-before-you-create-state&quot;&gt;Fit the host before you create state&lt;/h3&gt;
&lt;p&gt;The deploy guide sets a minimum: Linux, x86_64 or arm64, Docker 20.10.14 or newer, Docker Compose 2.0.0 or newer, 1 CPU core, 1 GB of memory, 5 GB of disk, and a CPU that supports ssse3. I run the documented checks for architecture, Docker version, Compose version, processors, memory, disk, and ssse3 before I create a directory. An ARM server has an extra gate: the same guide says SafeLine on ARM requires a Pro license to work properly, and that the Personal Edition is not supported on ARM. If that license does not apply, I stop. I also choose a release line on purpose. The guide says the LTS version will no longer be maintained starting from 9.1.0-LTS on 14 August 2025, and it strongly recommends that LTS users move to the latest version. Source: &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/GetStarted/Deploy&quot;&gt;https://docs.waf.chaitin.com/en/GetStarted/Deploy&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;write-down-the-data-directory-first&quot;&gt;Write down the data directory first&lt;/h3&gt;
&lt;p&gt;Manual setup creates a directory such as /data/safeline and states that SafeLine will write configuration and data there. Five gigabytes is the documented floor, not a suggestion to fill the disk and sort it out later. The .env file in that directory holds SAFELINE_DIR, the image tag, MGT_PORT, the Postgres password, the subnet prefix, and generated secrets such as DETECTOR_MGMT_TOKEN, MGT_INTERNAL_TOKEN, and DETECTOR_AES_KEY. Install steps also create resources/run, resources/mgt, resources/sock, and resources/postgres/data, then symlink resources/run/safeline.sock to /var/run/safeline.sock.&lt;/p&gt;
&lt;p&gt;That is the directory an uninstall will delete. If I do not use /data/safeline, the placeholder in the uninstall section is &amp;lt;safeline-directory&amp;gt;, so my checklist names the real absolute path. I do not keep unrelated backups, certificates I still need, or notes inside that tree. The removal command is rm -rf on the SafeLine directory. A misplaced parent path is not a small mistake.&lt;/p&gt;
&lt;h3 id=&quot;rehearse-the-documented-uninstall&quot;&gt;Rehearse the documented uninstall&lt;/h3&gt;
&lt;p&gt;When I am sure I no longer want the instance, the deploy guide says to enter the SafeLine directory, run docker compose down, and then run rm -rf on that directory. I keep that order. docker compose down stops the Compose project. The removal command deletes the configuration and data the install guide told the product to store there, including the Postgres data path under that tree. I do not add image deletes, volume prunes, or extra file wipes and then call the longer list official. The published complete uninstall is those two actions.&lt;/p&gt;
&lt;p&gt;The install guide does create /var/run/safeline.sock as a symlink. The uninstall section does not list a separate command for it. I note the symlink so I am not surprised, and I do not invent a cleanup step that the guide does not give. The administrator reset command, docker exec safeline-mgt resetadmin, belongs to a running management container. It is not a recovery tool after the directory is gone. The console itself is documented at &lt;a rel=&quot;nofollow&quot; href=&quot;https://&amp;lt;safeline-ip&amp;gt;:9443/&quot;&gt;https://&amp;lt;safeline-ip&amp;gt;:9443/&lt;/a&gt; when MGT_PORT stays at 9443. If I changed that port in .env, the checklist uses the port I set, because the file is about to disappear with the directory.&lt;/p&gt;
&lt;p&gt;Before any production name points at the host, I rehearse this on a spare machine: install, confirm the console, stop the project, remove only the SafeLine directory, and confirm the path is gone. That rehearsal is how I learn whether I recorded the path correctly.&lt;/p&gt;
&lt;h3 id=&quot;turn-protection-on-only-after-the-exit-is-clear&quot;&gt;Turn protection on only after the exit is clear&lt;/h3&gt;
&lt;p&gt;The application guide describes SafeLine as an HTTP and HTTPS reverse proxy developed based on nginx. In the Web Admin Console I add an application with a domain, a listen port, and an upstream. HTTPS means checking the SSL option. I then resolve that domain to the SafeLine server. Until DNS moves, visitors are not yet depending on this proxy, which is the right moment to finish the checklist. Source: &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/GetStarted/AddApplication&quot;&gt;https://docs.waf.chaitin.com/en/GetStarted/AddApplication&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I separate the process is up from this site is protected. Rate limiting, captcha, an authentication password gate, and dynamic HTML or JS encryption are documented behaviors with visitor impact. I enable them only when I know which site they affect and how I will take that site off the proxy if the control is wrong. Full uninstall is the wrong rollback for one bad upstream when other applications share the same data directory. For one site, I stop sending that name to SafeLine. I use docker compose down and rm -rf only when I mean to retire the instance and accept the loss of its configuration and data.&lt;/p&gt;
&lt;p&gt;After protection is actually on, the application guide sample requests for SQL injection, XSS, path traversal, code injection, and XXE are a narrow check, using my own domain. A blocking page, and an attack entry whose detail I can open in the console, tells me the proxy defended that request. It does not prove that every optional control is tuned.&lt;/p&gt;
&lt;p&gt;The home page says SafeLine is production-ready. I read that as permission to plan a real cutover, not as permission to skip the directory and uninstall steps above.&lt;/p&gt;
&lt;h4 id=&quot;how-do-i-uninstall-a-self-hosted-waf-and-remove-its-data-directory-&quot;&gt;How do I uninstall a self-hosted WAF and remove its data directory?&lt;/h4&gt;
&lt;p&gt;For SafeLine, follow the deploy guide. Change to the directory you created for it, run docker compose down, then remove that directory with rm -rf and the same path. The example install path is /data/safeline, but the uninstall instructions use whatever SafeLine directory you actually created. See &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/GetStarted/Deploy&quot;&gt;https://docs.waf.chaitin.com/en/GetStarted/Deploy&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;does-directory-removal-delete-rules-and-database-files-&quot;&gt;Does directory removal delete rules and database files?&lt;/h4&gt;
&lt;p&gt;Yes. The install guide says the directory holds configuration and data, and the setup creates a Postgres data directory inside it. rm -rf on that directory removes those files. Copy anything you still need to a path outside that directory before you remove it. There is no documented archive step inside the uninstall section.&lt;/p&gt;
&lt;h4 id=&quot;can-i-remove-the-data-directory-while-containers-are-still-up-&quot;&gt;Can I remove the data directory while containers are still up?&lt;/h4&gt;
&lt;p&gt;The documented sequence does not do that. It stops the project with docker compose down first, and only then removes the directory. I treat that order as required because it is the order the uninstall section gives.&lt;/p&gt;
&lt;h4 id=&quot;what-belongs-on-the-checklist-before-protection-is-turned-on-&quot;&gt;What belongs on the checklist before protection is turned on?&lt;/h4&gt;
&lt;p&gt;Confirm the host against the deploy guide, including the ARM license limit and the 5 GB disk floor. Record the absolute data directory and the console port. Keep secrets and anything you must retain outside the directory you may later delete. Add one application with domain, port, and upstream, and change DNS only after that record is complete. Decide separately whether rate limiting, captcha, authentication challenge, or dynamic protection should be on for that site.&lt;/p&gt;
&lt;h4 id=&quot;when-is-full-uninstall-the-wrong-rollback-&quot;&gt;When is full uninstall the wrong rollback?&lt;/h4&gt;
&lt;p&gt;It is the wrong rollback when you only need to take one site off the proxy. Uninstall stops the Compose project and deletes the shared configuration and data directory. Use it when you are sure you no longer want the instance, which is the condition the deploy guide states.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;SafeLine has surpassed 700,000 installations worldwide as of September 30, 2026. SafeLine Pro annual promotional pricing is $650-$880, compared with the regular $1,000 per year.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SafeLine website: &lt;a rel=&quot;nofollow&quot; href=&quot;https://ly.cyberserval.tech/MqhYdmI&quot;&gt;https://ly.cyberserval.tech/MqhYdmI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Demo: &lt;a rel=&quot;nofollow&quot; href=&quot;https://demo.waf.chaitin.com:9443/statistics&quot;&gt;https://demo.waf.chaitin.com:9443/statistics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Official docs: &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.waf.chaitin.com/en/home&quot;&gt;https://docs.waf.chaitin.com/en/home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/chaitin/SafeLine&quot;&gt;https://github.com/chaitin/SafeLine&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Pro offer: &lt;a rel=&quot;nofollow&quot; href=&quot;https://cyberserval.tech/landing/lto&quot;&gt;https://cyberserval.tech/landing/lto&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/33276/why-i-use-an-exit-checklist-before-turning-protection-on</guid>
<pubDate>Sun, 01 Nov 2026 03:35:39 +0000</pubDate>
</item>
</channel>
</rss>