diff --git a/lib/anycable/rails/railtie.rb b/lib/anycable/rails/railtie.rb
index <HASH>..<HASH> 100644
--- a/lib/anycable/rails/railtie.rb
+++ b/lib/anycable/rails/railtie.rb
@@ -70,7 +70,7 @@ module AnyCable
       # Since Rails 6.1
       if respond_to?(:server)
         server do
-          next unless AnyCable.config.embedded?
+          next unless AnyCable.config.embedded? && AnyCable::Rails.enabled?
 
           require "anycable/cli"
           AnyCable::CLI.embed!
fix: only run embedded server if AnyCable is enabled